![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
on database remote1 is a table I want to access => table1 I have a very limited schema/user created on remote2. remote2 has public database link to remote1, so I can access table1@dblink_to_remote1 I have another local database db1 with database link to remote2 = @dblink_to_remote2 I would like to create a table from remote1 on my local db1. I can achieve that with export/import *(giving remote2 credentials). Is there a better solution for that task? thanks, chris |
#3
| |||
| |||
|
|
On Jul 5, 4:01*pm, Krzysztof Cierpisz <ciape... (AT) gmail (DOT) com> wrote: on database remote1 is a table I want to access => table1 I have a very limited schema/user created on remote2. remote2 has public database link to remote1, so I can access table1@dblink_to_remote1 I have another local database db1 with database link to remote2 = @dblink_to_remote2 I would like to create a table from remote1 on my local db1. I can achieve that with export/import *(giving remote2 credentials). Is there a better solution for that task? thanks, chris CREATE TABLE <table_name AS SELECT * FROM <table_name>@<remote_database>; HTH -g |
#4
| |||
| |||
|
|
the table is not on <remote_database> -> I have no direct access to remote_database I have only indirect access over a db_link from "another" database to remote_database>. I have a very limited access on this "another" database so I cannot create any objects there.- Hide quoted text - - Show quoted text - |
#5
| |||
| |||
|
|
Can you not create a database link direct to remote1 from your local db using the same credentials as the database link from remote2 to remote1? |
#6
| |||
| |||
|
|
Unfortunately I don't know credentials that were used for creating that public link. I can use it and know the username with which it connects but cannot replicate that db link on my local database. |
#7
| |||
| |||
|
|
On Wed, 06 Jul 2011 12:48:15 -0700, Krzysztof Cierpisz wrote: Unfortunately I don't know credentials that were used for creating that public link. I can use it and know the username with which it connects but cannot replicate that db link on my local database. Actually, you can. If you retrieve DDL statement for the link by using DBMS_METADATA, you will get "CONNECT TO <user> IDENTIFIED BY VALUES <... statement, which will enable you to re-create the link. Catch is that you still need "select any catalog" privilege, in order to do that. --http://mgogala.byethost5.com |
#8
| |||
| |||
|
|
yes, tried that already, but I don't have that priv. |
#9
| |||
| |||
|
|
On Thu, 07 Jul 2011 01:07:03 -0700, Krzysztof Cierpisz wrote: yes, tried that already, but I don't have that priv. Well then, you should pay a visit to your friendly neighbourhood DBA, who has all the privileges needed to do the job. |
#10
| |||
| |||
|
|
Yeah, that's what I did. I got access to the target database so no issues for now. |
![]() |
| Thread Tools | |
| Display Modes | |
| |