Home » RDBMS Server » Server Administration » change database global name without using a dot (10g)
change database global name without using a dot [message #436401] Wed, 23 December 2009 06:25 Go to next message
rajy_salim
Messages: 204
Registered: January 2008
Location: Beirut - Lebanon
Senior Member
Hi,

I need to change the global name of the database to a name that does not contain a dot ".", but I am not able to do it.

When I run the script to change the name to a "free-of-dot" name
 alter database rename global_name to <name_without_dot>
it runs successfully, and the feedback is "database altered", but the global name does not change.

Is there a way to change the name as required?

Thanks

Rajy
Re: change database global name without using a dot [message #436425 is a reply to message #436401] Wed, 23 December 2009 08:55 Go to previous messageGo to next message
LKBrwn_DBA
Messages: 487
Registered: July 2003
Location: WPB, FL
Senior Member
You could try:
UPDATE GLOGAL_NAME SET GLOBAL_NAME='NewName';

Smile
Re: change database global name without using a dot [message #436427 is a reply to message #436425] Wed, 23 December 2009 09:05 Go to previous messageGo to next message
ThomasG
Messages: 3211
Registered: April 2005
Location: Heilbronn, Germany
Senior Member
One of the most important rules in Oracle:

DON'T UPDATE DATA DICTIONARY VIEWS MANUALLY

The Global name consists of the database name and the database domain. So a "Global Name without dot" would be a database that has no domain.

Read the documentation for details.
Re: change database global name without using a dot [message #436429 is a reply to message #436427] Wed, 23 December 2009 09:13 Go to previous messageGo to next message
babuknb
Messages: 1736
Registered: December 2005
Location: NJ
Senior Member

>>Is there a way to change the name as required?

Use same command to change your global name.

SQL> select * from global_name;

GLOBAL_NAME
-----------------------------------
TESTDB

SQL> alter database rename global_name to test.oracle;

Database altered.

SQL> select * from global_name;

GLOBAL_NAME
-------------------------------------------
TESTDB.ORACLE

As per Thomas if you have domain then you can specifiy domain name else leave that.

-Babu

[Updated on: Wed, 23 December 2009 09:15]

Report message to a moderator

Re: change database global name without using a dot [message #436431 is a reply to message #436425] Wed, 23 December 2009 09:15 Go to previous messageGo to next message
Michel Cadot
Messages: 68665
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
LKBrwn_DBA wrote on Wed, 23 December 2009 15:55
You could try:
UPDATE GLOGAL_NAME SET GLOBAL_NAME='NewName';

Smile

Have you other stupid things to post?
Maybe you should FIRST try yourself what you tell others to do.

Regards
Michel
Re: change database global name without using a dot [message #436435 is a reply to message #436431] Wed, 23 December 2009 10:12 Go to previous messageGo to next message
LKBrwn_DBA
Messages: 487
Registered: July 2003
Location: WPB, FL
Senior Member
Michel Cadot wrote on Wed, 23 December 2009 10:15
LKBrwn_DBA wrote on Wed, 23 December 2009 15:55
You could try:
UPDATE GLOGAL_NAME SET GLOBAL_NAME='NewName';

Smile

Have you other stupid things to post?
Maybe you should FIRST try yourself what you tell others to do.

Regards
Michel


Please do not show your ignorance by commenting on what you do not know:

SQL> select * from global_name;
GLOBAL_NAME
-----------------------------------------------------
SALES1

1 row selected.

SQL> update global_name set global_name='SALES2';
1 row updated.

SQL> select * from global_name;
GLOBAL_NAME
-----------------------------------------------------
SALES2

1 row selected.

Regards to you.
Razz
Re: change database global name without using a dot [message #436436 is a reply to message #436435] Wed, 23 December 2009 10:19 Go to previous messageGo to next message
Michel Cadot
Messages: 68665
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
You can also shot you in the head, will you do it?
I do not say you cannot do it but it is a stupid thing.
Now do it on a production database and wait a while to see what happens (hoping you have no database link, streams, logical standby...).

Only the blatant ignorant thinks what he knows is the complete knowledge and calls others ignorant when they point him to something he can't even see he does not know.

Do you think that ALTER DATABASE is just UPDATE?
I have a simple thing and general rule for you to remember:
if you use UPDATE under SYS you are wrong.

Regards
Michel

[Updated on: Wed, 23 December 2009 10:31]

Report message to a moderator

Re: change database global name without using a dot [message #436437 is a reply to message #436435] Wed, 23 December 2009 10:32 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
The only situations I know of in which Oracle tell you to manually update the GLOBAL_NAMES view directly are ones where you've already managed to get an invalid value into the Globasl_Name.

What you can do by manually updating the Global_Name isleave your database in a situation where it won't open, and the only option is to restore from backup. (Metalink Note 743676.1).

But of course - you knew all this, and simply neglected to mention it,didn't you.
Re: change database global name without using a dot [message #436459 is a reply to message #436437] Wed, 23 December 2009 12:35 Go to previous messageGo to next message
LKBrwn_DBA
Messages: 487
Registered: July 2003
Location: WPB, FL
Senior Member
Note 743676.1
Removed


Global database name has effect on database links when you enforce global naming (GLOBAL_NAMES).
For 11g databases it will be ignored if you configure SERVICE_NAMES.

Obviously the best practice (or recommended) is to set the database global name equal to the service name (or database_name.database_domain). For standby databases and RAC which may have the same service name, you need to set the additional parameter DB_UNIQUE_NAME.
Smile




[Updated on: Wed, 23 December 2009 12:41] by Moderator

Report message to a moderator

Re: change database global name without using a dot [message #436460 is a reply to message #436459] Wed, 23 December 2009 12:44 Go to previous message
Michel Cadot
Messages: 68665
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Do NOT quote anything from Metalink it is illegal.
Read the terms of your contract with Oracle.

Quote:
Unless specifically provided in your licensing or distribution agreement with Oracle, the Materials may not be used to provide services for or to third parties and may not be shared with or accessed by third parties.


Regards
Michel

[Updated on: Wed, 23 December 2009 12:44]

Report message to a moderator

Previous Topic: Dual returns no rows
Next Topic: Install Multiple database vertion on same server
Goto Forum:
  


Current Time: Mon Jul 01 01:44:38 CDT 2024