who write controlfile when create a tablespace
Steven Zhang, September 17, 2004 - 2:32 am UTC
hello
I have a question to ask.which process take charge of write record into controlfile when one session create a tablespace.
i trace a session ,part of trace output like this:
create tablespace zbt datafile 'zbt.ora' size 10M
=====================
PARSING IN CURSOR #2 len=357 dep=1 uid=0 oct=2 lid=0 tim=1013114133 hv=21142229 ad='16a354c8'
insert into ts$ (ts#,name,online$,contents$,undofile#,undoblock#,blocksize, dflmaxext,dflinit,dflincr,dflextpct,dflminext,dflminlen,inc#,owner#,scnwrp,scnbas,pitrscnwrp,pitrscnbas,dflogging, affstrength,bitmapped,plugged,directallowed,flags,spare1,spare2) values (:1,:2,:3,:4,:5,:6,:7,:8,:9,:10,:11,:12,:13,1,:14,:15,:16,:17,:18,:19,0,:20,:21,1,:22,:23,:24)
END OF STMT
PARSE #2:c=15625,e=1076,p=0,cr=0,cu=0,mis=1,r=0,dep=1,og=0,tim=1013114120
EXEC #2:c=0,e=1103,p=0,cr=3,cu=11,mis=0,r=1,dep=1,og=4,tim=1013141798
=====================
PARSING IN CURSOR #2 len=322 dep=1 uid=0 oct=6 lid=0 tim=1013773959 hv=3069360096 ad='16a25124'
update ts$ set name=:2,online$=:3,contents$=:4,undofile#=:5,undoblock#=:6, blocksize=:7,dflmaxext=:8,dflinit=:9,dflincr=:10,dflextpct=:11,dflminext=:12,dflminlen=:13,owner#=:14,scnwrp=:15,scnbas=:16,pitrscnwrp=:17,pitrscnbas=:18,dflogging=:19,bitmapped=:20,inc#=:21,flags=:22,plugged=:23,spare1=:24,spare2=:25 where ts#=:1
END OF STMT
PARSE #2:c=0,e=94,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,tim=1013773948
EXEC #2:c=0,e=383,p=0,cr=4,cu=2,mis=0,r=1,dep=1,og=4,tim=1013802632
STAT #2 id=1 cnt=0 pid=0 pos=1 obj=0 op='UPDATE '
STAT #2 id=2 cnt=1 pid=1 pos=1 obj=16 op='TABLE ACCESS CLUSTER TS$ '
STAT #2 id=3 cnt=1 pid=2 pos=1 obj=7 op='INDEX UNIQUE SCAN I_TS# '
=====================
PARSING IN CURSOR #2 len=122 dep=1 uid=0 oct=3 lid=0 tim=1013850387 hv=3129366963 ad='1762425c'
select blocks,NVL(ts#,-1),status$,NVL(relfile#,0),maxextend,inc, crscnwrp,crscnbas,NVL(spare1,0) from file$ where file#=:1
END OF STMT
PARSE #2:c=0,e=719,p=0,cr=0,cu=0,mis=1,r=0,dep=1,og=0,tim=1013850376
EXEC #2:c=15625,e=571,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,tim=1013879403
FETCH #2:c=0,e=24,p=0,cr=1,cu=0,mis=0,r=0,dep=1,og=4,tim=1013885576
STAT #2 id=1 cnt=0 pid=0 pos=1 obj=17 op='TABLE ACCESS BY INDEX ROWID FILE$ '
STAT #2 id=2 cnt=0 pid=1 pos=1 obj=41 op='INDEX UNIQUE SCAN I_FILE1 '
=====================
PARSING IN CURSOR #2 len=189 dep=1 uid=0 oct=2 lid=0 tim=1013905310 hv=898408886 ad='16a20920'
insert into file$ (file#,blocks,ts#,status$,relfile#,maxextend,inc,crscnwrp,crscnbas,spare1) values (:1,:2,DECODE(:3,-1,NULL,:3),:4, DECODE(:5,0,NULL,:5),:6,:7,:8,:9,DECODE(:10,0,NULL,:10))
END OF STMT
PARSE #2:c=0,e=775,p=0,cr=0,cu=0,mis=1,r=0,dep=1,og=0,tim=1013905299
EXEC #2:c=0,e=615,p=0,cr=1,cu=5,mis=0,r=1,dep=1,og=4,tim=1013936351
=====================
PARSING IN CURSOR #2 len=102 dep=1 uid=0 oct=3 lid=0 tim=1013942726 hv=299084576 ad='16a1e094'
select /*+ INDEX_ASC(file$ i_file2) */ relfile# from file$ where ts#=:1 and relfile# between :2 and :3
END OF STMT
PARSE #2:c=0,e=109,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,tim=1013942708
EXEC #2:c=0,e=68,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,tim=1013975213
FETCH #2:c=0,e=35,p=0,cr=1,cu=0,mis=0,r=0,dep=1,og=4,tim=1013981540
STAT #2 id=1 cnt=0 pid=0 pos=1 obj=0 op='FILTER '
STAT #2 id=2 cnt=0 pid=1 pos=1 obj=42 op='INDEX RANGE SCAN I_FILE2 '
=====================
PARSING IN CURSOR #2 len=182 dep=1 uid=0 oct=6 lid=0 tim=1014000937 hv=910208921 ad='16a1a3ac'
update file$ set blocks=:2,ts#=DECODE(:3,-1,NULL,:3),status$=:4, relfile#=DECODE(:5,0,NULL,:5),maxextend=:6,inc=:7,crscnwrp=:8,crscnbas=:9,spare1=DECODE(:10,0,NULL,:10)where file#=:1
END OF STMT
PARSE #2:c=0,e=75,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,tim=1014000927
EXEC #2:c=0,e=613,p=0,cr=1,cu=3,mis=0,r=1,dep=1,og=4,tim=1014038211
STAT #2 id=1 cnt=1 pid=0 pos=1 obj=0 op='UPDATE '
STAT #2 id=2 cnt=1 pid=1 pos=1 obj=41 op='INDEX UNIQUE SCAN I_FILE1 '
=====================
PARSING IN CURSOR #2 len=182 dep=1 uid=0 oct=6 lid=0 tim=1014215321 hv=910208921 ad='16a1a3ac'
update file$ set blocks=:2,ts#=DECODE(:3,-1,NULL,:3),status$=:4, relfile#=DECODE(:5,0,NULL,:5),maxextend=:6,inc=:7,crscnwrp=:8,crscnbas=:9,spare1=DECODE(:10,0,NULL,:10)where file#=:1
END OF STMT
PARSE #2:c=0,e=85,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,tim=1014215310
EXEC #2:c=0,e=223,p=0,cr=1,cu=1,mis=0,r=1,dep=1,og=4,tim=1014248880
STAT #2 id=1 cnt=1 pid=0 pos=1 obj=0 op='UPDATE '
STAT #2 id=2 cnt=1 pid=1 pos=1 obj=41 op='INDEX UNIQUE SCAN I_FILE1 '
there are insert update on ts$ file$,it seem session who create tablespace write records into controlfile.Am I right?
eager to wait your response.
thanks
September 17, 2004 - 8:44 am UTC
ok, i'm not going to *show* the entire test -- but i'll describe it.
i erased my control files. So, any new process that wanted to read or write them would not find them (but the backgrounds would still have them open -- the backgrounds would be able to read and write them -- this is linux, might not work on windows).
I then logged in (created my dedicated server) and created a tablespace.
Alert log shows:
Fri Sep 17 08:24:28 2004
create tablespace t
Fri Sep 17 08:24:49 2004
Errors in file /home/ora9ir2/admin/ora9ir2/udump/ora9ir2_ora_11552.trc:
ORA-00603: ORACLE server session terminated by fatal error
ORA-00210: cannot open the specified controlfile
ORA-00202: controlfile: '/home/ora9ir2/oradata/ora9ir2/control01.ctl'
ORA-27041: unable to open file
Linux Error: 2: No such file or directory
Additional information: 3
ORA-00210: cannot open the specified controlfile
ORA-00202: controlfile: '/home/ora9ir2/oradata/ora9ir2/control01.ctl'
ORA-27041: unable to open file
Linux Error: 2: No such file or directory
Additional information: 3
Fri Sep 17 08:25:01 2004
it was my sessions dedicated server trying to write to it. The oracle process associated with my session.
Now, off to fix my database...