Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

database link...again....

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
0
0
OK....I have server 1 with database schema A, database schema B, and database schema C
I also have server 2 with database schema AA, database schema BB, and database schema CC.

Server 1 has SID, SID_1
Server 2 has SID, SID_2

I attempted to create a database link with the following, loggied into sqlplus on server 1 in schema A:

create database link SID_2
connect to AA
identified by AA
using SID_2

Now, attempting to use this link, i issue a simple select statement as such: select * from table_agent@SID_2

and i'm getting the following error:

ORA-01017: invalid username/password; logon denied
ORA-02063: preceding line from SID_2

The schema AA, has the username/password AA/AA
What am I doing wrong, do I need to somehow enter the user/passwd for the server 2 ??
 
Further to this, more to think about:

I am testing this on two machines with Oracle 8...When moving to production, one machine will have Oracle 8, the other MAY have Oracle 7.

Is it still OK to use the create database link statements??

Oracle SQL guide quote:

"Net8 must be installed on both the local and remote Oracle databases.

To access non-Oracle systems you must use the Oracle Heterogeneous Services."

Its not a non-Oracle system, but not version 8, and wont have Net8...????
 
I've seen 8.1.6 databases connect to a 7.3.4 DB no problems so I think Oracle may just be covering there behinds for when thet want to drop 7.3.4

The invalid username/password is probably being returned as you are not connecting to the DB you think you are and therefore the username your trying to connect to does not exist.

Try to tnsping it, From server2 at a unix prompt type

tnsping SID_1 and make sure that the connection details (host service name etc) are what you expect.
 
I think the connect by has to be an actual userid. I jsut created a link between 2 db's, and it was with my own id, identified by my password. Try setting up a dummy id with read only rights on the second db, and see if that works. Hope it helps.

K
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top