-
Can I use session set events for cold back up
I wanted to write a script for cold backup. The below is a part of script.
connect internal
set echo on;
alter database backup controlfile to '$ARCH_CTRL_DIR/control.ctl' reuse;
alter database backup controlfile to trace;
alter session set events '10400 trace name context forever, level 1';
shutdown immediate;
exit;
Can i use alter session ser events after I back up the control file or it should be be before backing up control file. What exactly does the alter session event does?
Thanks
-
if you are shutting down immaeditely after why are you tracing anything?
-
I am tracing so that I can use as a backup of control file trace file , for which i can use for restoring full db.
What would be the correct way to shutdown the database before taking a full backup( Runs in cron job).
-
well shutdown immediate is fine, but I still dont see the need to set events as there are no worthwhile events during a shutdown
Also there is no real need to backup the contol file either as your backup strategy should backup that as well - however it doesn hurt to take a backup to trace I suppose
-
Originally posted by prince_jr
I am tracing so that I can use as a backup of control file trace file , for which i can use for restoring full db.
What would be the correct way to shutdown the database before taking a full backup( Runs in cron job).
wtf, show me the value in setting that event
I'm stmontgo and I approve of this message
-
Originally posted by stmontgo
wtf, show me the value in setting that event
lol
Oracle it's not just a database it's a lifestyle!
--------------
BTW....You need to get a girlfriend who's last name isn't .jpg
-
Prince_jr,
You realy need to take a break for some time, grab the Oracle Concepts manual and read it cover to cover. After you've done that, grab Oracle Admin manual and read it from cover to cover. And after you've done that, grab Backup and Recovery manuals and read them from cover to cover.... Then perhaps things will be clearer.
With the script you showed us it's evident you don't have a clue about what you are doing (BTW, I don't mean anything bad with this remark - noone was born wise). Obviously you are a true beginner in DBA field, so forget about setting events and simmilar advanced stuff. Start with the basics, like understanding what does it mean to take a plain cold backup.
So for start, take away from your backup script two things, as they are totaly useless for what you are doing:
- alter database backup controlfile to '$ARCH_CTRL_DIR/control.ctl' reuse;
- alter session set events '10400 trace name context forever, level 1';
Jurij Modic
ASCII a stupid question, get a stupid ANSI
24 hours in a day .... 24 beer in a case .... coincidence?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|