SQL & PL/SQL :: Calling A Remote Table In SP?

Feb 21, 2011

I have created a remote link to a sql server db in oracle 11.0.7 works fine in sql plus. I can select tables by select * from table@linkname...the link is a public link But when I put it in the procedure it says invalid table name. then I created a public synonym for the table - i can select from the synonym in sql plus - but in the procedure it says synonym translation invalid...Also I cant grant any privileges to the synonym as it says ddl operations are not allowed on remote objects

View 1 Replies


ADVERTISEMENT

PL/SQL :: Calling A Function In Remote Database Inside A Stored Procedure

Apr 9, 2013

There are 2 Oracle databases with pseudo names Remote and Local. I have a function in Remote called FUS.F_Return_10 which simply returns 10 for testing purposes, where FUS is a schema name. In Local I want to create a procedure that will call the above function. Here's the PL/SQL:

CREATE OR REPLACE PROCEDURE TEST
(
V_COUNT OUT NUMBER
)
AS
V_FOO NUMBER(2,0);
BEGIN

[Code]...

There's a Public Database Link called PER_ACC in Local. When I try to create this procedure I get: Encountered symbol "@" when expecting one of the following: .(*%&................

where my mistake is?

View 7 Replies View Related

SQL & PL/SQL :: Accessing A Table Contains Array In Remote DB?

Jan 30, 2009

How to access (create Synonym and Materialized View) a Table contains an Array of type object which is on Remote Database connecting through DBLink.

View 27 Replies View Related

DBLink Not Querying Remote Table

Apr 16, 2013

I successfully created the following DBLink in my DEV environment:

CREATE PUBLIC DATABASE LINK PROD
CONNECT TO USER1 IDENTIFIED BY pwd98
USING 'PRD';

I have a table in both schemas. In PROD it has 0 recs, in DEV it has 134 recs.

select count(*) from hold@PROD.

The above query gives me 134 recs instead of 0!

Here is my TNSNAMES entry for PRD:

PRD=
(DESCRIPTION=
(ADDRESS=
(PROTOCOL=TCP)
(HOST=localhost)
(PORT=1529)
)
(CONNECT_DATA=
(SERVER=dedicated)
(SERVICE_NAME=PRD_USR)
))

View 14 Replies View Related

SQL & PL/SQL :: Remote Grant Through Insert Statement Into Sys Table?

Jun 18, 2013

I want to grant a privilege through an insert statement into a sys table.Why do not grant the privilege through the classic way : grant select on t to l_user; ?

Because I want to do it remotely.I am connected to db1.I want to grant select on t2 to u2_b from u2_a.I assume that all DDL are DML. So a grant is equivalent "somewhere" to an insert.I tried to do my requirement locally, and here is the output.

SQL> conn scott/aa
Connecté.
SQL> -- step 1 : try to grant "normally" a select on dept to hr from scott
SQL> grant select on dept to hr;

Autorisation de privilèges (GRANT) acceptée.

SQL>
SQL> conn sys/a as sysdba
Connecté.
SQL> -- step 2 : Then, we connect to sys to see the row inserted in dba_tab_privs
SQL>
SQL> col GRANTEE format A10
SQL> col OWNER format A10

[code]...

Then if I can do it locally, I can do it remotely through a db link.

View 2 Replies View Related

SQL & PL/SQL :: Pass Object (or) Table As Argument To Remote Procedure?

Jul 18, 2012

Does it possible to pass object (or) table as an argument to a remote procedure?

View 2 Replies View Related

SQL & PL/SQL :: Ftp File To Remote Server By Reading Data From Table?

May 1, 2012

I need a way to ftp file to remote server by reading data from table. I searched a couple of sites which asked me to use Chris xutl_ftp package..but unfortunately the site is no accessible..

Here is the code

CREATE OR REPLACE PACKAGE UTL_FTP
AUTHID CURRENT_USER
AS
/**
* LICENSE: GNU Lesser General Public License (LGPL)
* Copyright (C) 2003-2006 Russ Johnson (john_2885@yahoo.com)

[code].....

View 3 Replies View Related

SQL & PL/SQL :: Changes In Remote Database

Nov 20, 2012

I want to update my table base on changes in a column of a table from remote database automatically. I just want to pick some updated column then update to my own. i have made a trigger but failed.

CREATE OR REPLACE
TRIGGER TG_UPD_ID
after update OF STUD_ID on STUDENT@SCHOOLDB
for each row
begin

update MARKS set ID_ST = :new.STUD_ID where STUDID_STUDENT = :old.IDS;

end;

Error report:
ORA-02021: DDL operations are not allowed on a remote database
02021. 00000 - "DDL operations are not allowed on a remote database"
*Cause: An attempt was made to use a DDL operation on a remote database.

For example, "CREATE TABLE tablename@remotedbname ...".

*Action: To alter the remote database structure, you must connect to the remote database with the appropriate privileges.

View 11 Replies View Related

Datapump Use In Remote Servers

Nov 19, 2008

We have eight servers. One of them is for centeral management. The other seven is for development and test databases. Every night, we start a process which exports database schemas (without data) into the centeral server. An example of the process we run is just like below:

CODEcd /data1/backup
mknod exp_pipe_oracle1 p
compress<exp_pipe_oracle1>dev.dmp.Z&
exp user/****@dev file=exp_pipe_oracle1 owner=schema1,schema2,schema3 statistics=none rows=n log=dev.log

As you can see, we use @dev to connect remote database. But dump file is created in local (centeral) server. We are planning to use datapump instead of classic export in future. But I couldn't find a solution, that could take a database export in a remote server and create dump file in local. I have looked at NETWORK_LINK parameter; but it doesn't seem to work for our case.

Is it possible to backup a remote database with datapump and make it create dumpfile in local? (Of course we can use some solutions such as NFS, but we really not prefer this; if datapump has ability to remotly backup.)

View 5 Replies View Related

Remote DB Query With Joins?

Feb 23, 2012

We have access to a remote Oracle database in Germany and need to insert selected data to our local Oracle database. Our problem is that we have to do several joins (7 tables) on the remote database as well as using one where clause (always the same: P.T_LIEF_LFNT_1='12803193').

Unfortunately we do not have rights to create a view on the remote database. Is there another way to send the entire query to the remote database for processing? Also, the query returns approximately 34,000 rows.

Here is our current query:

INSERT INTO PRIMUS(PARTNO,
SORT_FORMAT,
TP_WORKSPACE,

[Code].....

View 3 Replies View Related

Security :: Remote Connection Using SYS

Jan 8, 2013

while testing SYS remote connection in our staging server. Executing the command below is OK:

sqlplus sys/<password>@sales as sysdba

While this is mind-boggling for me...

sqlplus sys@sales as sysdba
Enter password:
ERROR:
ORA-01017: Message 1017 not found; No message file for product=RDBMS,
facility=ORA

Enter user-name:
ERROR:
Error while trying to retrieve text for error ORA-01017

I entered the correct password.I've been simulating this for a couple of times, even tried the copy-and-paste method.

View 8 Replies View Related

SQL & PL/SQL :: How To Check Remote Connection

Mar 15, 2011

I working on data transferring from one database server to another database server. but at starting i want to check weather remote database is connected or not?

for e.g.

a := get_remote_connection; --- Calling function for check remote connection return boolean
if a then
<call my data_transfer_proc>
else
exit;
end if;
reply.

View 4 Replies View Related

SQL & PL/SQL :: Ping Remote Database

Nov 21, 2011

I have 2 database . One is production and other is Integration and I have one table "emp" which is on integration server and a synonym of that table with the same name"emp" on production. On production we have a proc in which we are using "emp", but some time our integration server goes down, so is there any way to ping the integration server inside the proc and if it returns success then we will execute the rest of code of proc , otherwise it will send a mail to us saying that integration server is down.

View 1 Replies View Related

Oracle 11.x Log To Remote Syslog

Apr 3, 2013

We are running Oracle 11.2.x DB on Solaris platform. Looking for a way to see if I can send alert log and listener log to a remote syslog server? I know there are some other methods like Epilog and some other scripts that could be used, but wondering if there is a "built-in" method to accomplish this?

View 4 Replies View Related

Add Datafile On Remote Computer

Sep 19, 2012

i am working on oracle 10g windows & all my disks are full and i want to add a datafile on other computer . how can i do it ?

View 11 Replies View Related

Remote Migration Of Data

Oct 30, 2012

Is there any oracle utility to do remote migration of data or it is possible only using some third party software.

View 1 Replies View Related

Rman Remote Access

Mar 16, 2011

I am unable to access remote (hosted on remote server) database using rman.

When I try to connect using "rman TARGET sys/syspwd@db" I am getting:

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00554: initialization of internal recovery manager package failed
RMAN-04005: error from target database:
ORA-12520: TNS:listener could not find available handler for requested type of server

I the same time I am able to login using sqlplus (sqlplus sys/syspwd@db as sysdba) without any issue.

What am I doing wrong?

View 1 Replies View Related

RMAN Backup To Remote Machine

Nov 2, 2011

am trying to backup my oracle database using RMAN to a remote machine. both systems are using redhat linux. i have successfully configured NFS on my remote machine and mounted it from my oracle database machine.

i then configure rman channel to disk on mounted linux directory..when i take full backup of database i receive this error

ORA-19504: failed to create file "/mnt/ora_df766174940_s104_s1"
ORA-27054: NFS file system where the file is created or resides is not mounted w
ith correct options
Additional information: 3

How do i mount this with correct options the error msg says OR what do i do to backup to the said directory?

View 5 Replies View Related

SQL & PL/SQL :: Terminate Script If Remote Database Is Down?

Sep 19, 2011

I have a simple script which fetch data from another SQL server database.

The remote SQL Server database is accessed by oracle thru gateway, and a simple DB link is made in local database to the remote oracle datbase (which actually access the MS SQL Server)

The SQL script empties all the data in local database, and fills it with the fresh data from MS SQL server.

Problem is sometimes SQL Server is down, and i lose all the data in local database. The script runs automatically as schedualed job. I want to make my script intelligent enough to terminate the script if the other database is down.

View 7 Replies View Related

Active Calls From Remote Machines

Mar 24, 2011

My Oracle DB 10g R2 running on AIX 5.3 OS. When I am shutting down the oracle I see that it is waiting for complete the active calls and I determined that these active calls/processes are from remote machines.

When I try to run this ps -ef as shown below, it shown me number of oracle process with LOCAL=NO

/home/oracle> ps -ef | grep 91334
oracle 85210 87320 0 12:47:56 pts/35 0:00 grep 91334
oracle 91334 1 0 12:45:11 - 0:00 oracleIDB (LOCAL=NO)

What are the possible scenarios for this LOCAL=NO? How do I find that this process is from which machine or IP address?

View 2 Replies View Related

SQL Developer Will Remote Connect / SQLplus Will Not

Jul 19, 2010

When I try to remotely connect to an Oracle schema using SQLplus, I consistantly get this error:

ORA-12514: TNS:listener does not currently know of service requested in connect descriptor

Yet I can connect to the same machine, from my own machine just fine using SQLDeveloper.Here are the details I have collected so far

- I am using the instantclient for OS X
- export DYLD_LIBRARY_PATH=/Users/jeff/instantclient
- export ORACLE_HOME=/Users/jeff/instantclient
- export TNS_ADMIN=/Users/jeff/instantclient/tns

The command line i ran : ./sqlplus seam_classoft/seam_classoft@//oracle11gtest.terida.net:1521/orcl

Its behind a VPN, so I'm not worried about posting my info.

My /Users/jeff/instantclient/tns/tnsnames.ora that I copied directly from the server looks like this:

ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = oracle11gtest.terida.net)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl.terida.net)
)
)

I've tried changing SERVICE_NAME to SID = orcl, no change inbehavior. My original guess was that the database wasn't registered with the listener, but that would mean sqlDeveloper should fail as well, but it works.Here is out put of lsnctrl status:

LSNRCTL> status
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date 07-JUN-2010 09:16:40
Uptime 42 days 0 hr. 58 min. 59 sec
Trace Level off
[code]....

View 4 Replies View Related

Forms :: How To Connect Remote Database Using 6i

Sep 3, 2009

I installed oracle 10g and developed simple software using forms 6i. Its working well as a stand alone system.

I want to share it in network. so I installed forms 6i as oracle client , copied the tnsnames.ora from the oracle installation path to forms installation path.(inside NET80/Admin folder)

When i try to connect with user name and password , it comes ORA-12203 Unable to connect to destination. I checked LSNRCTL in the database machine, it is listening.

View 11 Replies View Related

Server Administration :: Setup Remote DB?

Jan 27, 2011

setup REMOTE DATABASE (or provide me a good link, which tells step by step procedures).

View 4 Replies View Related

PL/SQL :: How To Write Proc That Checks Remote DB

Dec 4, 2012

I have a one critical remote PROD database that I want to check every 10 mins for its connectivity. If connection fails then an email & SMS is sent to me. My question is what is the best way to check if the remote database is up and running?

Can I use sqlplus system/manager@PROD? But sometimes this took so long and hanging. I want the fastest response time? How do I write a pl/sql proc check connection? That do something like the ff:

I created a table for my tnsname.ora entries.

cursor is c1 select dbname from tnsnames_tbl;
begin
connect system/manager@c1.dbname;
print c1.dbname || 'DB Connection OK';
exception
when others;
print c1.dbname || 'DB Connection Not OK';
end;
end;

View 9 Replies View Related

PL/SQL :: Referencing Remote Object Type

Aug 5, 2013

How can I reference an Object Type created on a remote database?This is the escenario:   

In DATABASE A:   CREATE OR REPLACETYPE  USERA.EXPO_EXPEDIENTES_RECAUDOS OID 'DCADCB2EA2344DFAB1D205C03D708359' AS OBJECT (   exer_cd_expediente  VARCHAR2 (50),   exer_id_ident_expediente   VARCHAR2 (30),   exer_cd_sucursal   NUMBER (3),   exer_cd_ramo NUMBER (2),   exer_nu_poliza   NUMBER (7),   exer_nu_certificado  NUMBER (9),   exer_nu_contrato  NUMBER (7),   exer_cd_nacionalidad  VARCHAR2 (1),   exer_nu_cedula_rif   NUMBER (9),   exer_nm_titular   VARCHAR2 (70),   exer_st_expediente  VARCHAR2 (2),   exer_de_status_exp   VARCHAR2 (240),   exer_fe_status_exp   DATE,   exer_cd_productor   NUMBER (5),   exer_nm_productor  VARCHAR2 (60),   exer_cd_mail_productor  VARCHAR2 (50),   exer_in_habilitado   VARCHAR2 (1),   exer_in_permite_habilitar  VARCHAR2 (1),   exer_in_carga_consulta  VARCHAR2 (1),   exer_cd_ramo_aplicacion    VARCHAR2 (200),   exer_cd_producto  VARCHAR2 (6)  )/ In DATABASE B:   

After creating the public synonym and asigning the required privileges on the object in DATABASE A, I try to execute the following:  

DECLARE x  EXPO_ EXPEDIENTES_RECAUDOS;BEGIN null;END;   

But i got the following error:

ORA-06550: line 2, column 12:PLS-00331: illegal reference to

USERA. EXPC_ EXPEDIENTES_RECAUDOS@DATABASEA   

After investigating a little i found the following, but i dont know how to apply it, "The CREATE TYPE statement has an optional keyword OID, which associates a user-specified object identifier (OID) with the type definition. It should be used by anyone who creates an object type that will be used in more than one database."

View 4 Replies View Related

TNS Error : Connecting To Remote Oracle DB From .Net

Sep 22, 2010

I have been trying to connect to an remote oracle db from c# .Net . I believe I have the proper code (Cos when the user id and password strings were omitted , it threw an error of invalid user Id and password).

Once this was properly provided , the connection is now throwing "TNS Error : No Listener " error . The same remote DB is perfectly connecting through TOAD and it is from the tnsnames.ora file of the local file that i got the connection string from . Hence , I don't thing its a problems with that as well.

View 7 Replies View Related

Calling Tables From PL / SQL

Jan 22, 2013

I have the Table name Location and synonym named Location in my DB. I am trying to create the proc where I am tryting to call the table. But its not working.

Example:
CREATE PROCEDURE TESTPROC
AS
BEGIN
DBMS_OUTPUT.PUT_LINE('testing');
select count(*) from LOCATION;
END;

Compile error:
Error(5,22): PL/SQL: ORA-00942: table or view does not exist

View 2 Replies View Related

SQL & PL/SQL :: Calling From Ksh Script?

Aug 20, 2013

I have to write a .ksh script. In which i have to first pick the details using a sql query (select job from sys.dba_jobs where broken='Y';), Now for each job number i have to execute a procedure (EXEC DBMS_JOB.BROKEN('job number',FALSE);)

View 2 Replies View Related

Connecting To Remote DB - Getting Error When Try To Open File

Mar 8, 2011

I am trying to connect to a remote database (Oracle) using my Windows terminal and I am successfully able to connect. But when I try to open a SQL File is gives the following error:

SQL > @int1.sql
SP2-0310: unable to open file

I found out that this error occurs when the file name or the path is invalid. But since I am having a remote access I really don't know the location. What can be done to remove this error?

View 1 Replies View Related

APEX ADMIN Access From Remote Machine

Oct 18, 2010

I have installed oracle 11g and configured Apex application on it. I am able to open the Admin window from my machine . URL.... and everything works fine. But when I try to open the link from other machine I get "Server not found" error.

I read the posts it says to enable Http for other servers . I dont find the way to do it .

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved