Beruflich Dokumente
Kultur Dokumente
desc v$datafile;
select BYTES/1024/1024/1024 from v$datafile;
desc dba_data_files;
select BYTES/1024/1024/1024 from dba_data_files;
desc dba_free_space;
select BYTES/1024/1024/1024 from dba_free_space;
select
"Reserved_Space(MB)", "Reserved_Space(MB)" - "Free_Space(MB)"
"Used_Space(MB)","Free_Space(MB)"
from(
select
(select sum(bytes/(1014*1024)) from dba_data_files) "Reserved_Space(MB)",
(select sum(bytes/(1024*1024)) from dba_free_space) "Free_Space(MB)"
from dual 2 3 4 5 6 7 );
desc dba_temp_files;
desc dba_free_space
desc dba_free_space
desc dba_segments
select sum(bytes)/1024/1024/1024 from dba_segments where owner='SIVA';
A Bigfile Tablespace (BFT) is a special kind of tablespace than can only have a
single (normally very large) datafile. Normal/traditional tablespaces are referred
to as smallfile tablespaces.
A BFT can be up to 128 TB in size (with a 32k block size), while smallfile
tablespaces can have a maximum size of 128 GB.
create bigfile tablespace siva datafile '/u01/siva/oradata/siva01.dbf' size 1M;
14. the datafile is in autoextend mode but the datafile is not growing more than
10g what is the reagions.
mountpoint full
max extent reaches
2. TOPIC Usermanagement
1.if a singal user is not able to connect to the database. what are things we need
to check.
if any users is not able to connect menas listener may be down orelse any network
issue.
2.how to check what are the privalages assinged to the particular user.
desc dba_role_privs;
3.will created one user without tablespace then which tablespace allocated the user
how to check.
8.some user are not able to onnect to the database what are reason and how to
check.
if any user is not able to connect means listener may be down orelse network issue
create user siva identified by siva default tablespace deva temporary tablespace
temp;
dba_users
13.what is role.
role nothing but group of previlages
14.what is profile.
profile nothing but restriction of data
two types of profiles
1.system level profile
2.objective level profile
2.if controlfile is corrupted what will happen to the database how to recover it.
for recover:
shut abort
cd /u01/siva/oradata
cp control01.ctl control02.ctl
sqlplus / as sysdba
startup
3.if having 5 controlfile, one of controlfile is deleted then what will happen to
the database.
a) duplex
sqlplus / as sysdba
startup
b)multiplex
vi alert_siva.log
desc v$ log
desc v$logfile
v$logfile
7.if one current redolog file is corrupted then what happens to the database.
8.if one inactive redolog file is corrupted then what happens to the database.
if you create a database using manual method then pfile will be created it is in
oracle_home/dbs location.with the name intsiva.ora. it is in human readble format
spfile:
3. if both pfile and spfile remove then what will happened to already running
database.
nothing happened
if pfile and spfile is remove onthat time create pfile from memory,create spfile
from memory.
scope=memory
if you use scope=memory then the parameter value will change.But it will not change
permanently
scope=spfile
if you use scope=spfile now it will not change onces you shutdown and startup then
only it will change that to permanently it will chang
scope=both
if you use scope=both without downtime the parameter value will change that to
permanently will change
db_name=siva
a. instance_type
b.db_unique_name
c.asm_diskgroup
d.asm_preferred-read_failure_group
for pfile:
shut immediate
cd $ORACLE_home/dbs
vi inisiva.ora
-------------
------------
------------
:wq!
sqlplus / as sysdba
startup
6. TOPIC Backups
a.logical backup
b.physical backup
c.rman backup
c. datapump is direct path export which is Oracle Data block. Exp uses SQL level
extraction.
d. Exp,imp runs on client side, but expdp and impdp runs on server side.so we have
much control compared to traditional exp,imp !
consistent=y once u start the backup up to that time what are data exists in that
table that only it will take backup
stop_job
schema level
table level
query level
space issue(archive log space issue)
if keep tablespace begin backup mode then the archives will generative
8. TOPIC RMAN
incremental backup:
cumulative backup:
absolete backup: when the rman retention policy is completed then the backup pieces
will come to obsolete
expired backup: if some one removed the backup pieces in o.s level, then in rmana
repository it is existing when we cross check the backupiece then removed piece
will come expired
Rman target /
rman cold backup: In database mount state we need to take the rman backup is
called offline backup
8.if you enable block change tracking what kind of background process will come
v$rman_status
v$rman_backup_job_details
for use autobackup is it will take controlfile and also take spfile
optimizer on:if want take full database backup and also it will take modified
datafiles
16.what is rman
Rman is oracle utility which is used to backup restore & recover of database
9. TOPIC Networking
tnsping tns_siva
for listener
1.manual method
2.graphical method(netca,netmgr)
pre-requests
a.IPadress or hostname
b.port number (4 digit 1256)
c.database name
for tns
1.manual method
2.graphical (netmgr,netca)
pre-requests
a.listener ip adress
b.port(same listener port number)
c.database name
5.where is the location of listener file in normal file system using database and
asm using database
$oracle_home/network/admin
$grid_home/network/admin
a.DBWR(DATABASE WRITER)
B.LGWR(LOG WRITER)
C.CKPT(CHECKPOINT)
D.SMON
E.PMON
large_poll_size:it is used for rman block information and also it is used for ASM
5.if any of the mandatory background process is killed how happen the database.
roll forward:An commited data is missing from redologfile to pick and kepp in
datafile
roll backward: roll backward is from undotablespace it pick the uncommited data and
keep in datafile
for pmon: pmon is a background process it is going to release the lock releated to
the user when he exit from the database and also it will release space in sga.
DBWR:it will write all the modified blocks from database buffer cache to datafile
a.
9.explain Architure
10.if arch mount point 100% what will happen of the database.
database goes to hang state it will not allow the users to establish the
connections
it used to perform the rollforward and rollbackward from one database to another
database
16.sga components
18.how to check how many db writers running and how many db writers keep.
db name
db id
log information
sequence of checkpoint information
20.how to check how much we can increase the memory_target.
Rbal,arbn,asmb
asm is a volume manager asm uses diskgroup to store datafiles asm provide stripping
and mirroring
oracleasm configure -i
asmcmd>lsdg
v$asm_disk
v$asm_diskgroup
v$asm_clients
rman backup
v$archive_gap
select * from
4.if archive not able transfer to the standby database what are reasons.
logical standby: in logical standby we can open standby in read,write mode but here
archives converted into logical format and apply
active dataguard
snapshot standby
realtime apply
snapshot standby:it is read -write mode,so archives will not apply & mrp will not
work
archive gap
heartbeat failed
not able to connect to stanadby database
in order to resolve the archive gap, oracle has introduced fal (fetch archive gap)
v$managed_standby;
dataguard:it is active-passive
rac: it is active-active
db_name,db_unique_name,fal_client,fal_server,standby_file_management
19.the archive has to transfer to the standby but it has to apply after one hour
how to perform.
dataguard:all users are connect to primary database only standby is idle state
rac:if 2 node rac there some users connect to node 1 some users connect to node 2
22. how to apply a patch in dataguard.
25. iam add one datafile in primary database wheather i need to add datafile in
standby also or not
26.iam add one datafile in primary database and stsandby database but their is no
space what it will happen.
1st keep the standby file_ management=manual after that it will store in dbs
location with unamed file.next stop the mrp and recreate the file by using alter
database create datafile 'old locaton to new location after that start thr mrp &
keep staandby_file_management=auto
v$archive_gap,v$archive_log
5.in which view we can check the patch is applied to the database or not, what kind
of patch we applied when it is applied.
database level:registry$history
opatch -n apply
7.we have applied P.S.U patch then wheater we can apply C.P.U patch or not.
no
8.we have applied C.P.U patch then wheater we can apply P.S.U patch or not.
yes
p.s.u
a.sqlplus / as sysdba
b.exit
c. check archive log mode for rman backup
d.rman target /
e.backup database include current controlfile plus archive log;
f.exit
g.shut immediate
h.stop listeners
i.oracle home back
h. cd /u01/app/oracle/product/11.2.0/dbhome_1
tar -cvf abc.txt
tar -xvf abc.txt
for os level
top or sar
iostart
dba_tables
if want reduced the fragementation index then we need the rebuild the indexes
dba_tables,dba_objects
@?/rdbms/admin/awrrpt.sql
@?/rdbms/admin/addmrpt.sql
8.differnce b/w awwr report and addmr report
which query is run and how many users is connect how many transuctions is held and
users how many commits all infomation have in awwrt report but not show
recommendations awwrr report
free-m
top
ps-ef|grep pmon
cat /etc/oratab
cat /etc/cpuinfo
cat /proc/cpuinfo
a.OHASD
B.CRSD
C.CSSD
D.CTSSD
E.EVMD
B.CRSD=cluster ready service demon cresd is a process it is going to start all the
cluster resource based on the ocr files
it is going to transfer the blocks from one node to another node through private
interconnections
every 4 hrs crsd is process it is going take backup of olr & voting disk otherwise
we can do manually by using ocrconfig -manual backup
it contain voting information of each & every node, and also node membership
information
ocr contains cluster configuration resource information for each & every node
olr contains cluster configuration resource information for particular node.
11. iam having three ocr files and one ocr file is corrupted then what will happen
cluster.
12.iam having three voting one of voting disk is corrupted then what will happen
cluster.
17.how to check the local lsterner and scan listerner status in cluster database
crsctl stat -t
when node to node private interconnections is not happen then node evation will
occur
high avalibility,performance,scalibility
olsnode -n
25.in three node rac database if master node is stopped then which node become a
master node
what is SCN