使用RMAN做duplicate遇到ORA-12514和ORA-01031

ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
--这个很明显是监听文件配置的问题,首先查看口令文件,如果没有先建立
orapwd file='$ORACLE_HOME/dbs/orapw$ORACLE_SID' password=oracle entries=10 force=y

再查看
SQL> show parameter pass
NAME                      TYPE   VALUE
--------------------- ----------- ------------------------------
remote_login_passwordfile string NONE --如果不是EXCLUSIVE需要修改spfile

SQL> alter system set remote_login_passwordfile=exclusive scope=spfile;

如果还是不行那就应该是listener.ora的格式问题,以防万一还是先查看下tnsnames.ora格式
tnsnames.ora
ORCL =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = rac1.localdomain)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = ORCL)
    )
  )

listener.ora
SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1)
      (PROGRAM = extproc)
    )
    (SID_DESC =
      (GOLBAL_DBNAME = ETMCDB)
      (ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1)
      (SID_NAME = ETMCDB)
    )

  )

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
      (ADDRESS = (PROTOCOL = TCP)(HOST = rac1.localdomain)(PORT = 1521))
    )
  )
修改好后问题解决,随后遇到 ORA-01031: insufficient privileges
出现这种问题可能性我遇到两个
①有人说需要配置这个sqlnet.ora
SQLNET.AUTHENTICATION_SERVICES= (NTS)--但是这个带来影响就是,它表示采用os认证sqlplus / as sysdba在unix下会有问题
②我最后的解决是正确赋予用户权限重点就是rman需要sysdba

你可能感兴趣的:(使用RMAN做duplicate遇到ORA-12514和ORA-01031)