SQL & PL/SQL :: Accessing Data From Server By Using DBLINK
Oct 22, 2010
We are accessing data from the server ADM.WORLD by using DBLINK.We got the following error.
PL/SQL: ORA-04052: error occurred when looking up remote object
sysadm.PS_HP_INC_ELIG_VW@ADM.WORLD
ORA-00604: error occurred at recursive SQL level 1
ORA-28000: the account is locked
ORA-02063: preceding line from ADM
For that we checked in the server ADM.WORLD for the account the account is showing locked .After that we successfully accessed the object sysadm.PS_HP_INC_ELIG_VW@ADM.WORLD.
For next day also the account is locked.Why the account is frequently locking.
View 15 Replies
ADVERTISEMENT
Apr 17, 2012
I just created a dblink from our Oracle 9i database to a SQL Server 2008 R2 Server using oracle heterogeneous services. The dblink seems to be OK and I can query the remote SQL Server database but I only get results for numeric columns.
Say the remote SQL Server table was created like:
CREATE TABLE [MITLOC] (
[MLCONO] [numeric](3, 0) NOT NULL,
[MLWHLO] [nchar](3) NOT NULL,
[MLITNO] [nchar](15) NOT NULL,
[MLWHSL] [nchar](10) NOT NULL,
[MLBANO] [nvarchar](20) NOT NULL,
[MLCAMU] [nvarchar](20) NOT NULL,
[MLFACI] [nchar](3) NOT NULL,
[MLWHLT] [nchar](2) NOT NULL,
[MLSTQT] [numeric](15, 6) NOT NULL)
The remote dblink is named after M3PREP.
Then if I run:
CODEselect MLCONO, MLSTQT from MITLOC@M3PREP => this works OK and I get the two columns.
If I run:
CODEselect * from MITLOC@M3PREP => I get the same results as in the previous query and all nchar, nvarchar type columns are missing, I only get the same two columns.
If I run:
CODEselect MLCONO, MLWHLO from MITLOC@M3PREP=> I get ORA-00904 - the column name entered is either missing or invalid.
I set up my .ora init file like this, I suspect there is something missing here, is it related to the NLS_LANG or so?
CODE#
# HS init parameters
#
HS_FDS_CONNECT_INFO = M3PREP
HS_FDS_TRACE_LEVEL = 4
HS_FDS_TRACE_FILE_NAME = M3PREP.LOG
#
# Environment variables required for the non-Oracle system
#
#set <envvar>=<value>
View 1 Replies
View Related
Aug 25, 2011
Can we use this format for accesing data from other DB or Schema?
In From clause
database_name.schema_name.table_name
View 7 Replies
View Related
Feb 29, 2012
1.As we can create materialized view for accessing data from other schema but same database. will it be effective or it will act as a normal view.
2.Will materialized views can be created in Fast mode for the above scenario?
View 4 Replies
View Related
Feb 21, 2013
I am inserting XMLTYPE data using DBLINK I am getting the following error.
INSERT INTO APSP.SALES_HISTORY@APSP_LINK
SELECT * FROM KMBS.SALES_HISTORY
ORA-22804: remote operations not permitted on object tables or user-defined type columns
Source table structure
Name Null? Type
----------------------------------------- -------- ----------------------------
SC_NO NOT NULL NUMBER(25)
LT_DATE TIMESTAMP(6)
METHOD XMLTYPE
Target table structure(another DB)
Name Null? Type
----------------------------------------- -------- ----------------------------
SC_NO NOT NULL NUMBER(25)
LT_DATE TIMESTAMP(6)
METHOD XMLTYPE
how to insert XMLTYPE data using DBLINK.
View 16 Replies
View Related
Jan 11, 2013
We have been upgrading our servers to Server2008 and are getting..
[ORA-3134: Connections to this server version are no longer supported.]
..using the drivers we used to use in XP and Server2003 to access a legacy Oracle7 db. Connections to this db are needed for typical CRUD functionality by multiple applications, some written in Classic ASP and some in C# .NET 3.5 & 4.0. I have tried ODBC drivers (System.Data.Odbc) and also ODP (Oracle.DataAccess.Client) to no avail.
Any existing driver solution to make this connection without have to resort to a custom HLI interface?
I would think we aren't the only ones needing to access Oracle7 from Server2008.
View 7 Replies
View Related
May 31, 2010
Recently i am installed oracle9i in my laptop.In oracle scott/tiger accessing. But system/manager not accessing.
View 4 Replies
View Related
Oct 30, 2012
I have database A and B , we are strictly restricted to not to create any DB links between these database. In database A based on complex logic we in a stored procedure we populate the data to table type..now dot net will take this table type data and insert the same in database B.
Question here :
1.When we try to bulk collect all the data into table type , i am getting error operand exceeds limit, but it is mandate to put all data in one short to table type as dot net will take that and insert into B database.
2.Is there any good logical method to achieve this in a simple way.
View 3 Replies
View Related
Jul 21, 2010
Source and Target db version : 10.2.0.4.0
Source Os :Cent OS 5.4 and Target OS:Sun OS 5.10
We are loading data from source DB to target DB using dblink.Source db is having 15.4 crore records of number and varchar2 data types.
Using the logic as follows.
insert into table1 as select * from table1@dblinkname[/email];
DB link is working.If I give "select * from scott.REPORT@DBLINK[/email]" in target db alone i could retrieve records.
Actual query:
Create Or replace procedure test_abcd as
begin
Insert into test select *
from scott.REPORT@DBLINK[/email]
dbms_output.put_line('Hello world');
end;
When i give the above query in sqlplus ,it is hanging. When i see the wait events i could find
"Wait Event: SQL*Net more data from dblink"
How to get the above things working.? when checked with network team they says there is no issue in the network. Do we need to modify any database/network level parameter settings.there is no firewall between source and target db.
View 9 Replies
View Related
Aug 13, 2012
I would like to run below query on all tables, however it doesnt work on clob and long datatypes
select * from owner.table_name
minus
select * from owner.table_name@remote_db;
from dba_tables
where owner in ( '....');
ORA-00932: inconsistent datatypes: expected - got CLOB
How can I compare the data of clob and long datatypes using dblink ?
View 2 Replies
View Related
Jul 17, 2013
I'm try to connect to databases with DBLINK. It works, but I drop the dblink to do it again in the final server. The problem that I now is that there is not any DBLINK in my database but I can see the data of the other database (with select 1 from DATABASE.TABLE)
Is my database saving the data of the other database without de DBLINK?
View 4 Replies
View Related
Jun 14, 2012
will it be possible to create db_link between two operating system authenticated users belongs to different databases?
View 5 Replies
View Related
Nov 12, 2013
Oracle 11g on linuxdestination : ms sql server 2005 i need to create the db link from oracle to ms sql server to view the tables , is it posibble without configuring the gateways( as looks like it is licenced product)
View 2 Replies
View Related
May 21, 2010
We have created a new db link. But we are not able access the remote database. When we are trying to access any table using db link system is getting hanged.
We would like to know what are the parameters/permissions which affect the db link access either at data base level or at server level.
One observation we made is that that particular db link is not getting dropped when we tried to drop it.
View 2 Replies
View Related
May 16, 2011
A single master schema where many developers are accessing. all share same password.
now i would like to trace all the changes made by each users. so i create a individual users for all and grant permission to access that schema.do i have a possibility of auditing the changes did by each user for that particular schema
View 2 Replies
View Related
Jun 17, 2008
I have a schema whereby a table is not joined with other tables.
the info on that table can be gotten manually (by doing a query) and then using that info in another query. so is there a way of getting info from that table?
View 8 Replies
View Related
Oct 7, 2009
have a log file in unix server under(/usr/home/oraj/log/abc.log) I am trying to access from oracle stored procedure as fallows
src_clob BFILE := BFILENAME('/usr/home/oraj/log', 'abc.log');
Exception:
ERROR at line 1:
ORA-22285: non-existent directory or file for FILEOPEN operation
ORA-06512: at "SYS.DBMS_LOB", line 716
ORA-06512: at "usr.LOAD_CLOB_FROM_XML_FILE", line 39
ORA-06512: at line 1
I dont want to create directory as such ('/usr/home/oraj/log') as it is already exists and all log files sits there.
CREATE OR REPLACE PROCEDURE Load_CLOB_From_XML_File
IS
dest_clob CLOB;
src_clob BFILE := BFILENAME('/usr/home/oraj/log/', 'abc.log');
dst_offset number := 1 ;
src_offset number := 1 ;
[code]...
View 1 Replies
View Related
Aug 5, 2011
when i am writing dump from external table, it is accessing records from dump.but when i am trying to access other dumps(create thru expdp) it is giving error.the logic i am following is mentioned below-
CREATE OR REPLACE DIRECTORY "DIR_GMS" AS 'D:Gopal_works est_env_files'
GRANT READ ON DIRECTORY dir_gms TO gopal;
GRANT WRITE ON DIRECTORY dir_gms TO gopal;
-- creating dump file in directory
CREATE TABLE emp_ext
ORGANIZATION EXTERNAL
(
TYPE ORACLE_DATAPUMP
DEFAULT DIRECTORY dir_gms
LOCATION ('emp_ext_dmp.dmp')
)
[code]......
i am able to see records.
New point:
-- taking export thru expdb
expdp hr/hr tables=EMPLOYEES directory=DIR_GMS dumpfile=HR_EMP.dmp logfile=expdpEMP.log
then i created one EXTERNAL TABLE TO access it.
CREATE TABLE emp_xt (
EMPLOYEE_ID NUMBER(5),
FIRST_NAME VARCHAR2(50),
LAST_NAME VARCHAR2(50))
ORGANIZATION EXTERNAL (
TYPE ORACLE_DATAPUMP
DEFAULT DIRECTORY dir_gms
LOCATION ('HR_EMP.DMP')
);
while accessing, it is giving error:
SELECT * FROM EMP_XT
ORA-29913: error IN executing ODCIEXTTABLEOPEN callout
ORA-31619: invalid DUMP FILE "D:Gopal_works est_env_filesHR_EMP.DMP"
ORA-06512: AT "SYS.ORACLE_DATAPUMP", line 19
View 13 Replies
View Related
Jan 29, 2013
i have a table which has 2 columns.1st column has userId and the other contains an xml data as a link.on clicking that link a new file opens containing the data in xml format.
<fields>
<field key="Public Email">piyush@chand.com</field>
<field key="Location">bangalore</field>
<field key="Website" />
<field key="Birthday">0001-01-01 00:00:00</field>
<field key="Gender">Male</field>
<field key="Language">English</field>
</fields>
i need to access location of a particular userId.How can i do that?
View 6 Replies
View Related
Jun 30, 2010
I have customized my sqlprompt. I put the code for that in a script p.sql.
Now I log into sql from multiple directories as I have different scripts in different directories. How do I access p.sql which is not in the currect directory.
Also I wanted to know if I could change directories from the sql prompt.
View 6 Replies
View Related
Jun 20, 2010
i'm create table
CREATE TABLE EQU_PARAM_MONITORINGX
(
SERIAL_NO VARCHAR2(32 BYTE) NOT NULL,
[Code]....
why accessing record not using index, but using full table scan?
View 2 Replies
View Related
May 2, 2013
I have installed Oracle 11g R2 on Oracle Linux and Oracle Instant Client on Windows 7. I am trying to access the server from the Oracle client but I am getting the following error:
ORA-12560: TNS: protocol adapter error
I have set the below TNSNAMES.ORA file on the client machine and the LISTENER.ORA file on the server:
#TNSNAMES.ORA
OCCELLUS =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = oracle.localdomain)(PORT = 1521))
)
CONNECT_DATA =
[code]........
The ORACLE_SID is OCELLUS.
The host name is oracle.localdomain
Pinging between the client/server works fine. I have turned off the firewall on both the client (Windows firewall) the Server (IPtables) but got the same problem!
I have also set the ORACLE_HOME, TNS_ADMIN and PATH in the Windows environment variables.
View 14 Replies
View Related
Feb 9, 2011
I wanted to know whether is there any utility which can
1. Create table from xml /xsd file.
2. insert records into the newly created table, through the given xml file.
View 1 Replies
View Related
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
Jun 6, 2013
I am very new to APEX_COLLECTION. I have problem in accessing APEX_COLLECTION that I created. Below is the pl/sql code I have written:
declare
l_query varchar2(200);
cname varchar2(300);
Begin
APEX_COLLECTION.DELETE_COLLECTION(p_collection_name => 'ACTION_NAMES');
l_query := 'select name from test_table where id in (''n406'' , ''n409'' , ''d080'' , ''o4505'' , ''a1593'')';
[code]........
It is throwing following error on execution:
ORA-01422: exact fetch returns more than requested number of rows I want to display the names collected using APEX_COLLECTION package and also use it in further processing within the pl/sql code block.
Apex info:
Application Express 4.1.0.00.32
DB details - Oracle Database 11g Enterprise Edition Release 11.2.0.1.0
Web server architecture - APEX listener
Browser(s) and version(s) used - Chrome version 24/ Firefox version 3.6 and version 18
View 4 Replies
View Related
Jul 1, 2010
I am using the sid of v$mystat to create a unique filename in my pl/sql procedure.
I have granted access to v$mystat to the user that is accessing it from system user as:
SQL>GRANT SELECT ON V_$MYSTAT TO ar;
Grant succeeded.
SQL> commit;
Commit complete.
now when i login as user ar and do a select on v$mystat it works fine:
SQL> select sid from v$mystat WHERE ROWNUM = 1;
SID
----------
290
However, when i do the same from my PL/SQL procedure it throws an error saying :
SQL> @FILECREATE
53 /
Warning: Function created with compilation errors.
SQL> show errors
Errors for FUNCTION FILECREATE:
LINE/COL ERROR
-------- -----------------------------------------------------------------
22/8 PL/SQL: SQL Statement ignored
22/35 PL/SQL: ORA-00942: table or view does not exist
My PL/SQL function can be found as an attachment.
View 11 Replies
View Related
Jan 25, 2011
I am having 3 oracle 10.2.0.5 version standard edition databases running on windows platform on 3 different servers. OEM is configured for all the 3 databases and we are able to access these OEM from their respective servers.
As per my knowledge, I should be able to access the OEMs of all 3 databases from my local machine. But Iam facing problem in accessing the OEMs from my local machine.
what changes need to be done so that I can access the OEMs of all 3 databases from one single local machine rather than checking it by logging into their respective servers.
View 7 Replies
View Related
Mar 16, 2011
The database is running in archivelog mode and we have a standby with Maximum performance.There is no RMAN backup..We have noticed there is block corruption while accessing some tables.Now i would like to know are the corrupted blocks also replicated to the physical standby? Is there a way to recover the data from these corrupted blocks without shutting down the database ?
View 1 Replies
View Related
May 13, 2010
I have installed Oracle 10g on one system and Oracle developer on another machine, means i have different machines for DB Server and Application server. It all working excellent inside the company premises, but if i want to access my Oracle DB and application server outside the company then it gives me problem..how to access application (forms and reports ) remotely outside the company...having same db.
View 2 Replies
View Related
Nov 12, 2012
We have a scenario where Oracle Database R1 is installed on Windows System and the Client is present on Linux. Both the system is on same network. We can access Windows -2-Windows using TNS entry.
I am unable to connect to this scenario where Database is on Windows and Client is on Linux.
View 8 Replies
View Related