7 Replies Latest reply: Sep 14, 2012 1:42 AM by user11978261 RSS

    Getting ORA-01031 while connect target

    user11978261
      Hi,

      I'm trying to perform a rman duplictate.

      I've created the orapwd file and setted the remote_login_passwordfile parameter as "EXCLUSIVE". I also have configured the connection to the target database on the tnsnames.ora file

      I'm getting this error:

      [server]> rman


      RMAN> CONNECT TARGET system/iwjIGPE@TARGET_DB

      RMAN-00571: ======================================
      RMAN-00569: ==== ERROR MESSAGE STACK FOLLOWS ===========
      RMAN-00571: ======================================
      ORA-01031: insufficient privileges

      RMAN> exit

      Recovery Manager complete.




      .... But I can connect remotely though sqlplus:


      [server]> sqlplus system/iwjIGPE@TARGET_DB

      SQL*Plus: Release 11.2.0.2.0 Production on Thu Sep 13 13:04:32 2012

      Copyright (c) 1982, 2010, Oracle. All rights reserved.


      Connected to:
      Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production


      SQL> exit


      thanks for your help!
        • 1. Re: Getting ORA-01031 while connect target
          mseberg
          Hello;

          It should be like this : ( SYS not SYSTEM ) Also on Oracle 11 you need to move the password file and rename it.
          rman target sys/password@PRIMARY auxiliary /
          Regular duplication

          http://www.visi.com/~mseberg/diff_database_duplicating.html

          My short notes ( for datagaurd )

          http://www.visi.com/~mseberg/duprman2.html

          Best Regards

          mseberg

          Edited by: mseberg on Sep 13, 2012 6:19 AM
          • 2. Re: Getting ORA-01031 while connect target
            kuljeet singh -
            sqlplus system/iwjIGPE@TARGET_DB
            make connection with sys
            or
            can you check,
            select * from v$pwfile_users;

            if system user not present then grant
            grant sysdba to system;
            • 3. Re: Getting ORA-01031 while connect target
              Shivananda Rao
              RMAN> CONNECT TARGET system/iwjIGPE@TARGET_DB

              RMAN-00571: ======================================
              RMAN-00569: ==== ERROR MESSAGE STACK FOLLOWS ===========
              RMAN-00571: ======================================
              ORA-01031: insufficient privileges
              You aren't running RMAN through a privilieged user SYS with role SYSDBA. RMAN can be used by SYS user to carry out its features.
              [server]> sqlplus system/iwjIGPE@TARGET_DB

              SQL*Plus: Release 11.2.0.2.0 Production on Thu Sep 13 13:04:32 2012

              Copyright (c) 1982, 2010, Oracle. All rights reserved.
              Connected to:
              Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
              SQL> exit
              Connecting to a database and using it from any user is possible but not the case with RMAN.
              • 4. Re: Getting ORA-01031 while connect target
                user11978261
                Hi again!

                I'm trying to follow the steps you propose:



                [server]> rman target sys/c9vhLZT0@TARGET_DB auxiliary /

                Recovery Manager: Release 11.2.0.2.0 - Production on Thu Sep 13 13:29:07 2012

                Copyright (c) 1982, 2009, Oracle and/or its affiliates. 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-01017: invalid username/password; logon denied


                I'm sure that the password is correct. I've re-created the password file and the error continues.


                I'm still able to connect from sqlplus ...

                [server]> echo $ORACLE_SID
                AUX

                [server]> sqlplus

                SQL*Plus: Release 11.2.0.2.0 Production on Thu Sep 13 13:31:35 2012

                Copyright (c) 1982, 2010, Oracle. All rights reserved.

                Enter user-name: sys@TARGET_DB as sysdba
                Enter password:

                Connected to:
                Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production

                SQL >



                I've granted the sysdba role to system:

                SYS @ TARGET_DB > select * from v$pwfile_users;

                USERNAME SYSDB SYSOP SYSAS
                ------------------------------ ----- ----- -----
                SYS TRUE TRUE FALSE
                SYSTEM TRUE FALSE FALSE


                I'm not able to connect either with sys not with system users

                Thanks a lot

                Edited by: user11978261 on Sep 13, 2012 4:41 AM
                • 5. Re: Getting ORA-01031 while connect target
                  mseberg
                  Hello again;

                  Please read the details of this carefully. I use this weekly without issue :

                  http://www.visi.com/~mseberg/diff_database_duplicating.html

                  Notice if you create the password file or recreate the password file you need to SCP it to remote host and rename it.

                  Best Regards

                  mseberg
                  • 6. Re: Getting ORA-01031 while connect target
                    CKPT
                    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-01017: invalid username/password; logon denied
                    Try as below using quotes.
                    $rman target "sys/c9vhLZT0@TARGET_DB" auxiliary /
                    • 7. Re: Getting ORA-01031 while connect target
                      user11978261
                      Hello,

                      The problem has been solved. I think the reason was that the TARGET database is an RAC database, and I forgot to create the password file in the 2nd instance.

                      I've created the password file in both nodes and followed the instructions given by
                      mseberg (really helpful) and now I can connect to TARGET_DB.

                      ...... Let's perform the duplicate .....


                      Thanks a lot