Merge statement with Db link is working fine normally .
The same merge when written inside the procedure is also working fine.
But, when I have scheduled the job for the same procedure, it is throwing error.
Tool used: Oracle SQL Developer
ORA-12154: TNS:could not resolve the connect identifier specified--ORA-06512:
Please help in identifying the issue.
Related
I am trying to develop an SSIS package that truncates a table in Oracle db. Unfortunately i am getting an error
When i am trying to do select from the truncated table, it works fine - connection manager is setup correctly. I've recreated connection manager just in case but that did help.
Truncated table is in the same schema as the user on which ETL is runned.
Despite an error message, task does it's job. Table get's truncated but error message still appears.
Any ideas what could be the reason?
Regards,
Lukas
2.
Component that i used is Oracle Source task inside of DFT.Oracle source is using a query "TRUNCATE TABLE schema_Name.TableName":
When i use "SELECT * FROM schema_Name.TableName" works fine.
I have the solution.
Instead of using "SQL command" inside of Oracle Source task i used "Execute SQL Task" with the same query. I connected to Oracle db using OLE DB.
I am creating DB link by using below command. I have not updated tnsnames.ora instead I used details in the commmand.
CREATE DATABASE LINK test
CONNECT TO apps IDENTIFIED BY xyzabc
USING '(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=awsss3270429.us.dell.com)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=dell122de))';
The DBLink was created successfully. but
When I fired below query I got the error.
select * from USER_CS_SRS#test; . table `USER_CS_SRS` exist in remote database.
Error is attached.
I am quite new to DB. Can anybody help me on the same.
You are missing a closing parenthesis at the end of your connection string. Your create statement should end:
...(CONNECT_DATA=(SERVICE_NAME=opm122de)))';
-----------------------------------------^
Recreating what you posted:
CREATE DATABASE LINK test
CONNECT TO apps IDENTIFIED BY xyzabc
USING '(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=rws3270429.us.oracle.com)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=opm122de))';
select * from USER_CS_SRS#test;
Error report -
SQL Error: ORA-12154: TNS:could not resolve the connect identifier specified
...
Adding the final ) changes that:
drop database link test;
CREATE DATABASE LINK test
CONNECT TO apps IDENTIFIED BY xyzabc
USING '(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=rws3270429.us.oracle.com)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=opm122de)))';
select * from USER_CS_SRS#test;
Error report -
SQL Error: ORA-12545: Connect failed because target host or object does not exist
...
which is a different error; for me that's entirely reasonable because I can't resolve rws3270429.us.oracle.com, never mind reach it. As your profile says you work for Oracle, presumably you can - and this either works or throws a different error. Either way the original ORA-12154 error has been fixed.
Am new to W2 CEP and trying to run the samples given in the Wso2 CEP documentation. I was actually following the getting started guide and almost through with all the steps without any issues. But stuck with the last but one step while creating a personalized dash board.
Am using Oracle database as my datasource and I was able to refer the datasource created in CEP while creating the dashboard and the connection is validated successfully. But when I enter my sql "select * from delivered_orders" and upon running it gives me an error of "You have an error in your SQL syntax". In the console I can see a corresponding ORA error "java.sql.SQLException: ORA-00933: SQL command not properly ended"
The sql statement as you have seen is a very basic statement to have any syntax errors. Am not sure whats wrong with my setup, any help regarding this would be great.
I have read couple of other titles from stack overflow on this which suggest I should not use composite primary keys which was bug with WSO2 CEP. I tried that but still no good.
Additional Details : 0ct 3'rd
I tried the same sample with MySql and it works like a charm. And thanks for Colinr for the ticket, I see the documentation updated. But still I have issues while connecting with Oracle.
Your command may be missing a terminator ';'
If that solves your issue, I'll try to get the document updated.
I am using
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod &
Toad for oracle 10.6.1.3
when i try to run insert statement which is having around 84,000 + records, it is showing Out of Memory error. Here is the error image.
Any of you please suggest me, how i should execute this insert script in toad.
P.S : since toad is connecting to remote machine I'm not able to run it with SQLPLUS. If any one knows option to do that, please let me know.
If you need any more information, Please raise your hands in comment box i will provide you.
I got the same error when i want to execute sql script 70k rows.
But i solved it just like this.
Firstly
You should run it with sqlplus commands. Log in the sqlplus and run
this command
#scriptName.sql
Secondly (this is alternative)
You can use DBLINK in oracle.
As bpgergo suggested copy the sql file into remote machine using FTP, then open your SQLPLUS.
Follow this steps in SQLPLUS.
step 1 : change your current session using following query.
alter session set current_schema = Schema_Name;
Here, SCHEMA_NAME is schema name of your insert query table.
step 2 : Execute the sql script file using following query.
#{PATH}/FILE_NAME.SQL
Eg : #D:/oracle/script/FILE_NAME.SQL
Here, D:/oracle/script/ is the file available location and FILE_NAME is your sql script file name.
Now, It will work as expected.
When enabling Fast Load in Attunity Oracle Destination Components in several similar SSIS packages using Oracle 11g as target - a few packages fail and return the error below, but the rest of them work fine.
The error message I get is:
Description: Fast Load error encountered during PreLoad or Setup
phase. Text: ORA-39826: Direct path load of view or synonym (
TABLE_NAME ) could not be resolved.
If I'll disable the Fast Load, those that failed would work fine too of course.
More importantly, the failing packages work fine with Fast Load when using Oracle 10g as target.
I don't understand why it doesn't work in those that failed.
What am I missing? What should I do to make the Fast Load work at all times and not sometimes?
probably a driver issue.
The 'fast load' option internally uses a BULK INSERT statement for uploading data into the destination table instead of a simple INSERT statement for each single row. Since bulk insert is a native sql server function you should try to understand how does it work for oracle. It probably changed from 10g to 11g
By pure chance, I discovered that the target component fails in an SSIS package if its ‘TableName’ property contains spaces before or after(!) the name of the table. Once deleted it works fine.
This error didn’t occur on 10g.