Home » RDBMS Server » Networking and Gateways » Database link for SYS
Database link for SYS [message #26954] Fri, 08 August 2003 14:55 Go to next message
Cathy Perrodin
Messages: 1
Registered: August 2003
Junior Member
I used the following syntax to create a database link:

create database link TEST
connect to SYS identified by ****** using 'TEST';

Here is my attempt to use the link and the error message:

select count(*) from lics.lc_web_servers@test
*
ERROR at line 1:
ORA-28009: connection to sys should be as sysdba or sysoper
ORA-02063: preceding line from TEST

How can I define this link to connect as sysdba or is that specified in the query syntax?

Cathy
Re: Database link for SYS [message #26958 is a reply to message #26954] Fri, 08 August 2003 19:46 Go to previous messageGo to next message
Barbara Boehmer
Messages: 9092
Registered: November 2002
Location: California, USA
Senior Member
To connect to sys as sysdba:

SQL> CONNECT SYS/change_on_intall AS SYSDBA;

However, you probably want to create your link as system or something else:

create database link TEST
connect to SYSTEM identified by manager using 'TEST';
Re: Database link for SYS [message #27011 is a reply to message #26958] Wed, 13 August 2003 06:48 Go to previous messageGo to next message
shyamogoti
Messages: 7
Registered: December 2002
Junior Member
after creation of database link and when trying to use the link using sql command,this error is displayed..
ERROR at line 1:
ORA-02085: database link TEST.US.ORACLE.COM connects to CCLWORKS.US.ORACLE.COM
plz..help
Re: Database link for SYS [message #27019 is a reply to message #27011] Wed, 13 August 2003 15:10 Go to previous messageGo to next message
Barbara Boehmer
Messages: 9092
Registered: November 2002
Location: California, USA
Senior Member
Apparently your global_names parameter is set to true, which requires that the name of the database link be the same as the name of the database. So, you need to either change your global_names parameter to false, then re-create your database link the way you want it or leave your global_names paramter set to true and re-create the datbase link, using the name of the database as the name of the database link, something like:

CREATE DATABASE LINK cclworks.us.oracle.com
CONNECT TO username
IDENTIFIED BY password
USING 'CCLWORKS.US.ORACLE.COM'
/
Re: Database link for SYS [message #27025 is a reply to message #27019] Thu, 14 August 2003 00:26 Go to previous messageGo to next message
shyamogoti
Messages: 7
Registered: December 2002
Junior Member
thx for your reply, we couldnot find global_names parameter which should be set to false,plz help..
Re: Database link for SYS [message #27040 is a reply to message #27025] Thu, 14 August 2003 15:46 Go to previous message
Barbara Boehmer
Messages: 9092
Registered: November 2002
Location: California, USA
Senior Member
The global_names parameter is in your initialization parameter file, which may be named init.ora or something similar, and should be in some sub-directory of your oracle home directory, depending on your operating system, Oracle version, and so forth. For example, for Oracle 8.1.7 on Windows NT, the default is:

oracle81adminoracle81pfileinit.ora

unless you have changed it. You can also change it from SQL*Plus temporarily for your session or instance, using:

SQL> ALTER SESSION SET GLOBAL_NAMES=FALSE;

or:

SQL> ALTER SYSTEM SET GLOBAL_NAMES=FALSE;
Previous Topic: tns connect string.
Next Topic: How can I change parameter in sqlnet.ora?
Goto Forum:
  


Current Time: Mon May 06 22:18:19 CDT 2024