SQL & PL/SQL :: Using A Database Link In A Scheduled Job?
May 12, 2010
A procedure in a package uses a database link. The database link is defined without a username and a password. The user that uses the database link is supposed to be present in the opposite database as wel.
When the procedure is started in SQL*Plus or TOAD it runs perfect. But the procedure has to run in a scheduled job. And that doesn't work. The procedure fails because of: ORA-01017 invalid username/password. The user that is used to run the scheduled job is the right one.
View 5 Replies
ADVERTISEMENT
Oct 24, 2012
I have a 11.2.0.1 database windows 2008 server. I have RMAN with nocatalog. I need to take daily RMAN backup of database at 6 PM.
I want to schedule this RMAN backup to run automatically. I want to run this backup when I am not logged on.
View 2 Replies
View Related
Mar 17, 2010
i would like to import a table from another database by using database link.
impdp muba/muba tables=FUNCTION_NO directory=testdump NETWORK_LINK=DBLINK1
i created the public database link as system user
it gave error like
Import: Release 10.2.0.1.0 - Production on Wednesday, 17 March, 2010 11:07:02
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Release 10.2.0.1.0 - Production
Starting "MUBA"."SYS_IMPORT_TABLE_01": muba/******** tables=FUNCTION_NO directory=testdump NETWORK_LINK=DBLINK1
Estimate in progress using BLOCKS method...
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
[code]....
after that i try to import as system user like
impdp system/passwd tables=FUNCTION_NO schemas=muba directory=testdump NETWORK_LINK=DBLINK1
but error like
Import: Release 10.2.0.1.0 - Production on Wednesday, 17 March, 2010 11:27:43
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Release 10.2.0.1.0 - Production
UDI-00010: multiple job modes requested, schema and tables.
when i use IMP utility
imp system/passwd file=dump.dmp fromuser=userA touser=userB log=dmplog.log but when i use IMPDP what is the parameter equal to fromuser & touser
View 3 Replies
View Related
Jun 26, 2013
Is it possible to use Database authentication in APEX through database link, and how?Also is it posible to read roles from users through database link?
View 3 Replies
View Related
Jul 5, 2012
I am trying to create a database link from the 11g database to the 10g database using:
create database link ORCL10R2 connect to <username10g> identified by <password10g> using <db10g>;
It Returns
Database link created.
select sysdate from dual@ORCL10R2 returns error:
ERROR at line 1:
ORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA
what changes I need to make to tnsnames and listener at both servers.
View 1 Replies
View Related
May 15, 2013
I am newbie to oracle database.
I am using oracle 9i version and in EMCA satndalone application . I have created database links.
The database links have been created, and three databases are local.
When i am pressing the test button in emca . It gives notification database link not active.
What should i do?
View 3 Replies
View Related
Jan 28, 2013
I have installed oracle database 11gr2 in laptop1 and installed oracle database 11gr2 in laptop2.Both the laptop's are connected to same internet connection through wifi. So my question is can i create a database link between these two databases using this wifi? give some steps in creation of a database link.
View 13 Replies
View Related
Jul 10, 2013
i need access to a view running on another database server. i configured my db link and tried to compile the view. but the following message occurs: ora-12154: TNS: Connection Identifier..
View 16 Replies
View Related
May 20, 2009
In Oracle 10gR2.If a materialized view uses a database link for the query in order to create a snapshot of data on a remote instance, does the name of the database link have to be an entry in the tnsnames.ora file?
The following link suggests not, but is not version specific: Materialized View - Oracle Wiki FAQ
However, the following 11g documentation suggests that the database link name must be the same as the global name of the target database.URL..
I can't any info specific to 10gR2.
We have three instances. Our application metadata is stored in a schema in B.METADATA. There is a shell schema (B.METADATASHLL) that provides access to the tables to remote applications.
On instance A, we have a shell schema (A.METADATASHLL) that creates materialized views as follows:
CREATE DATABASE LINK METADATA_PRIME
CONNECT TO metadatashll IDENTIFIED BY password
USING 'B';
Our materialized view is created using the query SELECT * FROM METADATA.APPLICATIONS@METADATA_PRIME WHERE Application = 'A';
The query works, but the materialized view does not.I'm being told that the database link has to be named B as follows
CREATE DATABASE LINK B
CONNECT TO metadatashll IDENTIFIED BY password
USING 'B';
Which means that I can only have one public link to instance B, and I'm in a pickle if I create a second application (which I have) using the same model).
View 6 Replies
View Related
Jan 9, 2012
I found a link to a topic concerning this issue (click here), but the question mentions that the poster was looking for a "band-aid" fix...if this method will work for a more long-term solution
View 1 Replies
View Related
Jun 18, 2013
Usually where should we create the database link? In the production or development? create public database link dblinkname connect to user_in_db2 identified by password_in_db2 using 'tnsentry name in db2'; In production or development?
View 2 Replies
View Related
Jul 5, 2012
I am trying to create a database link from the 11g database to the 10g database using:
create database link ORCL10R2 connect to <username10g> identified by <password10g> using <db10g>;
It Returns
Database link created.
select sysdate from dual@ORCL10R2 returns error:
ERROR at line 1:
ORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA
what changes I need to make to tnsnames and listener at both servers.
View 8 Replies
View Related
Jun 7, 2011
Is it possible create dynamically database link within procedure.
It give me the following error
ORA-01031: insufficient privileges
But i can drop database link within procrdure.
Is there any way to do this?
View 4 Replies
View Related
Oct 26, 2013
I have a staging which connects to RAC clusters via dblink..I have a scenario to collect the hostname,systimestamp whenever i do a query from this rac clusters
So in general below would be cool
select UTL_INADDR.GET_HOST_NAME,sysdate,x,y,z from gv$symmetric would work perfect
But on dblink..
select UTL_INADDR.GET_HOST_NAME,sysdate,x,y,z from gv$symmetric@dblink.is returning local timestamp and hostname which is not intended
So i even tried subquery..
select (select host_name,systimestamp from v$instance),t UTL_INADDR.GET_HOST_NAME,sysdate,x,y,z from gv$symmetric@dblink
this would work in certain case ...But it certain cases it would throw an error saying mutiple rows from asubquery .All ineed is to get hostname,systimestamp append to all sql i fetch from any this rac clusters through this dblinks.
View 8 Replies
View Related
Jun 19, 2012
in a 9.2.0 db I create a db link but does not function :
CREATE DATABASE LINK "ONEDB"
CONNECT TO "user1" IDENTIFIED BY "****" USING 'ONEDB';
SQL> select * from dual@"ONEDB";
select * from dual@"ONEDB"
*
ERROR : ORA-12154: TNS:could not resolve service nameBut on the same server I can connect to 11g in sqlplus :
Z:>sqlplus /nolog
SQL*Plus: Release 11.2.0.3.0 Production on Mar. Juin 19 10:13:45 2012
Copyright (c) 1982, 2011, Oracle. All rights reserved.
SQL> connect user1@ONEDB
password :
Connected.Of cours the other DB links toward 9.2.0 databases work well.
View 4 Replies
View Related
Jun 17, 2009
the procedure to link oracle 9i database server withi 10i.
View 1 Replies
View Related
Dec 8, 2008
Here is the information about database I need to connect from my view, as the underlying table for my view is in this database
Database instance : orcl
Machine name : contentm (not sure, if this needs to be used)
so in my schema, I tried the following
CREATE DATABASE LINK product_lnk2 USING 'orcl'
select * from cont20.V_FB_PRODUCT_NM@product_lnk2
where cont20 is the schema on orcl
But it gives me this error ORA-12154: TNS:could not resolve the connect identifier specified
View 4 Replies
View Related
Jun 6, 2013
I would like to create a view on the Oracle which points to SQLserver tables.
oracle db version : 10g
sql server version :sql server 2008 R2
View 2 Replies
View Related
Oct 13, 2010
how to encrypt 9i database-link passwords? In 10g when we browse the link it show **** but in 9i it shows the actual password.
View 5 Replies
View Related
Aug 29, 2012
I want to create a database trigger which will test the database link, if it is ok then it will use dblink and do its work.
If it fails then it will send the data into its own server logfile.
I Wrote:
CREATE OR REPLACE TRIGGER PERMIT.TESTTRG
AFTER INSERT OR UPDATE
ON PERMIT.TR_LP_M_H_COMPANY_25072012
REFERENCING NEW AS New OLD AS Old
FOR EACH ROW
Declare
l number; nIgn PLS_INTEGER; nRows PLS_INTEGER := 0;
[code]....
When I execute it it is giving error:
LINE/COL ERROR
-------- -----------------------------------------------------------------
4/11 PLS-00201: identifier 'EXEC_SQL.CONNTYPE' must be declared
4/11 PL/SQL: Item ignored
8/2 PLS-00320: the declaration of the type of this expression is
incomplete or malformed
[code]....
View 4 Replies
View Related
Jul 26, 2011
I am having database A and database B and I am inserting into database b by selecting some records from database a using db link.Is there any way to find whether database link is being used?
View 6 Replies
View Related
Feb 15, 2011
How to call a procedure by passing the db link dynamically.
View 1 Replies
View Related
Jun 8, 2011
I have a business area rfprod and i the folders in it were imported by me from an oracle 10g database. Usually i right click and import from databse, when i get the box instead of the default database i used to select the database and import the folders, but now the database has been moved to 11g and i cannot access the databse as i have to alter the database link.
View 2 Replies
View Related
Feb 15, 2010
Database version:10.2.0.3
Operating System:Microsoft Windows XP
I have two database TEST and TEST2 on same windows machine. In TEST database i have created one database link that access one schema in other TEST2 database. but when i passed select command to access object in TEST2 through Database link it is hanging indefinitely.
command that i have used to create Database link: create database link scott connect to scott identified by tiger using 'TEST2'
This is sqlnet.ora Entry:
SQLNET.AUTHENTICATION_SERVICES = (NTS)
NAMES.DIRECTORY_PATH= (TNSNAMES)
TNSNAMES.ORA entry:
TEST2 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = SSIPL-LAPTP-052)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = test2)
[code]....
View 3 Replies
View Related
Mar 11, 2010
I am trying to create a database link using this syntax:
CREATE PUBLIC DATABASE LINK remote
USING 'remote';
where 'remote' is the service name. It creates it successfully giving the message "External database Created"
Note: I am doing using TOAD
But when i am trying to query something like
select * from scott.employee@remote
it gives an error:
ORA-12154: TNS:could not resolve the connect identifier specified
But the 'remote' db entry exists in the tnsnames.
View 14 Replies
View Related
Mar 18, 2011
1. we have to use shared server mode with Xa transactions, if not we get this error:
QUOTE ORA-24777: use of non-migratable database link not allowed
Cause: The transaction, which needs to be migratable between sessions, tried to access a remote database from a non-multi threaded server process
2. The SGA and PGA_AGGREGATE targets are limitted to 4GB as an Oracle consultant's recommendation [I don't know the reason, but I have been informed that it is recommended so I don't dare to increase it]
Taking into consideration the above points and the below information, what should I do then... I'm not willling to change the workarea size policy to manual as I'm affraid of the consequences...
QUOTE MTS becomes downright dangerous when Automatic Shared Memory Management (ASMM) or Automatic Memory Management (AMM) is in place.
When you use MTS and AMM (or ASMM) together, PL/SQL programs that try to create large collections can effectively consume all available server memory with disastrous consequences . .
AMM allocates virtually all memory on the system to the large pool in order to accommodate the PL/SQL memory request. First it consumes the buffer cache, then it reduces the PGA_AGGREGATE_TARGET - all the way to zero!"
View 1 Replies
View Related
Jul 2, 2012
My problem is I have 3 tables (TEST_TBL1, TEST_TBL2, TEST_TBL3). TEST_TBL2 and TEST_TBL3 are in remote database and I use database link to join them. The following query returns incorrect result (I seems that it ignore the where clause)
SELECT * FROM TEST_TBL1 JOIN TEST_TBL2@db_remote USING (KEY1) JOIN TEST_TBL3@db_remote USING (KEY2) WHERE KEY1=XXX OR KEY2=YYY;
I am on 11R1 (11.1.0.7)
FOR EXAMPLE:
Local database:
CREATE TABLE TEST_TBL1
(
KEY1 NUMBER(5) NOT NULL,
[Code].....
View 8 Replies
View Related
Nov 23, 2012
I have one PLSQL package that does a join of two tables of remote database instance via the datalink. I just wonder where the most calculation(the join) is done, local machine or remote machine? Is there any best practice to have a better performance for such configuration.
View 3 Replies
View Related
Oct 11, 2013
on my Windows 7 machine with Oracle Client 12.0.1.0 installed I'm trying to create a database link to a database server, that runs under Oracle Standard Edition1 11.2.0.2. When i login to sqlplus on the client with "sqlplus /nolog" and type the command : SQL> create database link SID connect to user identified by passwd using 'tnsnames.ora connection'; I'm getting an SP2-0640: not logged in.
Ok, thats clear, because i use sqlplus with /nolog option. But on client side normally I have no database, where I can login. So I think, there will be no user, or? The database to which I want to connect is set in tnsnames.ora. Generally: Is it possible to use the Oracle Client to create a database link?
View 8 Replies
View Related
Feb 24, 2011
I have 2 databases:
Database A
Database B
In Database A I have a series of config tables and stored procedures/functions In Database B I have a lot of tables.
I would like to execute my stored procedures and all associated functions in database A on my data in database B.
Now I've figured out that creating a database link enables me to do SQL selects on data in both A and B...but how do I run SP/Funcs ? I've read something about packages but not sure if I'm heading in the right direction.
Do I need to create a simple synonym ? Can I use the existing DB link ? or is there a special way of calling them, or...
I like the A/B database set up since I can keep battle tested code in one location and have it work across multiple dbs...saves me having to create everything in every database.
View 2 Replies
View Related