Idle instance [message #658982] |
Tue, 03 January 2017 05:20 |
|
ram_orafaq1989
Messages: 5 Registered: October 2016
|
Junior Member |
|
|
Hi Team,
Is it possible to connect to idle instance in a linux system after the database is up and running.I know there is a way by setting the ORACLE_SID value to a junk value . Is there any other way to connect to idle instance in a system that is already running the database.
Thanks .
|
|
|
|
Re: Idle instance [message #658987 is a reply to message #658982] |
Tue, 03 January 2017 06:29 |
|
EdStevens
Messages: 1376 Registered: September 2013
|
Senior Member |
|
|
ram_orafaq1989 wrote on Tue, 03 January 2017 05:20Hi Team,
Is it possible to connect to idle instance in a linux system after the database is up and running.I know there is a way by setting the ORACLE_SID value to a junk value . Is there any other way to connect to idle instance in a system that is already running the database.
Thanks .
By definition, an instance that is running is not idle.
I agree with Cookiemonster ... what are you trying to achieve here?
[Updated on: Tue, 03 January 2017 06:30] Report message to a moderator
|
|
|
|
Re: Idle instance [message #659011 is a reply to message #658982] |
Wed, 04 January 2017 02:56 |
gazzag
Messages: 1119 Registered: November 2010 Location: Bedwas, UK
|
Senior Member |
|
|
ram_orafaq1989 wrote on Tue, 03 January 2017 11:20Hi Team,
I know there is a way by setting the ORACLE_SID value to a junk value .
Correct. If you set your ORACLE_SID to a non-existent SID SQL*Plus will indeed report that it has connected you to "an idle instance". However, a subsequent STARTUP command would fail. As others have enquired, what exactly are you trying to achieve?
|
|
|
|
Re: Idle instance [message #659061 is a reply to message #659060] |
Thu, 05 January 2017 06:38 |
|
EdStevens
Messages: 1376 Registered: September 2013
|
Senior Member |
|
|
ram_orafaq1989 wrote on Thu, 05 January 2017 06:32Hi all,
Thanks for all your replies . I am a PL SQL developer . Just wanted to know if Oracle supports logging in SQL Plus with SYSDBA role without connecting to any instance or database.
Look at the /nolog command line option. Has nothing to do with 'as sysdba' or not.
https://docs.oracle.com/cd/E11882_01/server.112/e16604/ch_three.htm#i1169374
Quote:
Also after logging in , if we set up the init.ora Start up file with a junk db name , it should start the instance right ?. Correct me if I am wrong .
IF you set ORACLE_SID to some "junk" value, you could start an instance in NOMOUNT with
SQL> startup nomount pfile='init.ora'
But there is not much you could do with it so the fundamental question remains. Why would you want to? What are you really trying to accomplish?
oracle:junkdb$ cat initjunkdb.ora
db_block_size=8192
db_name="junkdb"
oracle:junkdb$ export ORACLE_SID=junkdb
oracle:junkdb$ sqlplus /nolog
SQL*Plus: Release 12.1.0.2.0 Production on Thu Jan 5 06:49:45 2017
Copyright (c) 1982, 2014, Oracle. All rights reserved.
SQL> conn / as sysdba
Connected to an idle instance.
SQL> startup nomount pfile='initjunkdb.ora'
ORACLE instance started.
Total System Global Area 234881024 bytes
Fixed Size 2922904 bytes
Variable Size 176162408 bytes
Database Buffers 50331648 bytes
Redo Buffers 5464064 bytes
SQL>
[Updated on: Thu, 05 January 2017 06:51] Report message to a moderator
|
|
|
|
|
|
|
Re: Idle instance [message #659270 is a reply to message #659269] |
Wed, 11 January 2017 03:30 |
John Watson
Messages: 8960 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
ram_orafaq1989 wrote on Wed, 11 January 2017 09:14That we can login into sql plus and start instances without any connection to database.Understood that sqlplus , instances and databases are separate entities that can be worked with independently. Not quite correct. Yes, SQL*Plus, the instance, and the database are separate. But you do not log in to SQL*Plus. You log in with SQL*Plus. The instance is memory structures and processes: it lives on your CPUs and in your RAM, and is transient; you start and stop it. The database is persistent: it is files on disc, and exists from creation until you deliberately delete it. An "ORacle server" is an instance plus a database. What ties it all together is the concept of a "session". A session is a connection from the SQL*Plus client to the Oracle server, and the login occurs when the session is established.
If the instance is "idle", you have a special case: just one instance process is launched, the process that supports your session. Log in to that, and you can use it to launch the instance and then create a database or open an already extant database.
Clear?
|
|
|