Link to home
Start Free TrialLog in
Avatar of pbisht
pbisht

asked on

Oracle Management Server - Backup & Recovery

I have installed Oracle 9i server and client on my machine.  I am able to launch the Enterprise Manager Console as "standaline".  But, when I try to do backups, it tells me that I need to login to the Oracle Managment Server (OMS).

Does anyone know how to go about it?

I have tried putting in the default userid (sysman) and default password (oem_temp) and <SID>.<SERVER> as the management server.  But, I get this error -

VTK-1000 : Unable to connect to the management server <SID>.<SERVER>.  Please verify that you have entered the correct host name and the status of the Oracle Management Server.

Any help would be greatly appreciated!  Thanks.
Avatar of pbisht
pbisht

ASKER

oops... there's a mistake in my above description:

"standaline" is actually "standalone"

Thanks!
Without OEM you have to run your exports/backups manually using scripts for EXP.exe or RMAN.exe.

'Oracle Enterprise Manager' OEM is a 3-tier application available in the Product : Oracle9i Management and Integration. You have to create an OEM repository in a database, followed by installing the 'Oracle Management Server' (OMS) on the same or any other server that talks to the repository. Then you have to install the client part called 'Console' on your desktop that talks to the OMS.

Since you have the Database Server and Client on the same machine, I believe you would load the OMS on this machine too. Once you have it installed, you will see a service called 'OracleManagementServer'. Start the OMS from a command prompt by typing:
  oemctrl start oms
The default login name and password for the OMS is:
  sysman/oem_temp

Then start the console and connect to the repository database.

Avatar of pbisht

ASKER

Thanks for your response.  I will try your suggestion and let you know soon.  I'm fairly new to Oracle and pretty clueless!  I'll keep you updated.  Thanks.
Avatar of pbisht

ASKER

Hi SDutta,

I got OMS working and created a respository.  However, when I was trying to create a backup, I got error messages like "insufficient privileges" and "missing or invalid preferred credentials".  I started working on that, and now I seem to have lost the sysman password.  I had to change it from oem_temp to something else when I first logged in.  I logged in several times with the new password, but now it doesn't accept it any more.  Do you know how I can reset the password back to oem_temp or change it something else?

Thanks for your help and patience!

- Puja
Hi Puja,

Unless you have already noticed, SYSMAN is not defined as a user to Oracle, it is just inside OEM. If you created another OEM user with super admin rights, you can just login with that user and change sysman's password.

Otherwise, you must follow these steps:

* Start SQL*Plus and connect to EM repository database with the EM repository user (this is the schema owner of the repository) :
<emrepository>/<emrepository-pwd>@<em-repository>

* Once connected run :
execute smp_maintenance.reset_sysman();
The password will be changed back to oem_temp

Hope this helps.
SDutta
Avatar of pbisht

ASKER

Thanks for responding so promptly!


Before I read your message, I tried to shutdown and startup the database.  The shutdown was taking a long time and was terminated abnormally (via Task Manager>End Task).  When I tried to startup, this is the error message I get -

ORA-01081 Cannot start ORACLE that is already running - shut it down first

It seems to think that the shutdown is still in progress.  It does not let me resume shutdown process, either!


Also, when I try your suggestion to log on to SQL*Plus and connect as repository and try to reset the sysman password, I get this message:

SQL> execute smp_maintenance.reset_sysman();
BEGIN smp_maintenance.reset_sysman(); END;

*
ERROR at line 1:
ORA-06553: PLS-213: package STANDARD not accessible


Looks like I am getting myself deeper and deeper...

-Puja
Avatar of pbisht

ASKER

Thanks for responding so promptly!


Before I read your message, I tried to shutdown and startup the database.  The shutdown was taking a long time and was terminated abnormally (via Task Manager>End Task).  When I tried to startup, this is the error message I get -

ORA-01081 Cannot start ORACLE that is already running - shut it down first

It seems to think that the shutdown is still in progress.  It does not let me resume shutdown process, either!


Also, when I try your suggestion to log on to SQL*Plus and connect as repository and try to reset the sysman password, I get this message:

SQL> execute smp_maintenance.reset_sysman();
BEGIN smp_maintenance.reset_sysman(); END;

*
ERROR at line 1:
ORA-06553: PLS-213: package STANDARD not accessible


Looks like I am getting myself deeper and deeper...

-Puja
Hi Puja,

You should never end your oracle session from Task Manager. If you shutdown from SQLPlus and just say SHUTDOWN, it will wait for all connected sessions to terminate. You should do a SHUTDOWN IMMEDIATE or SHUTDOWN ABORT, the first one is a clean shutdown and the next is not. In your case you can still connect using SQLPlus and do a SHUTDOWN ABORT. The next time you do a STARTUP, recovery will be done and the database will come up cleanly.

Avatar of pbisht

ASKER

I am back up again.  I promise to myself - I'll never use Task Manager on Oracle again!

Situation right now is -
- Oracle Management Server is not started
    I tried to start it from Control Panel>Services
    and got this error:
    Could not start <Oracle Home>Management Server service
    Error 2140 : .. Windows NT internal error

- Obviously, I cannot log on to the Management Server

- I tried to reset sysman password from SQL*Plus
    Got this error while login:
    SQL> execute smp_maintenance.reset_sysman();
    BEGIN smp_maintenance.reset_sysman(); END;
 
    *
    ERROR at line 1:
    ORA-06553: PLS-213: package STANDARD not accessible

Any suggestions?  Thanks for all your help.
At this point, I would suggest this :

1. From SQL Plus SHUTDOWN IMMEDIATE your database.
2. Change the service OracleManagementServer to startup manually.
3. Reboot your machine.
4. Check that the service OracleService<sid> is started.
5. From SQL Plus connect as SYS 'AS SYSDBA' and STARTUP your database.
6. Rerun $ORACLE_HOME/rdbms/admin/catalog.sql and catproc.sql as the SYS user. This will recreate your standard system packages.
7. execute smp_maintenance.reset_sysman();
8. From a DOS session : oemctrl start oms

and so on ...

Avatar of pbisht

ASKER

I did the steps thru step#5.

At step#6, I tried to run $ORACLE_HOME/rdbms/admin/catalog.sql and catproc.sql as the SYS user

The way I did that is -
run $ORACLE_HOME/rdbms/admin/catalog.sql
and
run $ORACLE_HOME/rdbms/admin/catproc.sql

In either case, I got this error message:
SP2-0103: Nothing in SQL buffer to run.

I still went ahead and tried the next step -
exec smp_maintenance.reset_sysman();

...got this error message...
BEGIN smp_maintenance.reset_sysman(); END;

*
ERROR at line 1;
ORA-06553: PLS-213: package STANDARD not accessible


Am I doing anything wrong?  Any suggestions?  Thanks a ton for all this help and patience!

- Puja
Avatar of pbisht

ASKER

In case you were wondering...
I did replace $ORACLE_HOME with the Oracle home directory path on the server.

- P :o)
Hi Puja,

You cannot RUN a .sql script. Once you connect to sqlplus as SYS you can run the scripts like this :

C:\>sqlplus /nolog
Copyright info ....
SQL>connect sys@server as sysdba
Enter password:
Connected.
SQL>@c:\oracle\ora92\rdbms\admin\catalog.sql
....output....
SQL>@c:\oracle\ora92\rdbms\admin\catalog.sql
....output....

SQL>exec smp_maintenance.reset_sysman();

That should do it!
Avatar of pbisht

ASKER

Thanks ... I am going through it.

It looks good so far... will update you by tomorrow on full status!

Thanks a billion!
Avatar of pbisht

ASKER

Hi again, SDutta!

I was finally able to submit backup jobs, but the jobs are continuously failing.  I see the failures in the Jobs > History tab.  The reason for failure is:

VNI-2015 : The Node preferred credentials for the target node are either invalid or do not have sufficient privileges to complete the operation.
On Windows platforms, the Node credentials specified for the Windows target should have the "Logon as a batch job" privilege.

I have entered the preferred credentials for Database as well as Node as SYS/password.  Also, I am logged on as a domain administrator and I have checked to make sure that I have "Logon as a batch job" privilege.

What am I missing?

Thx!
Puja :o)
There are two separate privileges involved here. Windows privilege and Oracle privilege.

Windows requires "Logon as a batch job" be granted to the user which connects through OEM. The username for this is setup through the Console.

After connecting to the console, go to : System > Preferences > Preferred Credentials

In ServiceType NODE setup the usercode and password for Windows. In ServiceType DATABASE setup the usercode and password for Oracle.

You can now reschedule your jobs and events.
ASKER CERTIFIED SOLUTION
Avatar of SDutta
SDutta

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
By the way, connecting as a Domain administrator does not give you "Logon as a batch job" privilege. You have to grant it specifically from the "Administrative Tools" > "Local Security Settings" under "Local Policies" > "User Rights Assignment".

To make it simpler, you can grant it to the local administrators group which will also pass it on to a Domain administrator.

Avatar of pbisht

ASKER

I think I did that, but I will try again.  Thanks.  Will update you again.

- Puja :o)
Avatar of pbisht

ASKER

I was able to schedule a backup successfully.  However, when it starts running

1. If the Enterprise Manager (EM) console is open at the time when backup begins, I get a message that says ...

"The console was disconnected.. "

My choices are to -
"Relaunch Console" or "Cancel"

2. If I do not have EM console open when the backup begins, I do not get the message.

In both cases - the OMS service stops itself after backup is complete.  I have to start the service again and then log on to the EM console.  Also, I can see a new file in the location where I wanted to store the backups.  The process to backup doesn't take very long in case 1, but the sizes of the backup files are about equal (730MB) in both cases.

==========

Is that normal?  What if I have more than one job scheduled one after another?  If the OMS stops after one job is complete, how will the next job be executed?  Also, is it preferable to have the EM console closed while backups are going on?

Curiously,
Puja

Avatar of pbisht

ASKER

SDutta's comments were an immense help in getting this far!  Thanks a ton!

- Puja :o)
Hi Puja,

Your console will be disconnected anytime the OMS goes down. But the OMS should never go down by itself. You can keep connected to the console irrespective of how many jobs you have submitted. I can't really tell why your backup completion is causing the OMS to go down. There may be trace files etc., being produced which may point you to the reason. Also since you PAQ'd this question you could ask this as a separate question so that others may be able to answer it too.

Thanks
SDutta
Avatar of pbisht

ASKER

I will put that issue (OMS shutting itself down) up as a separate question.  

Do you have any advice on how I can check to see if the backups that have been created recently are actually good?  I could try and restore from one of the backups, but that would probably overwrite my existing data.  How could I test the backup without affecting my current data?

- Puja
You are correct in assuming that you can't really test the backups until you restore. And yes when you restore, it will overwrite your current database. For testing purposes you could install the same version of Oracle on another server and restore your backup there.
Avatar of pbisht

ASKER

Hmm... thanks.

That does make sense.  I will do that.  Thanks for all your help, SDutta.

- Puja :o)
Avatar of pbisht

ASKER

Hi SDutta,

Sorry to bug you... but, the topic is relevant and I cannot afford to wait for answers at this point.  Can I use the Export and/or Import utility if OMS is not installed and running?  I know that I don't need OEM to run Export or Import, but I don't think I can do it without OMS.  Am I right about this?

Also, there was a question about OMS at this site, maybe you would be interested in helping that person -
https://www.experts-exchange.com/questions/20584882/Startup-problems-with-OMS.html

Thanks for all your help!

- Puja
Export and Import are standalone Oracle utilities and do not need any other software (OEM or OMS) to run. Only the database has to be up and running. Both these utilities are documented in Oracle Server Utility User's Guide.

You can run EXP.EXE or IMP.EXE directly from a windows command prompt. If you want to see the online help, enter parameter -h.

Hi SDutta / Puja!
I have the same Q as Puja had earlier. I Posted my Q in this forum but didn't get a perfect answer!!
Can any one of u help me.
I'm sure Puja may now in a position to help me after going through the hard journey

I'm a newbie to Oracle DBA
I installed Oracle 9i in my machine (Win 2k). I created 2 databases in the machine called SriOra & SriOra3. I tried to do a backup. Unsuccessful.

But I went through a Q & A in this site of SDutta & Puja and followed that.

Still I'm wondering about the way to perform Backup using the WIZARD.
       (I don't want it to be done by RMAN or EXP)
========================================
I tried to do Backup by using the Wizards ( In Menus of OEM & OMS )
Try 1.  OEM - Standalone - Network - Database (By right clicking)- BackupManagement
           - Stopped giving the msg : ... connect to OMS before launcing wizard ....
Try 2.  Launched OMS (by -- oemctl start oms sysman/p -- in cmd prompt) and Started and
           Logged on to OMS (by sysman/p as UN/Pwd). Then Opened another OEM session
          OEM - Standalone - Network - Database (By right clicking)- BackupManagement
           - Stopped giving the msg : ... connect to OMS before launcing wizard ....
          -----  SAME RESULTS OF TRY 1 -----
Try 3.  Launched OMS (by -- oemctl start oms sysman/p -- in cmd prompt) and Started and
           Logged on to OMS (by sysman/p as UN/Pwd). Then Used OMS and tried to do the
           backup from there (by means of logging to database and right clicking and getting
           the Backup Management ...)
          -- Still Not Working --

The above tries were done with the all of the following for the 2 databases (that I created)
- system/manager,    system/p (the pswd  to which I changed )
- sys/change_on_install,    sys/p (the pswd  to which I changed )
- sysman/oem_temp,    sysman/p (the pswd  to which I changed )
- srinika/xxx, [The Win2k username & pswd in my machine]

- At one stage I tried to create a repository by Enterprise Manager configuration assistant
  (not sure what it has to do)

- In one publication I read about  -- not to change the sysman password from oem_temp or
   not to change the sys password from change_on_install -- - Is that correct ?

Thanking again for ur presious time
Regards
Srinika