Oracle: verschil tussen versies
Uit Documents
| Regel 27: | Regel 27: | ||
Netbackup server was unable to resolve clients ip address. Added an entry to the /etc/hosts file and the issue was solved.<ref>http://www.symantec.com/business/support/index?page=content&id=TECH57313</ref> | Netbackup server was unable to resolve clients ip address. Added an entry to the /etc/hosts file and the issue was solved.<ref>http://www.symantec.com/business/support/index?page=content&id=TECH57313</ref> | ||
| + | |||
| + | === Make disk backup === | ||
| + | <syntaxhighlight lang="sql"> | ||
| + | rman target /(@sid) NOCATALOG | ||
| + | RUN { | ||
| + | ALLOCATE CHANNEL d1 DEVICE TYPE DISK FORMAT '<location>/bck_%s_%p_%t'; | ||
| + | ALLOCATE CHANNEL d2 DEVICE TYPE DISK FORMAT '<location>/bck_%s_%p_%t'; | ||
| + | BACKUP DATABASE PLUS ARCHIVELOG; | ||
| + | RELEASE CHANNEL d2; | ||
| + | RELEASE CHANNEL d1; | ||
| + | } | ||
| + | |||
| + | RUN { | ||
| + | ALLOCATE CHANNEL d1 DEVICE TYPE DISK FORMAT '<location>/cntrl_%s_%p_%t'; | ||
| + | BACKUP CURRENT CONTROLFILE (FOR STANDBY); | ||
| + | RELEASE CHANNEL d1; | ||
| + | } | ||
| + | </syntaxhighlight> | ||
| + | |||
| + | === Restore disk backup === | ||
| + | |||
| + | <syntaxhighlight lang="sql"> | ||
| + | SQL> startup nomount; | ||
| + | RMAN> RESTORE CONTROLFILE FROM '<location>'; | ||
| + | SQL> alter database mount; | ||
| + | RMAN> RESTORE DATABASE; | ||
| + | </syntaxhighlight> | ||
| + | |||
| + | === Make backup using Netbackup === | ||
| + | |||
| + | <syntaxhighlight lang="sql"> | ||
| + | rman target /(@sid) NOCATALOG | ||
| + | RUN { | ||
| + | ALLOCATE CHANNEL t1 DEVICE TYPE 'SBT_TAPE' parms="ENV=(NB_ORA_POLICY=<POLICY>,NB_ORA_SERV=<BACKUP_SERVER>, NB_ORA_CLIENT=<CLIENT_NAME>)"; | ||
| + | BACKUP FORMAT 'bk_%s_%p_%t' DATABASE; | ||
| + | RELEASE CHANNEL t1; | ||
| + | } | ||
| + | |||
| + | RUN { | ||
| + | ALLOCATE CHANNEL t1 DEVICE TYPE 'SBT_TAPE' parms="ENV=(NB_ORA_POLICY=<POLICY>,NB_ORA_SERV=<BACKUP_SERVER>, NB_ORA_CLIENT=<CLIENT_NAME>)"; | ||
| + | BACKUP FORMAT 'al_%s_%p_%t' ARCHIVELOG ALL; | ||
| + | RELEASE CHANNEL t1; | ||
| + | } | ||
| + | |||
| + | RUN { | ||
| + | ALLOCATE CHANNEL t1 DEVICE TYPE 'SBT_TAPE' parms="ENV=(NB_ORA_POLICY=<POLICY>,NB_ORA_SERV=<BACKUP_SERVER>, NB_ORA_CLIENT=<CLIENT_NAME>)"; | ||
| + | BACKUP FORMAT 'cntrl_%s_%p_%t' CURRENT CONTROLFILE (FOR STANDBY); | ||
| + | RELEASE CHANNEL t1; | ||
| + | } | ||
| + | </syntaxhighlight> | ||
== References == | == References == | ||
<references /> | <references /> | ||
Versie van 9 aug 2011 om 10:00
Inhoud
Startup / Shutdown
Login to SQL prompt:
sqlplus / as sysdbaStartup normally
SQL> startup;Startup without actually mounting
SQL> startup nomount;Use additional initialization file:
SQL> startup nomount pfile='/path/to/init.ora';Shutdown:
SQL> shutdown;Shutdown and terminate existing connections
SQL> shutdown immediate;Shutdown and abort everything (last resort):
SQL> shutdown abort;RMAN
Segmentation Fault while running sbttest
Netbackup server was unable to resolve clients ip address. Added an entry to the /etc/hosts file and the issue was solved.[1]
Make disk backup
rman target /(@sid) NOCATALOG
RUN {
ALLOCATE CHANNEL d1 DEVICE TYPE DISK FORMAT '<location>/bck_%s_%p_%t';
ALLOCATE CHANNEL d2 DEVICE TYPE DISK FORMAT '<location>/bck_%s_%p_%t';
BACKUP DATABASE PLUS ARCHIVELOG;
RELEASE CHANNEL d2;
RELEASE CHANNEL d1;
}
RUN {
ALLOCATE CHANNEL d1 DEVICE TYPE DISK FORMAT '<location>/cntrl_%s_%p_%t';
BACKUP CURRENT CONTROLFILE (FOR STANDBY);
RELEASE CHANNEL d1;
}Restore disk backup
SQL> startup nomount;
RMAN> RESTORE CONTROLFILE FROM '<location>';
SQL> alter database mount;
RMAN> RESTORE DATABASE;Make backup using Netbackup
rman target /(@sid) NOCATALOG
RUN {
ALLOCATE CHANNEL t1 DEVICE TYPE 'SBT_TAPE' parms="ENV=(NB_ORA_POLICY=<POLICY>,NB_ORA_SERV=<BACKUP_SERVER>, NB_ORA_CLIENT=<CLIENT_NAME>)";
BACKUP FORMAT 'bk_%s_%p_%t' DATABASE;
RELEASE CHANNEL t1;
}
RUN {
ALLOCATE CHANNEL t1 DEVICE TYPE 'SBT_TAPE' parms="ENV=(NB_ORA_POLICY=<POLICY>,NB_ORA_SERV=<BACKUP_SERVER>, NB_ORA_CLIENT=<CLIENT_NAME>)";
BACKUP FORMAT 'al_%s_%p_%t' ARCHIVELOG ALL;
RELEASE CHANNEL t1;
}
RUN {
ALLOCATE CHANNEL t1 DEVICE TYPE 'SBT_TAPE' parms="ENV=(NB_ORA_POLICY=<POLICY>,NB_ORA_SERV=<BACKUP_SERVER>, NB_ORA_CLIENT=<CLIENT_NAME>)";
BACKUP FORMAT 'cntrl_%s_%p_%t' CURRENT CONTROLFILE (FOR STANDBY);
RELEASE CHANNEL t1;
}