Oracle新手備份問題(兩個問題)
問題1:我想學習使用Rman的方法備份和恢複資料庫,從網上和書上看到,得知需要該資料庫的Log_mode
為archivelog模式,而我的模式如下:
SQL> select dbid,name,log_mode,current_scn from v$database;
DBID NAME LOG_MODE CURRENT_SCN
---------- --------- ------------ -----------
3574435446 EMS NOARCHIVELOG 12605597
我該如何將LOG_MODE變為archivelog?
問題2:若我有兩個資料庫案例一個為ems,一個是domo
目前我正在使用的是ems,想變成domo,是不是需要修改如下參數,操作步驟如下:
1)regedit,將“資料庫名”設為預設服務(共有二個服務):HKEY_LOCAL_MACHINE|SOFTWARE|
ORACLE|HOME0下的ORACLE_SID項的值改為“資料庫名”,將ems修改為domo
2)修改tnsnames.ora檔案,例子如下:
DEMO =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.79)(PORT =
1521))
)
(CONNECT_DATA =
(SERVICE_NAME = demo)
)
(SERVER=DEDICATED)
)
我想問的是這樣就完了?還需不需要修改listener.ora檔案如下
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = D:\oracle\product\10.1.0\db_1)
(PROGRAM = extproc)
)
)
(SID_DESC =
(GLOBAL_DBNAME = EMS)
(ORACLE_HOME = D:\oracle\product\10.1.0\db_1)
(SID_NAME = EMS)
)
將EMS修改為domo
待解決。。。 (解決辦法如下:)
問題1:
1.shutdown immediate;
2.startup mount;
3.alter database archivelog;
5.alter system set log_archive_start=true scope=spfile;
6.alter system set log_archive_dest='d:\backup' scope=spfile;
7.shutdown immediate;
8.startup;
9.select dbid,name,log_mode,current_scn from v$database;
問題2:
我想問的是這樣就完了?還需不需要修改listener.ora檔案如下
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = D:\oracle\product\10.1.0\db_1)
(PROGRAM = extproc)
)
)
(SID_DESC =
(GLOBAL_DBNAME = EMS)
(ORACLE_HOME = D:\oracle\product\10.1.0\db_1)
(SID_NAME = EMS)
)
將EMS修改為domo
在註冊表中加上demo執行個體即可
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = D:\oracle\product\10.1.0\db_1)
(PROGRAM = extproc)
)
)
(SID_DESC =
(GLOBAL_DBNAME = EMS)
(ORACLE_HOME = D:\oracle\product\10.1.0\db_1)
(SID_NAME = EMS)
(GLOBAL_DBNAME = demo)
(ORACLE_HOME = D:\oracle\product\10.1.0\db_1)
(SID_NAME = demo)
)