To create database link to connect to remote database
Hi all
I am using 10g with apex4.
My apex application is running on our server.
I need to connect to a remote server to get data from there.for that i need to create a database link from apex.
When i tried to create a database link from apex sql commands window it is showing insufficient privilages.
So i created one database link from back end but it is not accessible from apex...
can some one help me in this...
its urgent.....
thanks in advance
Hi,
You need create database link to schema that is assigned to your workspace (application parsing schema)
Schema need have CREATE DATABASE LINK system privilege.
Regards,
Jari
Edited by: jarola on Aug 1, 2011 3:34 PM
See documentation
http://download.oracle.com/docs/cd/E10513_01/doc/appdev.310/e10499/advnc.htm#BABBFICH
Similar Messages
-
Using database link to connect to two databases
Hi guys,
Here's my question. I need to give a contractor Select rights on tables located in two schemas located on two different servers. One server is dev and one is prod. Let's say we have schema user: EMPLOYEE on dev and schema user: DEPARTMENT on prod. The outside contractor needs select rights on all tables in DEPARTMENT schema but only needs select on a few tables ( 4 to be exact) from EMPLOYEE schema.
My initial train of thougth is: CREATE a user named: TEST (random name of course, just used for an example) for contractor on prod. Give user TEST select rights on all tables in DEPARTMENT schema.
Create database link to dev server so user TEST can access EMPLOYEE schema.
How do i go about limiting the user TEST via the database link to only view the 4 tables from EMPLOYEE instead of all teh tables?
Should I also consider doing this scenario in reverse? Creating user TEST on dev, giving TEST rights to the 4 tables in EMPLOYEE, then creating the database link to connect to department schema on prod database??
Any help will be appreciated. Thanks in advance.zephyr223 wrote:
Hi guys,
Here's my question. I need to give a contractor Select rights on tables located in two schemas located on two different servers. One server is dev and one is prod. Let's say we have schema user: EMPLOYEE on dev and schema user: DEPARTMENT on prod. The outside contractor needs select rights on all tables in DEPARTMENT schema but only needs select on a few tables ( 4 to be exact) from EMPLOYEE schema.
My initial train of thougth is: CREATE a user named: TEST (random name of course, just used for an example) for contractor on prod. Give user TEST select rights on all tables in DEPARTMENT schema.
Create database link to dev server so user TEST can access EMPLOYEE schema.
How do i go about limiting the user TEST via the database link to only view the 4 tables from EMPLOYEE instead of all teh tables? Only grant them access to those four tables from EMPLOYEE. You have to explicitly grant privileges anyways, and since there is no GRANT SELECT ON <SCHEMA> ability it should not be that difficult.
Should I also consider doing this scenario in reverse? Creating user TEST on dev, giving TEST rights to the 4 tables in EMPLOYEE, then creating the database link to connect to department schema on prod database?? Are you creating database links as the EMPLOYEE and DEPARTMENT users? If so, I would caution against that. Create a "current user" database link for TEST. I think you can manage privileges better that way.
HTH!
HTH! -
Connecting to remote database (idle) with Password File Authentication
Hi all,
I was wondering if it's possible to connect to a remote database that is shut down (idle instance) as sys user with sysdba privileges? In the book Oracle - All in One on page 210 in the section - Operating System and Password File Authentication it says:
Connection with operating system or password file authentication is always possible, no matter what state the instance and database are in, and is necessary to issue STARTUP or SHUTDOWN commands.
Above indicates that it's possible but I'm unable to do so.
I managed to connect to remote database that was in nomount mode (see below for details).
When I first tried to connect to a remote database (idle instance) using password file authentication it was giving following error:
sqlplus sys@ORCL as sysdbaSQL*Plus: Release 11.2.0.3.0 Production on Fri Dec 21 13:59:28 2012
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Enter password:
ERROR:
ORA-12514: TNS:listener does not currently know of service requested in connect
descriptor
Enter user-name:
After starting the database to nomount mode I was getting following error:
sqlplus sys@ORCL as sysdbaSQL*Plus: Release 11.2.0.3.0 Production on Fri Dec 21 13:48:36 2012
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Enter password:
ERROR:
ORA-12528: TNS:listener: all appropriate instances are blocking new connections
Enter user-name:
So I added the clause (UR=A) to my listener.ora file and after that it work and I was able to connect:
sqlplus sys@ORCL as sysdbaSQL*Plus: Release 11.2.0.3.0 Production on Fri Dec 21 14:04:49 2012
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Enter password:
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL>
I have all necessairly entries in tnsnames.ora on my local host.
Also I have no problems when connecting as sys user with sysdba when the DB is open but can't get it work on an idle instance.
I know that I can use operating system authentication but want to know if there is a mistake in the book or I'm doing something wrong.
Regards,
Dawid
Edited by: 978239 on 2012-12-21 06:24978239 wrote:
Hi all,
I was wondering if it's possible to connect to a remote database that is shut down (idle instance) as sys user with sysdba privileges? In the book Oracle - All in One on page 210 in the section - Operating System and Password File Authentication it says:
Connection with operating system or password file authentication is always possible, no matter what state the instance and database are in, and is necessary to issue STARTUP or SHUTDOWN commands.
Above indicates that it's possible but I'm unable to do so.
I managed to connect to remote database that was in nomount mode (see below for details).
When I first tried to connect to a remote database (idle instance) using password file authentication it was giving following error:
sqlplus sys@ORCL as sysdbaSQL*Plus: Release 11.2.0.3.0 Production on Fri Dec 21 13:59:28 2012
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Enter password:
ERROR:
ORA-12514: TNS:listener does not currently know of service requested in connect
descriptorSince the database is down, the only way the listener is going to know of it is if you create a static registration by adding an entry for the db in the SID_LIST section of listener.ora
>
Enter user-name:
After starting the database to nomount mode I was getting following error:
sqlplus sys@ORCL as sysdbaSQL*Plus: Release 11.2.0.3.0 Production on Fri Dec 21 13:48:36 2012
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Enter password:
ERROR:
ORA-12528: TNS:listener: all appropriate instances are blocking new connections
Enter user-name:
So I added the clause (UR=A) to my listener.ora file and after that it work and I was able to connect:
sqlplus sys@ORCL as sysdbaSQL*Plus: Release 11.2.0.3.0 Production on Fri Dec 21 14:04:49 2012
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Enter password:
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL>
I have all necessairly entries in tnsnames.ora on my local host.
Also I have no problems when connecting as sys user with sysdba when the DB is open but can't get it work on an idle instance.
I know that I can use operating system authentication but want to know if there is a mistake in the book or I'm doing something wrong.
Regards,
Dawid
Edited by: 978239 on 2012-12-21 06:24 -
Failed to connect to remote database DMWEB_SITE1. Error is ORA-12533
hello Gurus,
I don't get what's hapenning with my Standby database
I've follwoed the procedure as usual to recreate my standby as usually (works fine) exception this time
I've created a separat listener so tha I've configured a local_listener
in Site 1 Ok
Site 2 I get error message below in my dataguard trace File ...
NSV0: Failed to connect to remote database DMWEB_SITE1. Error is ORA-12533
DG 2010-01-08-15:56:32 0 2 0 NSV0: Failed to send message to site DMWEB_SITE1. Error code is ORA-12533.
DG 2010-01-08-15:56:32 0 2 707758231 DMON: DMWEB_SITE2 unable to contact primary for DRC version check
When I try to enable the dataguatrd configuration it succed but the Site2 remains Disable.
My Local Listener :
LISTENER_DMWEB.world =
(DESCRIPTION=
(ADDRESS=(PROTOCOL=TCP)(HOST=srvldbp03.int.imd.ch)(PORT=1523))
(ADDRESS=(PROTOCOL=TCP)(HOST=srvldbp13.int.imd.ch)(PORT=1523))
Txs for any Help
Rgds
Carlosyes i've check Both Adress
The tnsnames in Both Sites is :
DMWEB_SITE1.world =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = srvldbp03.int.imd.ch)(PORT = 1523))
(CONNECT_DATA = (SERVICE_NAME = DMWEB_SIET1)(ORACLE_HOME = /u01/app/oracle/product/10.2)(SERVER = DEDICATED))
DMWEB_SITE2.world =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = srvldbp13.int.imd.ch)(PORT = 1523))
(CONNECT_DATA = (SERVICE_NAME = DMWEB_SITE2)(ORACLE_HOME = /u01/app/oracle/product/10.2)(SERVER = DEDICATED))
*********** FROM SITE 1
[oracle@srvldbp03 admin]$ tnsping DMWEB_SITE1.world
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = srvldbp03.int.imd.ch)(PORT = 1523))) (CONNECT_DATA = (SERVICE_NAME = DMWEB_SIET1)(ORACLE_HOME = /u01/app/oracle/product/10.2)(SERVER = DEDICATED)))
OK (0 msec)
[oracle@srvldbp03 admin]$ tnsping DMWEB_SITE2.world
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = srvldbp13.int.imd.ch)(PORT = 1523))) (CONNECT_DATA = (SERVICE_NAME = DMWEB_SITE2)(ORACLE_HOME = /u01/app/oracle/product/10.2)(SERVER = DEDICATED)))
OK (10 msec)
[oracle@srvldbp03 admin]$
******** FROM SITE 2
[oracle@srvldbp13 bdump]$ tnsping DMWEB_SITE1
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = srvldbp03.int.imd.ch)(PORT = 1523))) (CONNECT_DATA = (SERVICE_NAME = DMWEB_SITE1)(ORACLE_HOME = /u01/app/oracle/product/10.2)(SERVER = DEDICATED)))
OK (0 msec)
[oracle@srvldbp13 bdump]$ tnsping DMWEB_SITE2
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = srvldbp13.int.imd.ch)(PORT = 1523))) (CONNECT_DATA = (SERVICE_NAME = DMWEB_SITE2)(ORACLE_HOME = /u01/app/oracle/product/10.2)(SERVER = DEDICATED)))
OK (0 msec)
[oracle@srvldbp13 bdump]$
In Both Database the Parameter LOCAL_LISTENER=LISTENER_DMWEB
When I check Dataguard Configuration
SITE 1 is OK
SITE 2 is disabled and the trace shows this Ora:12533 Error -
Database link dblink connects to ho.world
when I set global_name to true this error appear
CREATE PUBLIC DATABASE LINK sqllink CONNECT TO
"sa" IDENTIFIED BY "asd" USING 'dg4msql';
SELECT * FROM DUAL@dblink;
//error
database link dblink connects to ho.world
what the solve for this is there any global name for Microsoft SQL serverI found the answer
the solve is
CREATE PUBLIC DATABASE LINK ho.world CONNECT TO
"sa" IDENTIFIED BY "asd" USING 'dg4msql';
SELECT * FROM [email protected]; -
Connection to remote database failed
I have configured the cman.ora file and changed the connection
string for the java applet, but I encountered the error
"The NT Adapter could not establish the connection" when I tried
to connect to remote database from JDev2.0(beta).
Any ideas of what are the possible causes for this?
At the cman.ora file, the setting are:
cman = (ADDRESS_LIST=
(ADDRESS=(PROTOCOL=tcp)(HOST=<web_host_ip>)(PORT=1610))
(ADDRESS=(PROTOCOL=tcp)(HOST=<db_host_ip>)(PORT=1521))
cman_profile = (parameter_list=
(MAXIMUM_RELAYS=1024)
(LOG_LEVEL=1)
(TRACING=yes)
(RELAY_STATISTICS=yes)
(SHOW_TNS_INFO=yes)
(USE_ASYNC_CALL=yes)
(AUTHENTICATION_LEVEL=0)
At the java applet the connection statement are:
DriverManager.registerDriver (new
oracle.jdbc.driver.OracleDriver());
Connection conn =
DriverManager.getConnection ("jdbc:oracle:thin:" +
"@(description=(address_list=" +
"(address=(protocol=tcp)(host=<web_host_ip>)(port=1610))" +
"(address=(protocol=tcp)(host=<db_host_ip>)(port=1521)))" +
"(source_route=yes)" +
"(connect_data=(sid=<orasid>)))", "<user>", "<id>");
The error at the dos prompt running from JDev2 are:
java.sql.SQLException: The NT Adapter could not establish the
connection
at oracle.jdbc.dbaccess.DBError.check_error(Compiled
Code)
at oracle.jdbc.driver.OracleConnection.<init>(Compiled
Code)
at oracle.jdbc.driver.OracleDriver.connect(Compiled Code)
at java.sql.DriverManager.getConnection(Compiled Code)
at java.sql.DriverManager.getConnection(Compiled Code)
at test.Applet1.jbInit(Compiled Code)
at test.Applet1.init(Compiled Code)
at sun.applet.AppletPanel.run(Compiled Code)
at java.lang.Thread.run(Compiled Code)
Thanks,
Eye Gee
nullI am able to connect to the remote database using SQL*plus but
does it means it is using CMAN connection?
How do I test the CMAN connection from SQL*plus? Any example for
me to follow?
Thanks,
Eye Gee
mark tomlinson (guest) wrote:
: Have you tried using the CMAN connection from something like
: SQL*plus to verify that it is configured correctly? Everything
: looks correct, so it might be hiding an actual NET error
: underneath.
null -
I want to connect to remote databases which can be specified by URL
Hi,
i'm tinu
I want to connect to remote databases which can be specified by URL
the database is ORACLE 9i
pls help me, how to connect to it
i have the ip address,port address,sid,username and password of the database
is there any difference in the actual code of database connection
plss helpHi,
There is a particular example with MS SQL 2000 in thread http://forum.java.sun.com/thread.jspa?threadID=608314
In the given example you just need to change the database URL and the JDBC driver. Just examine the code a little bit.
Also you may wish to visit the SUN's JDBC tutorial on http://java.sun.com/docs/books/tutorial/jdbc/
Ferad Zyulkyarov -
NSV0: Failed to connect to remote database orcl. Error is ORA-12514
sGetting error on data guard broker configuration. redologs shiping properly, withot any problems.
Database: 11gR2 , Linux 64-bit
[root@redhat ~]# su - oracle
[oracle@redhat ~]$ sqlplus /nolog
SQL*Plus: Release 11.2.0.1.0 Production on Fri Jun 18 17:39:07 2010
Copyright (c) 1982, 2009, Oracle. All rights reserved.
SQL> connect /as sysdba
Connected.
SQL> connect sys/oracle@primarydb as sysdba
Connected.
SQL> connect sys/oracle@physicaldb as sysdba
Connected.
SQL>
*/etc/hosts file contents on all nodes*
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
192.168.1.232 redhat redhat
192.168.1.234 rac1 rac1
primary database (drcorcl.log)
2010-06-18 17:41:39.972 02010001 1362743835 DMON: CTL_GET_STATUS forwarded to site physicaldb for processing
2010-06-18 17:41:41.044 NSV1: Site physicaldb returned ORA-16664.
2010-06-18 17:41:41.045 02010001 1362743821 DMON: Database physicaldb returned ORA-16664
2010-06-18 17:41:41.045 02010001 1362743821 for opcode = CTL_GET_STATUS, phase = NULL, req_id = 1.1.1362743821
2010-06-18 17:41:41.045 02010001 1362743821 DMON: CTL_GET_STATUS operation completed
2010-06-18 17:41:41.050 01000000 1362743836 DMON: MON_PROPERTY operation completed
2010-06-18 17:41:41.054 01010001 1362743837 DMON: MON_PROPERTY operation completed
2010-06-18 17:41:41.058 01010001 1362743838 DMON: MON_PROPERTY operation completed
2010-06-18 17:41:41.062 01010001 1362743839 DMON: CTL_GET_STATUS operation completed
2010-06-18 17:41:56.045 NSV1: Site physicaldb returned ORA-16664.
2010-06-18 17:41:56.045 02010001 1362743835 DMON: Database physicaldb returned ORA-16664
2010-06-18 17:41:56.045 02010001 1362743835 for opcode = CTL_GET_STATUS, phase = NULL, req_id = 1.1.1362743835
2010-06-18 17:41:56.046 02010001 1362743835 DMON: CTL_GET_STATUS operation completed
physical standby database (drcorcl.log)
2010-06-17 00:41:30.410 drcx: could not find task req_id=1.1.1362743821 for PROBE.
2010-06-17 00:41:45.411 drcx: could not find task req_id=1.1.1362743835 for PROBE.
2010-06-17 00:42:00.546 NSV0: Failed to connect to remote database orcl. Error is ORA-12514
2010-06-17 00:42:00.547 NSV0: Failed to send message to site orcl. Error code is ORA-12514.
2010-06-17 00:42:00.547 DMON: Database orcl returned ORA-12514
2010-06-17 00:42:00.547 for opcode = HEALTH_CHECK, phase = BEGIN, req_id = 1.1.1362743840
2010-06-17 00:42:15.414 drcx: could not find task req_id=1.1.1362743840 for PROBE.
2010-06-17 00:43:15.548 NSV0: Failed to connect to remote database orcl. Error is ORA-12514
2010-06-17 00:43:15.549 NSV0: Failed to send message to site orcl. Error code is ORA-12514.
2010-06-17 00:43:15.549 DMON: Database orcl returned ORA-12514
2010-06-17 00:43:15.549 for opcode = HEALTH_CHECK, phase = BEGIN, req_id = 1.1.1362743841
Standby Lintener file contents
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = rac1)(PORT = 1521))
ADR_BASE_LISTENER = /oradisk/oracle
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DNAME = physicaldb)
(ORACLE_HOME = /oradisk/oracle/product/11.2.0/db)
(SID_NAME = orcl)
(SID_DESC =
(GLOBAL_DNAME = physicaldb_DGMGRL)
(ORACLE_HOME = /oradisk/oracle/product/11.2.0/db)
(SID_NAME = ORCL)
Primary database Listener contents
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.232)(PORT = 1521))
ADR_BASE_LISTENER = /oradisk/oracle
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DNAME = orcl)
(ORACLE_HOME = /oradisk/oracle/product/11.2.0/db)
(SID_NAME = orcl)
(SID_DESC =
(GLOBAL_DNAME = orcl_DGMGRL)
(ORACLE_HOME = /oradisk/oracle/product/11.2.0/db)
(SID_NAME = orcl)
TNSNAMES.ora on all nodes
PRIMARYDB =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.232)(PORT = 1521)))
(CONNECT_DATA =(SID = orcl))
LISTENER_PHYSICALDB =(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.234)(PORT = 1521))
PHYSICALDB =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.234)(PORT = 1521)) )
(CONNECT_DATA =(SID = orcl))
ORCL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.232)(PORT = 1521)))
(CONNECT_DATA =(SERVER = DEDICATED)(SID = orcl) )
)Don't use the old syntax 'SID=...' in tnsnames.ora, use 'SERVICE_NAME=...' . Make sure 'SERVICE_NAME' is exactly the same returned by 'lsnrctl status' on both nodes.
Primary and standby cannot talk to each other currently through the listener:
ORA-16664: unable to receive the result from a database
Cause: During execution of a command, a database in the Data Guard broker
configuration failed to return a result.
Action: Check Data Guard broker logs for the details of the failure. Fix any
possible network problems and try the command again.
ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
Cause: The listener received a request to establish a connection to a database or other service. The connect descriptor received by the listener specified a service name for a service (usually a database service) that either has not yet dynamically registered with the listener or has not been statically configured for the listener. This may be a temporary condition such as after the listener has started, but before the database instance has registered with the listener.
Action: - Wait a moment and try to connect a second time.
- Check which services are currently known by the listener by executing: lsnrctl services <listener name>
- Check that the SERVICE_NAME parameter in the connect descriptor of the net service name used specifies a service known by the listener.
- If an easy connect naming connect identifier was used, check that the service name specified is a service known by the listener.
- Check for an event in the listener.log file.
Werner -
hello
i am souvik kundu . i am using tomcat web server that is in india . Through this web server i want to connect oracle data base that is in philipins(remote) .pls tell me the code or procedure how i connect to remote data base ?????????Dear Souvik,
The physical location of the database is not of big concern while working with the java programs.
U might be aware how to connect to remote database from ur localmachine if u have databaseclient(Oracle client for example) installed in ur system.
U need to have a tnsnames.ora file to resolve the database.
An entry in the tnsnames.ora file will lokk like the following
name=( description = (address = ( host =ipnumber ) ( protocol = tcp ) (port = some port number ))(connect_data = (sid=sidname)))
Here the sidname is very important
If u have this description in the tnsnames file , then u can connect to any oracle machine in the world with the valid userid and password.
al this is another part of the story , but now our concern is to make ur tomcat application capable of conencting to remote database
there are two ways that i suggest u
1) Explicitly make connections to the remote database from withing ur java program as follows
String userId="scott";
String passWord = "tiger";
String url = "jdbc:oracle:thin:@ipnumber:portnumber:sidname";
String driver = "oracle.judbc.OracleDriver";
//This is very important
try{
Class.forName( driver );
Connection con = DriverManager.getConnection ( url,userId,passWord );
}catch(){
Here the difference is that if ur using a local database u need not to give the ip number and portnumber combination
Note:check whether ur network can contact to the destination by running the command at command prompt
> tnsping ipnumber
If tns ping doesnt work then u cant contact the remote database.
2) Use tomcat admin console screen to set up a datasource and give required information as I provided above,
Then u can obtain the connection frm the datasource.
Regards
mahi -
How a user of external database can be connected to other database
Hi
I have two databases A and B. I have one user XYZ on database B.we want user XYZ to be connected to database A and also wants to create few tables on database A. Can you please tell me what are list of steps i need to perform.
Regards,
RJ.You can create a database link between database A and B to manipulate data in database A while connected to B. But you cannot create tables using database links. It does not allow DDLs in remote database. Tranparent gateway is a database link between oracle and some other database.
Syntax is to create the link in B is
create database link <name> connect to <user_in_A> identified by <password_in_A> using 'A'; -
Using Database link to go from one database to another
Hi all,
I am trying to create a SQL-query which connects to two
different databases.
I have created a Database link, which points from on database to
the other, and have supplied the database name, username and
password.
when I try to run following query I get error ORA:02085, MY_LINK
is connecting to SIEBN1S.(domain).com
SELECT COUNT(*) FROM MY_TABLE@MYLINK;
additional info:
2 databases are exact copies on different servers (SIEBN1S and
N1SSIEB)
the MY_TABLE exists in both databases and I have rights on it in
both, I can separately connect to both databases and look into
MY_TABLE
I have created the database link using following statement (in
the N1SSIEB db):
create database link MYLINK connect to <usr> identified by <pwd>
using 'SIEBN1S'
any help is welcomeYou have set GLOBAL_NAMES to TRUE in your init.ora file. This
means your database link must have the same name as the database
you want to connect to ie SIEBN1S.(domain).com.
alternatively you can change GLOBAL_NAMES. to test this try
'ALTER SESSION SET GLOBAL_NAMES=FALSE'.
hth, APC -
Connecting to remote database without using db links
Referred Thread:
Re: Remote DB connection without DB link
In reference to the thread above, my question goes like this:
Let's say I want to run a query from a database and use data from another database. I have the user, password, SID and port number of the other database but do not want to create a separate connection using sqlplus or connect commands.
Something like this:
SQL> show user
USER is "A"
SQL> select a.col1, b.col2 from tab1 a, tab2@????? where <some condition>;
Can this connection be done on the fly ?? I agree that a DB link will do the trick, but let's say I am not supposed to create objects on the other database.You need two sets of privs on the remote database to view data in that database schema:
- create session (the schema must allow client connections to create schema sessions)
- select on other schema tables whose contents to view
You need a single priv on the local database, to connect to that remote schema on the other database:
- create database link
You also need the following in order to create the db link:
- the remote schema name and password
- IP address or hostname of the remote db server
- the remote Listener's tcp endpoint port
- the name of the remote database (SID, instance or service name)
If you do not have these privs, you cannot use/access the remote database from the local database session via a database link.
Other alternative methods needs additional privileges and objects on both the remote and local database sides - and are more complex (e.g. using web services, using web-enabled procedures, etc). -
Creating a hierarchy based on a remote database link
I am trying to create a hierarchy based on a synonym for a remote database table. The hierarchy wizard works correctly, and the table columns do appear as choices in the drop boxes. However, when I try to run the application, I get the error "No data found. This data does not exist or you do not have privileges to view it". Does anyone know how to resolve this error? Or how to work around this?
I can successfully create and query a form based on the remote table. And, I am able to create a hierarchy from other tables (which do not use a database link) without a problem.
Thanks for your help!This is the query which I am using to build a report
SELECT
rollup_timestamp "Date",
max(decode(target_guid,'199F0B201A3D71A63040BADFAA4F9E90',average,0)) host1,
max(decode(target_guid,'3FB1329F59339C07E11304B69DC4E594',average,0)) host2
FROM "sysman.MGMT$METRIC_DAILY"
WHERE
(target_guid='199F0B201A3D71A63040BADFAA4F9E90'
or
target_guid='3FB1329F59339C07E11304B69DC4E594')
AND
metric_name='Load'
AND
metric_column='memUsedPct'
AND
rollup_timestamp >= to_date('01-10-2009','dd-mm-yyyy') and rollup_timestamp <= sysdate
GROUP BY rollup_timestamp
ORDER BY "Date"
And for your previous question I couldn't even create a page.
Regards
Balaji
Edited by: user7290747 on 6/01/2010 16:17 -
Oracle 8.0.5 on RH6.0, unable to connect to remote database
Hi Everybody,
I have this problem, i have running oracle 8.0.5 on RH6.0
everything works ok for me. But when i use sqlplus on box where
is my Oracle running and try to connect to another database on
my site (which is running on HPUX) I got resul ORA-01017 invalid
username/password. Tnsping to this machine is ok, so i have this
in my tnsname.ora When i create dabase link (with user which I
try to use to connect remote database) on my local datbase to
this database then link works sucessfully too. select * from
dual@remote_database Ok. What's wrong ??? Remote database is
Oracle 7.3.4.3 on HPUX. Any difference between SQL*Net of
Oracle7 and 8 ???
nullTry putting
disable_oob = ON
in your sqlnet.ora file.
Anwar.
Radek Sedmak (guest) wrote:
: Hi Everybody,
: I have this problem, i have running oracle 8.0.5 on RH6.0
: everything works ok for me. But when i use sqlplus on box where
: is my Oracle running and try to connect to another database on
: my site (which is running on HPUX) I got resul ORA-01017
invalid
: username/password. Tnsping to this machine is ok, so i have
this
: in my tnsname.ora When i create dabase link (with user which I
: try to use to connect remote database) on my local datbase to
: this database then link works sucessfully too. select * from
: dual@remote_database Ok. What's wrong ??? Remote database is
: Oracle 7.3.4.3 on HPUX. Any difference between SQL*Net of
: Oracle7 and 8 ???
null -
Trying to create a linked server to a remote 3rd party server using an AD group
I am the DBA at our organization so I have full authority to all of our local SQL Server databases but we have data in a remote 3rd party SQL Server database that is only read-only. The 3rd party has granted the read only privileges to one of our AD
groups - let's call it mydomain\adgroup1. I would like to create a linked server from one of our local SQL Servers to the remote database. I'm not sure how to do this.
I have set the AD group up as a login and a user in my local database. When I try to create the link, I used the mydomain\adgroup1 as the local login and, since the same credentials exist in the remote server, I checked the impersonate box and click
OK but I get "mydomain\adgroup1 is not a valid login or you do not have permission". Is it possible to create a linked server using an AD group? As of now, we only have the AD group permissions in the remote database. We could probably
request a single SQL Server account to be created on the remote side and we could create the same on our side, but we are trying to keep things as simple and transparent as possible (and we would really like to move more toward AD security and away
from individual users in the db).
Can anyone give me advice on how to get these two SQL Servers linked?From your description, you likely want to implement Windows authentication for linked server, which requires to implement Kerberos constrained delegation.
I would recommend the following link to get started:
How to Implement Kerberos Constrained Delegation with SQL Server 2008 (https://msdn.microsoft.com/en-us/library/ee191523%28SQL.100%29.aspx?f=255&MSPPError=-2147217396
-Raul Garcia
SQL Server Security
This posting is provided "AS IS" with no warranties, and confers no rights.
Maybe you are looking for
-
ITunes / iPod touch not syncing correctly
I'm having two problems at the moment, the first of which is an error which comes up while syncing the mail accounts to my iPod. The following message (http://www.moventouch.com/itunes.png) comes up (the part which has been blanked out contained my n
-
When creating a photo book how do I know what size the cells are?
I'm having a hard time getting my photos to fit appropriately in the cells. Regardless of the size of the image I almost always get an exclamation point warning.
-
How to eliminate hexadicimal character # in ABAP program ?
Hello, I want to eliminate the hexadecimal character '#' within my ABAP program ('#' is the first character in a table). Can anyone help me in building the logic ? Thanks for the help. Regards, Janardhan Edited by: Janardhan N on Aug 12, 2009 8:42 AM
-
How to create xml template in landscape format
Hello Everyone, I am trying to create a template in Landscape format in xml publisher. But when i upload and run, the output is in portrait format only. Any suggestions would be helpful. Thank You Kumar
-
Test stand crashes: "test stand has detected that your script debugging"
05-01-201203:18 PM Hi everyone. I am setting up a new installation of Test stand and writing my first sequence with an existing sequence of legacy code. When I run the sequence and stop on the call to the DLL, and then step into the dll and I get thi