Close

How to find name of a database in Oracle

You can use any of these commands: SQL> Select name from v$database; SQL> select instance_name from v$instance; SQL> select * from global_name; SQL> SELECT VALUE FROM V$PARAMETER WHERE NAME=’db_name’; SQL> select to_number(translate(substr(version,1,9),’1.$’,’1′)) from v$instance; SQL> select s.machine from v$session s where s.audsid userenv(‘sessionid’); SQL> select global_name from global_name;

Oracle Commands (Oracle Application Server)

These are mostly oracle application server commands:EMCTLTo start and stop the Management Service, the Management Agent, the Grid Control Console, the Application Server Control Console, and the Database Control, you use the Enterprise Manager command-line utility (emctl)OPMNCTLopmnctl is the supported tool for starting and stopping all components in an Oracle Application Server instance, with the…

SID in Oracle (& JDBC)

There can be more than one Oracle instance on a single machine. In order to be able to distinguish these instances, Oracle uses a SID (System Identifier) which is a string. The SID can be set through the ORACLE_SID environment variable.D:oracleproduct10.1.0>set ORACLE_SID=ORA10 On Windows, each instance requires a Windows service. This service must first be…

ORA-12514 – Solution

I was trying to connect to database using the following URL : jdbc:oracle:thin:@//dbs03.~~~~.ca:1521/database_name_dev while JDBC needs an SID to connect to and not a database name or TSN name. Not sure how should you find it out what an SID is for a given database for now, but after changing it to jdbc:oracle:thin:@//dbs03.~~~~.ca:1521/db03, I could…