Unable to rename global_name – ORA-01729:database link name expected

During the setup of a new database (Either by cloning or setup new DB), you will have the change the global_name of your database. You might hit this error ORA-01729:database link name expected.

SQL> select * from global_name;
GLOBAL_NAME
——————————————————————————————————————————————–
ODSA_INDACBET.DOMAIN.COM
SQL> alter database rename global_name to ‘ODSA_INDACBET.DOMAIN.COM’;
alter database rename global_name to ‘ODSA_INDACBET.DOMAIN.COM’
ERROR at line 1:
ORA-01729: database link name expected

There’s another way to modify the global_name for a database. This may work!

SQL> update global_name set global_name=’ODSA_INDACBET.DOMAIN.COM’;
1 row updated.
SQL> commit;
Commit complete.

SQL> select * from global_name;

GLOBAL_NAME
—————————————————————————————————————————————————-
ODSA_INDACBET.DOMAIN.COM
Advertisements
  1. #1 by dvega on September 16, 2015 - 23:22

    You are hitting the ORA-01729 message because your syntax is wrong. You don’t have to use single quotes.
    http://docs.oracle.com/cd/B28359_01/server.111/b28310/ds_admin001.htm#i1007695

    Your syntax:
    SQL> alter database rename global_name to ‘ODSA_INDACBET.DOMAIN.COM’;

    Right syntax:
    SQL> alter database rename global_name to ODSA_INDACBET.DOMAIN.COM;

  2. #2 by Wei Shan on September 16, 2015 - 23:44

    @dvega, You are absolutely right. I tested without quotes and it works. Thanks for the comment. I appreciate it 🙂

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: