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

Thread: db name

Hybrid View

  1. #1
    Join Date
    Aug 2000
    Posts
    163
    Is there a global variable/parameter I can look at to find the name of the database.

  2. #2
    Join Date
    Sep 2000
    Location
    Chicago, IL
    Posts
    316

    Talking

    In UNIX type: env
    In NT type: set

    Variable is ORACLE_SID

  3. #3
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    select global_name from global_name;
    Jeff Hunter
    marist89@yahoo.com
    http://marist89.blogspot.com/
    Get Firefox!
    "I pledge to stop eating sharks fin soup and will not do so under any circumstances."

  4. #4
    Join Date
    Jan 2001
    Posts
    230
    I have renamed my database name and when I ran following query
    it is giving me old database_name.world

    select global_name from global_name;

    What needs to be change?

    Thanks.

  5. #5
    Join Date
    Jan 2001
    Posts
    61

    Thumbs up

    What's the ORACLE_SID???? Your ORACLE_SID should be the new ORACLE_SID before you see the new database name from that query.

  6. #6
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    This value typically changes when you change your db_name parameter in init.ora. If you don't have that parameter, use:
    alter database rename old_db_name to new_db_name.domain
    Jeff Hunter
    marist89@yahoo.com
    http://marist89.blogspot.com/
    Get Firefox!
    "I pledge to stop eating sharks fin soup and will not do so under any circumstances."

  7. #7
    Join Date
    Jan 2001
    Posts
    230
    When I did
    echo $ORACLE_SID
    => changed database name.
    ps -ef | grep -i ora
    =>changed database name.
    lsnrctl status
    =>changed database name.

    I don't have any ref. old database name then why am I getting the ref.
    to old database name.

    Thanks.

  8. #8
    Join Date
    Jan 2001
    Posts
    230
    jeff:

    I getting following error

    SQL> alter database rename old_db_name to new_db_name.world;
    alter database rename old_db_name to new_db_name.world
    *
    ERROR at line 1:
    ORA-02231: missing or invalid option to ALTER DATABASE

    Also,
    When I renamed the database why do I need to do resetlog?


    Thanks.

  9. #9
    Join Date
    May 2000
    Location
    Portsmouth, NH, USA
    Posts
    378

    Wink answer to Mary



    Actually, to answer Mary's question, your parameter would be: db_name
    ie: show parameter db_name

    You can also look it up with:

    select * from v$instance;
    select * from v$database;

    - Magnus

  10. #10
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    [QUOTE][i]Originally posted by marist89 [/i]
    [B]
    alter database rename old_db_name to new_db_name.domain [/B][/QUOTE]
    :D
    Actually, its:
    alter database rename global_name to new_db_name
    Jeff Hunter
    marist89@yahoo.com
    http://marist89.blogspot.com/
    Get Firefox!
    "I pledge to stop eating sharks fin soup and will not do so under any circumstances."

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