Tuesday, June 1, 2010

How to create or recreate dbconsole on a single standalone server? --Moid

How to create or recreate dbconsole on a standalone (non-RAC) server? --Moid

In this exercise, we will create a dbconsole for a manually created database called demo. This demo DB is hosted on a DB server called “production” and it can be accessed by using the ip address “192.168.0.7”. Pictures worth thousand words, so I had lot of screenshots for this exercise, hope this helps you in creating dbconsole.

Section-1: Prerequisite for DBConsole.
· Login to the database server.
· Make sure DB is up
o If it is not started, use the following steps to start it.
§ export ORACLE_SID=demo
§ sqlplus / as sysdba
§ startup
· Make sure Listener is up.
o If the listener is not up, start it using the following command.
§ lsnrctl start listener
· Make sure tns entry for demo database is added in tnsnames.ora file
o If the tns entry is not, add it using the following method. Figure-1 to Figure-12 displays the steps which can be executed to add the tns entry into the tnsnames.ora file.



Figure-1:

Figure-2.

Figure-3:


Figure-4:

Figure-5:

Figure-6:


Figure-7:

Figure-8:

Figure-9:

Figure-10:

Figure-11:

Figure-12:



Figure-13:

Figure-14:





Section-2: Create dbconsole repository using emca utility.
As shown in Figure-14, enter the following on the $ prompt.
$ $ORACLE_HOME/bin/emca -repos create
STARTED EMCA at Apr 20, 2008 3:44:33 PM
EM Configuration Assistant, Version 10.2.0.1.0 Production
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Enter the following information:
Database SID: demo
Listener port number: 1521
Password for SYS user:abc123
Password for SYSMAN user:abc123
Do you wish to continue? [yes(Y)/no(N)]: Y
Figure-14:
Figure-15: check the output for any errors. My execution went very smooth and I didn’t see any errors building the repository.
Section-3: Create dbconsole using emca utility.
As shown in Figure-16, enter the following on the $ prompt.
$ $ORACLE_HOME/bin/emca –config dbcontrol db
STARTED EMCA at Apr 20, 2008 3:51:06 PM
EM Configuration Assistant, Version 10.2.0.1.0 Production
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Enter the following information:
Database SID: demo
Listener port number: 1521
Password for SYS user:abc123
Password for DBSNMP user: abc123
Password for SYSMAN user:abc123
.
..
..
.
Do you wish to continue? [yes(Y)/no(N)]: Y
Figure-16:
Figure-17: I see few errors than can also be seen in Figure below.
The emca utility is unhappy about shared_pool_size and job_queue_processes parameters lower than it should be. I increased the value to its minimum required in Figure-18 and restarted the dbconsole creation again in Figure 19. This time it complained again. It turned out to be that I had given “shared_pool_size=82” instead of “shared_pool_size=82M”. I fixed that in step 20 and ran the emca execution again without any errors.
Figure-18:
Figure-19:

.
Figure-20:
Section-4: Check the status of the dbconsole and open it using standard browser.
To check the status, on the $prompt, type
emctl status dbconsole
$ export ORACLE_SID=demo
$ emctl status dbconsole
TZ set to US/Central
Oracle Enterprise Manager 10g Database Control Release 10.2.0.4.0
Copyright (c) 1996, 2007 Oracle Corporation. All rights reserved.
https://production:5507/em/console/aboutApplication
Oracle Enterprise Manager 10g is running.
------------------------------------------------------------------
Logs are generated in directory /u01/app/oracle/product/10.2.0/db_1/production_demo/sysman/log
As you can see, dbconsole is running on https://production:5507/em/
Please note that if the DB Server host is not configured in DNS, you might need to replace the host with IP address. So for example, you will need to type https://192.168.0.7:5507/em/ instead of https://production:5507/em/. Or add the host entry into the hosts file. In Windows XP, location of hosts file is à C:\WINDOWS\system32\drivers\etc\hosts
For example, add the following line in C:\WINDOWS\system32\drivers\etc\hosts
192.168.0.7 production
Now we are all ready to open the dbconsole.
Figure-21: Open an internet browser, and start the dbconsole as shown in figure below.
Figure-22: Since this is the first time you are login to the database, you will see the Oracle license agreement page. Once you click “I agree” you are all set to use the dbconsole for database maintenance.
To shutdown dbconsole, the command is:
$ export ORACLE_SID=demo
$ emctl stop dbconsole
TZ set to US/Central
Oracle Enterprise Manager 10g Database Control Release 10.2.0.4.0
Copyright (c) 1996, 2007 Oracle Corporation. All rights reserved.
https://production:5507/em/console/aboutApplication
Stopping Oracle Enterprise Manager 10g Database Control ...
... Stopped.
Hope the document helps you in your DBA work.
--Moid M.

No comments:

Post a Comment

Followers