Wednesday, January 13, 2010

How to determine if the Table exists in the Database or not

Oracle - select table_name from user_tables where table_name = upper('table_name_to_be_searched');

SQL Server - select name from sys.tables where name = upper('table_name_to_be_searched');

Sunday, January 10, 2010

How to determine URL and Port of Oracle database web based Management Console

To determine URL and Port of Oracle database web based Management Console, use -
emctl status dbconsole

EG:

C:\Documents and Settings\Administrator>emctl status dbconsole
Environment variable ORACLE_SID not defined. Please define it.

C:\Documents and Settings\Administrator>set ORACLE_SID=orcl

C:\Documents and Settings\Administrator>emctl status dbconsole
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0
Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved.
http://localhost:1158/em/console/aboutApplication
Oracle Enterprise Manager 10g is running.
------------------------------------------------------------------
Logs are generated in directory D:\oracle\product\10.2.0\db_2/localhost_orcl/sysman/log

C:\Documents and Settings\Administrator>