you're reading...
Grid Control / Oracle Enterprise Manager

Grid Control — Adding Target: a Standby Database

In Grid Control adding a database target is pretty straightforward. You go to the home page of the host, on which your database is running, and click on “Targets” tab. Then by clicking on the agent link you come to the agent home page. In “Monitored Targets” section you can add a new database target, or re-configure existing targets. Following the screen prompts and entering  correct configurations you are done.

However if you have a Data Guard configuration with primary and standby databases and you want to add them into your Grid Control system as targets, you may encounter ORA-1033 and/or ORA-1017 errors with the standby database. Below screenshot shows the error when clicking “Test Connection” button after entering configurations.

Looking at the configuration we can see we specified database user DBSNMP to connect to the database as Noraml role. Since this is a standby database, i.e. not opened to public, an ORA-1033 happens when trying to connect. Now if we correct it by changing the logging role as SYSDBA, we still get an error of ORA-1017, invalid username/password, as shown below.

This is because user DBSNMP does not have SYSDBA role. Perform following steps to fix this problem.

1) In the primary database grant SYSDBA to user DBSNMP

SQL> grant sysdba to dbsnmp;

2) Verify it does have the role.

 SQL> SELECT * FROM v$pwfile_users WHERE sysdba=’TRUE’;

USERNAME                       SYSDB SYSOP SYSAS

——————————        —–         —–        —–

SYS                                      TRUE     TRUE    FALSE

DBSNMP                             TRUE      FALSE FALSE

3) Copy the password file from the primary host to the standby host

4) Come back to Grid Control and click Test Connection button again. This time it does not have any error.


About Hong Wang

I am an Oracle DBA, working in Oracle database since version 7.3. Worked in both application development and production support. Many experiences in real world complicate problems and database projects. This blog serves as a collections of notes I write on my database studies as well as issues I encountered/solved. Your comments are well welcome.


3 thoughts on “Grid Control — Adding Target: a Standby Database

  1. Hi, can you provide more info on how to copy the password file from primary to standby, for “active” DG physical standby database environment, i.e., primary database is up and running, and standby is receiving and applying logs. I’m trying to add standby databases to OEM, the previous team created these standby databases manually.


    Posted by Shannon Liu | September 16, 2013, 2:45 pm
    • Hi, I failed to mention that copying of an “active” password file fails with “invalid argument”, and a simple file command returns: cannot open for reading. Thanks.

      Posted by Shannon Liu | September 16, 2013, 2:46 pm
  2. Hi,
    You can just use scp to copy database password file from one server to another.
    I am not sure what you meant by “active password file”. Database password file, after created, is only updated by oracle when you grant users with SYSDBA privilege, or when you change SYS’s password. Before copying it to the remote server you should make sure it is a valid one by testing it through logging in as sysdba with SQLNet. You can always re-create it if the current one is corrupted.

    Hope this helps.

    Posted by hongwang | September 17, 2013, 2:00 pm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: