DBAsupport.com Forums - Powered by vBulletin
Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: How do i change defualt database when we have mor than 1 database on a server.

  1. #1
    Join Date
    Dec 2002
    Location
    Bangalore ( India )
    Posts
    2,434

    How do i change defualt database when we have mor than 1 database on a server.

    Hi,

    i have say N databases on the server.The 1st database while creation is taken defualt as this is registered first in REGISTRY.

    How do i change this to the new database name in registry so that i can use this as my defualt database.

    All i know is i have to change ORACLE_SID parameter in Registy.....but dunno the path....
    Can any 1 help ??????

    Regards
    Abhay.

  2. #2
    Join Date
    May 2002
    Posts
    2,645
    What is it with people wanting to directly edit the registry? Does any Oracle manual tell you to explicitly edit registry values? How about setting the ORACLE_SID via system or user environment variables?

    XP: My computer>properties>advanced>environment variables

  3. #3
    Join Date
    Dec 2002
    Location
    Bangalore ( India )
    Posts
    2,434
    HI,

    Can u please explain in detail of using envi variables?????

    Abhay.

  4. #4
    Join Date
    Dec 2002
    Location
    Bangalore ( India )
    Posts
    2,434
    I gotta answer....
    S i did change the paramter Oracale_Sid in Registry...
    Path is Go to registry....

    My Comp>HKEY_LOCAL_MACHINE>SOFTWARE>ORACLE>HOME

    well actually i have 2 versions of oracle running on my machine....
    so i have hom0 and hom1.versions are 8.x and 9.x

    In 9.x , in the path specified u dont have entry Oracle_SID, u have to create a string with name ORACLE_SID and enter the data(database name), in 8.x u have defualty the string, all u have to do is edit the data to change defualt database.

    i dunno y 9.x dosent hav an entry as such....

    Please if any body else who knows how to change default other than REGISTRY please let me know.....

    AS stecal was telling a method to do so.....am not aware of it...please can any 1 explain it to me....


    Regards
    Abhay.

  5. #5
    Join Date
    May 2002
    Posts
    42
    if you are connecting with SQL*Net you login like this:

    sqlnet /nolog
    set instance MYDB
    connect scott/tiger


    now you will be connected to MYDB no matter what the default database was set to.

    to change the ORACLE_SID env variable in windows do:
    set ORACLE_SID=MYDB
    to see the current ORACLE_SID setting do:
    echo %ORACLE_SID%

    The only way I have been able to change the default ORACLE_SID in the past is to change it in the registry.

  6. #6
    Join Date
    May 2002
    Posts
    42
    Opps, I ment SQLPlus not SQL*Net.

    maybe you should use SQL*Net anyway and always use @MYDB in the connect string.

  7. #7
    Join Date
    Feb 2001
    Location
    UAE
    Posts
    304
    To make the long notes short, the safest way is:

    c:\set ORACLE_SID=sid
    Agasimani
    OCP(10g/9i/8i/8)

  8. #8
    Join Date
    Nov 2002
    Posts
    115
    ABHAY !

    How did u change the ORACLE_SID in registry ?
    Prasad

  9. #9
    Join Date
    Dec 2002
    Location
    Bangalore ( India )
    Posts
    2,434
    Originally posted by agasimani
    To make the long notes short, the safest way is:

    c:\set ORACLE_SID=sid

    agasimani :

    This will not work..... i Did try...
    It will not chage the defualt database to new 1.....

    Abhay.

  10. #10
    Join Date
    Dec 2002
    Location
    Bangalore ( India )
    Posts
    2,434
    Originally posted by prasadvd
    ABHAY !

    How did u change the ORACLE_SID in registry ?
    Run REGEDIT

    Gp to the path

    My Comp>HKEY_LOCAL_MACHINE>SOFTWARE>ORACLE>HOME

    Change the ORACLE_SID.....

    Abhay.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width