Synonym (Merged) [message #183723] |
Sat, 22 July 2006 13:03 |
novicess
Messages: 8 Registered: July 2006
|
Junior Member |
|
|
Hi
I am a newbie, who would be grateful to get some help!
I've created a dblink;
CREATE DATABASE LINK SWI
CONNECT TO GROS IDENTIFIED BY BOY
USING 'API.I.K.COM';
Now I need to create a synonym and import a table to my own table in my own scheme 'upp' using this DB-link. How would you do this?
|
|
|
|
Synonym ? [message #183725 is a reply to message #183723] |
Sat, 22 July 2006 13:15 |
novicess
Messages: 8 Registered: July 2006
|
Junior Member |
|
|
I am a newbie who would be grateful to get some help. I have created a dblink.
CREATE DATABASE LINK SIT
CONNECT TO GROS IDENTIFIED BY BOY
USING 'AU.IK.COM';
Now I to create a synonym to import a table GRO.TABLE to my own table in my own scheme 'vice'. How would you do this?
|
|
|
|
|
Re: synonym [message #183741 is a reply to message #183723] |
Sun, 23 July 2006 02:58 |
Peter D.
Messages: 19 Registered: June 2006 Location: Warsaw, Poland
|
Junior Member |
|
|
Try this:
CREATE TABLE upp.<your_table>
AS
SELECT *
FROM <remote_table_name>@SWI;
Peter D.
|
|
|
|
|
Re: synonym [message #183887 is a reply to message #183741] |
Mon, 24 July 2006 04:41 |
novicess
Messages: 8 Registered: July 2006
|
Junior Member |
|
|
Thank you very much! This worked fine...
CREATE DATABASE LINK SWI
CONNECT TO G IDENTIFIED BY b
USING 'sw.k.k.com';
CREATE SYNONYM GRO
FOR BOOKS@SWI;
UNTIL i did
SELECT * FROM GRO; which give me the following Error ORA-00980: synonym translation is no longer valid
I need to select/import 2 tables from gro...
|
|
|
|
Re: synonym [message #183967 is a reply to message #183891] |
Mon, 24 July 2006 09:58 |
novicess
Messages: 8 Registered: July 2006
|
Junior Member |
|
|
thanks..
Q1 & Q2 gives me the following ERROR;
ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
So it doesn't work.
But when I log in as user G identified by B instead , and run Q1 & Q2 with "books@AP" "select sysdate from dual@AP" the connection works fine...
I made some changes in tnsnames.
|
|
|
Re: synonym [message #183973 is a reply to message #183967] |
Mon, 24 July 2006 10:55 |
William Robertson
Messages: 1643 Registered: August 2003 Location: London, UK
|
Senior Member |
|
|
novicess wrote on Mon, 24 July 2006 09:58 | ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
|
The error refers to the TNS connection on the server (in case you are checking the one on the client).
Essentially a TNS label defines a server, a port and an Oracle SID. For a datanase link the database must look up that definition in its tnsnames.ora file, and use it to contact the remote database. The error suggests that it found the server and the port and connected to a listener, only the listener did not recognise the service name (i.e. the SID specified in the TNS entry). Therefore make sure the specified server exists (ping it from the command line), the specified instance is running on it, and there is a listener listening on the specified port.
[Updated on: Mon, 24 July 2006 11:07] Report message to a moderator
|
|
|