|
|
|
|
Re: Urgent help need .... backup/restore with RMAN from another host ... [message #210173 is a reply to message #210165] |
Tue, 19 December 2006 15:38 |
hqz0808
Messages: 10 Registered: December 2006 Location: California
|
Junior Member |
|
|
Hi, Dear Mahesh,
You are expert!
The tns entry at remote host.
tnsnames under the directory of oracle\product\10.1.0\DB_1\NETWORK\ADMIN, showed as followings:
ORCL.LEEQALAB.NET =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = apertonet-im068y)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
I took the apertonet-im068y as the tns entry and issued with
rman target scott/tiger@apertonet-im068y
It worked ...
Thanks a lot, Mahesh!
Another question is that:
In order to run RMAN at the java application host2, I should also install Oracle 10g at host2 even we have Oracle DB server at host1, shouldn't I?
If I do not want to install Oracle DB server at host2, how can I issue RMAN command and do the backup/restore DB at host1? Do you have better way to simplify the procedure? Thanks again.
Cheers,
Hans
BTW,
I am not Oracle DBA, this is my first time to touch the backup/restore via RMAN. Surely, I'll keep reading and try to become a qualified DBA ASAP
If you have any JAVA question, I'd like to help you for sure
====
the tns entry should be the remote
>> rman target sys/sys@10.10.10.1/orcl
Wrong syntax.
use a tns entry (whatever you prefer in tnsnames.ora).
if my tnsentry is orcl then i would login as
rman target sys/sys@orcl
|
|
|
|
Re: Help need .... backup/restore with RMAN from another host ... [message #210209 is a reply to message #210188] |
Tue, 19 December 2006 18:57 |
hqz0808
Messages: 10 Registered: December 2006 Location: California
|
Junior Member |
|
|
Hi, Mahesh,
I tried to use the rman command:
rman target scott/tiger@ORCL.LEEQALAB.NET
It did not work, any reason or need more configuration of enviroment parameter at host1 (DB server)?
As I described to you before, we have two hosts: host1 (DB server, IP: 10.10.10.1) and host2 (app server, IP: 10.10.10.2)
The key thing for us is:
1) Do the RMAN backup/recovery/restore against DB server at host1
Based on app server2 at host2, we need to have all the files such as datafile, controlfile, spfile, redo logs and so on backed up at host2. And later on restore from host2 as well. Basically, host1 run the DB server only, all backup/restore related things will happened at host2.
2) At host2, we need to have a RMAN connection to DB server at host1.
3) As long as RMAN connection set up, all the RAMN things will be processed properly. As long as we successfully issued all RMAN commands one by one, we'll wrap the commands into application. (You do have to worry about it ...
Cheers,
Hans
|
|
|
|
Re: Help need .... backup/restore with RMAN from another host ... [message #210665 is a reply to message #210214] |
Thu, 21 December 2006 12:39 |
hqz0808
Messages: 10 Registered: December 2006 Location: California
|
Junior Member |
|
|
Hi, Mahesh,
Thanks for your reply.
I successfully issued almost all RMAN commands to recovery/ restore locally.
I also successfully connected to the remote DB server via sql*plus.
However, so far, I did not successfully connect to DB server via RMAN. And the listener did run at the DB server.
Can you please help me to resolve it with an example/workshop step by step? So that I can clearly figure out where is the root cause. Thanks.
Cheers,
Hans
|
|
|
Re: Help need .... backup/restore with RMAN from another host ... [message #210668 is a reply to message #210665] |
Thu, 21 December 2006 12:49 |
|
Mahesh Rajendran
Messages: 10708 Registered: March 2002 Location: oracleDocoVille
|
Senior Member Account Moderator |
|
|
There is nothing special here. Only the servernames and usernames/passwords are changed.
I am connecting from a client named mutation.
Target database (identified by tnsentry remoteDB) is residing in server A
Catalog Database (identified by tnsentry rmandb) is residing in
server B
oracle@mutation#rman
Recovery Manager: Release 9.2.0.7.0 - 64bit Production
Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.
RMAN> connect target sys/password@remoteDB
connected to target database: remoteDB (DBID=907585623)
RMAN> connect rcvcat rman/rman@rmandb
connected to recovery catalog database
Post what you did (exact session) along with your tnsnames.ora in the remote server and listener.ora in database server.
[Updated on: Thu, 21 December 2006 12:49] Report message to a moderator
|
|
|
Re: Help need .... backup/restore with RMAN from another host ... [message #210674 is a reply to message #210668] |
Thu, 21 December 2006 13:46 |
hqz0808
Messages: 10 Registered: December 2006 Location: California
|
Junior Member |
|
|
Hi, Mahesh,
Thanks for quick reply!
Followings are the listener and tnsnames for dbsrv and appsrv:
1) DB server identified by dbsrv (IP address: 172.16.21.5):
============ listener:
# LISTENER.ORA Network Configuration File: C:\oracle\product\10.1.0\Db_1\network\admin\listener.ora
# Generated by Oracle configuration tools.
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = apertone-im068y)(PORT = 1521))
)
)
)
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = C:\oracle\product\10.1.0\Db_1)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL_DBNAME = leelab)
(ORACLE_HOME = C:\oracle\product\10.1.0\Db_1)
(SID_NAME = leelab)
)
(SID_DESC =
(GLOBAL_DBNAME = orcl)
(ORACLE_HOME = C:\oracle\product\10.1.0\Db_1)
(SID_NAME = orcl)
)
)
============ tnsnames =====================
# TNSNAMES.ORA Network Configuration File: C:\oracle\product\10.1.0\Db_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.
INST1_HTTP.LEEQALAB.NET =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = apertone-im068y)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = SHARED)
(SERVICE_NAME = MODOSE)
(PRESENTATION = http://HRService)
)
)
ORCL.LEEQALAB.NET =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = apertone-im068y)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
EXTPROC_CONNECTION_DATA.LEEQALAB.NET =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
LEELAB.LEEQALAB.NET =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = apertone-im068y)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = leelab)
)
)
2) Application server identified by appsrv (IP address: 192.168.2.159)
============= listener =============
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = C:\oracle\app\oracle\product\10.2.0\server)
(PROGRAM = extproc)
)
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = C:\oracle\app\oracle\product\10.2.0\server)
(PROGRAM = extproc)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
(ADDRESS = (PROTOCOL = TCP)(HOST = hzhang-dt.apertonet.com)(PORT = 1521))
)
)
DEFAULT_SERVICE_LISTENER = (XE)
============== rnsnames ===============
XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = hzhang-dt.apertonet.com)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
)
)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
3) What I did from appsrv (use the tns entry as you suggested):
(i) rman target scott/tiger@ORCL.LEEQALAB.NET
---- FAILED
C:\XEClient\bin>rman target scott/tiger@ORCL.LEEQALAB.NET
Recovery Manager: Release 10.2.0.1.0 - Production on Thu Dec 21 11:36:57 2006
Copyright (c) 1982, 2005, Oracle. All rights reserved.
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00554: initialization of internal recovery manager package failed
RMAN-04005: error from target database:
ORA-12154: TNS:could not resolve the connect identifier specified
(ii) sqlplus scott/tiger@172.16.21.5/orcl
----SUCCESSFUL
C:\XEClient\bin>sqlplus scott/tiger@172.16.21.5/orcl
SQL*Plus: Release 10.2.0.1.0 - Production on Thu Dec 21 11:38:45 2006
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.1.0 - Production
SQL>
|
|
|
|
Re: Help need .... backup/restore with RMAN from another host ... [message #210699 is a reply to message #210678] |
Thu, 21 December 2006 18:48 |
hqz0808
Messages: 10 Registered: December 2006 Location: California
|
Junior Member |
|
|
Hi, Mahesh,
Thanks again.
Still, it did not work.
I copied some entries of tnsnames.ora from dbsrv to appsrv. However, it complained "Credential retrieval failed". See the details as followings:
C:\XEClient\bin>rman target scott/tiger@ORCL.LEEQALAB.NET
Recovery Manager: Release 10.2.0.1.0 - Production on Thu Dec 21 16:37:34 2006
Copyright (c) 1982, 2005, Oracle. All rights reserved.
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00554: initialization of internal recovery manager package failed
RMAN-04005: error from target database:
ORA-12638: Credential retrieval failed
tried out copy the
Copy the tnsnames.ora from dbserver to applicationserver.
You have not configured your tnsnames.ora in application server (treated like a client).
Quote:
...
Thanks.
+++++++++++++
XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = hzhang-dt.apertonet.com)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
)
)
INST1_HTTP.LEEQALAB.NET =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = apertone-im068y)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = SHARED)
(SERVICE_NAME = MODOSE)
(PRESENTATION = http://HRService)
)
)
ORCL.LEEQALAB.NET =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = apertone-im068y)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
EXTPROC_CONNECTION_DATA.LEEQALAB.NET =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
LEELAB.LEEQALAB.NET =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = apertone-im068y)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = leelab)
)
)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
|
|
|
|
Re: Help need .... backup/restore with RMAN from another host ... [message #210705 is a reply to message #210700] |
Thu, 21 December 2006 21:31 |
hqz0808
Messages: 10 Registered: December 2006 Location: California
|
Junior Member |
|
|
Great!
I reinstalled the Oracle DB with same version at dbsrv, instead of using the hostname, use the host ip address and SID. The complete remote DB backup/restore was successfully accomplished via RMAN.
Thanks a lot, Mahesh.
Cheers,
Hans
+++++++++++++++++++++++++++
C:\XEClient\bin>rman target rman2/rman2@10.102.1.1/xe
Recovery Manager: Release 10.2.0.1.0 - Production on Thu Dec 21 18:08:18 2006
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: XE (DBID=2490195132)
RMAN> run {allocate channel backup_12_20 type disk; backup full tag full_db_backup_dec_21_2006 format "c:/orac
le/oradata/backups/db_t%t_s%s_p%p" database; release channel backup_12_20;}
using target database control file instead of recovery catalog
allocated channel: backup_12_20
channel backup_12_20: sid=19 devtype=DISK
Starting backup at 21-DEC-06
channel backup_12_20: starting full datafile backupset
channel backup_12_20: specifying datafile(s) in backupset
input datafile fno=00001 name=C:\ORACLE\ORADATA\XE\SYSTEM.DBF
input datafile fno=00003 name=C:\ORACLE\ORADATA\XE\SYSAUX.DBF
input datafile fno=00002 name=C:\ORACLE\ORADATA\XE\UNDO.DBF
input datafile fno=00004 name=C:\ORACLE\ORADATA\XE\USERS.DBF
input datafile fno=00005 name=C:\ORACLE\ORADATA\RMAN_TS.DBF
channel backup_12_20: starting piece 1 at 21-DEC-06
channel backup_12_20: finished piece 1 at 21-DEC-06
piece handle=C:\ORACLE\ORADATA\BACKUPS\DB_T609791011_S3_P1 tag=FULL_DB_BACKUP_DEC_21_2006 comment=NONE
channel backup_12_20: backup set complete, elapsed time: 00:04:16
channel backup_12_20: starting full datafile backupset
channel backup_12_20: specifying datafile(s) in backupset
including current control file in backupset
including current SPFILE in backupset
channel backup_12_20: starting piece 1 at 21-DEC-06
channel backup_12_20: finished piece 1 at 21-DEC-06
piece handle=C:\ORACLE\ORADATA\BACKUPS\DB_T609791267_S4_P1 tag=FULL_DB_BACKUP_DEC_21_2006 comment=NONE
channel backup_12_20: backup set complete, elapsed time: 00:00:16
Finished backup at 21-DEC-06
released channel: backup_12_20
RMAN>
|
|
|
|
Re: Help need .... backup/restore with RMAN from another host ... [message #210872 is a reply to message #210764] |
Fri, 22 December 2006 18:41 |
hqz0808
Messages: 10 Registered: December 2006 Location: California
|
Junior Member |
|
|
Thanks again, Mahesh. It's done:
RMAN> run {allocate channel online_log_backup type disk; sql"alter system archive log current"; backup format
"/oracle/oradata/backups/log_t%t_s%s_p%p" (archivelog from time "sysdate-1" all delete input); release channel
online_log_backup;}
allocated channel: online_log_backup
channel online_log_backup: sid=19 devtype=DISK
sql statement: alter system archive log current
Starting backup at 22-DEC-06
current log archived
channel online_log_backup: starting archive log backupset
channel online_log_backup: specifying archive log(s) in backup set
input archive log thread=1 sequence=10 recid=1 stamp=609804023
input archive log thread=1 sequence=11 recid=2 stamp=609871126
input archive log thread=1 sequence=12 recid=3 stamp=609871128
channel online_log_backup: starting piece 1 at 22-DEC-06
channel online_log_backup: finished piece 1 at 22-DEC-06
piece handle=C:\ORACLE\ORADATA\BACKUPS\LOG_T609871133_S17_P1 tag=TAG20061222T163848 comment=NONE
channel online_log_backup: backup set complete, elapsed time: 00:00:08
channel online_log_backup: deleting archive log(s)
archive log filename=C:\ORACLE\APP\ORACLE\FLASH_RECOVERY_AREA\XE\ARCHIVELOG\2006_12_21\O1_MF_1_10_2RPX3LNV_.AR
C recid=1 stamp=609804023
archive log filename=C:\ORACLE\APP\ORACLE\FLASH_RECOVERY_AREA\XE\ARCHIVELOG\2006_12_22\O1_MF_1_11_2RRYNN3W_.AR
C recid=2 stamp=609871126
archive log filename=C:\ORACLE\APP\ORACLE\FLASH_RECOVERY_AREA\XE\ARCHIVELOG\2006_12_22\O1_MF_1_12_2RRYNQPF_.AR
C recid=3 stamp=609871128
Finished backup at 22-DEC-06
released channel: online_log_backup
|
|
|