2014 Feb 25 9:32 PM
Hello All,
I am trying to connect to an external oracle database within the same network by doing the following..
- I setup the database connection using transaction code DMCO.
- in SE38 i used the following statement to connect to the database.
PARAMETERS dbs TYPE dbcon-con_name.
EXEC SQL.
CONNECT TO :dbs
ENDEXEC.
Here i get the sy-subrc value as 4. not sure what am i doing wrong here.
Appriciate any help.
Hello All,
I am trying to connect to an external oracle database within the same network by doing the following..
- I setup the database connection using transaction code DMCO.
- in SE38 i used the following statement to connect to the database.
PARAMETERS dbs TYPE dbcon-con_name.
EXEC SQL.
CONNECT TO :dbs
ENDEXEC.
Here i get the sy-subrc value as 4. not sure what am i doing wrong here.
Appriciate any help.
2014 Feb 25 9:48 PM
Hello Ramesh,
Look at this help: http://help.sap.com/abapdocu_70/en/ABAPEXEC_CONNECTION.htm
If its not working properly maybe can be a firewall problem.
2014 Feb 26 6:22 PM
2014 Feb 26 6:24 PM
2014 Feb 26 6:30 PM
1. Always test your connection using either osql or the Query Analyzer from all application servers that may be used. Testing with "SQL Server Authentication" is easy. Using "Windows Authentication" is a bit more difficult. Often you cannot logon as NT user DOMAIN\SAPServiceSID. But usually user DOMAIN\sidadm has the same privileges, and therefore you can test by logging in as sidadm, and then execute
osql -E -S<server_name>
Make sure <server_name> matches the MSSQL_SERVER setting, including the prefix (except the empty : prefix). Once you are able to connect enter "use <dbname>" where dbname matches the MSSQL_DBNAME setting.
2. You can test a connection using the following abap test program:
REPORT ZTESTDBCON.
data: DBN(128).
EXEC SQL.
CONNECT TO 'TST'
ENDEXEC.
EXEC SQL.
SET CONNECTION 'TST'
ENDEXEC.
EXEC SQL.
SELECT db_name() INTO :DBN FROM SVERS
ENDEXEC.
WRITE: / 'current database name', DBN.
Substitute TST by your DBCON name (the CON_NAME from DBCON). If SVERS doesn't exist in your database, then use any table name that does exist.This will allow you to easily monitor errors when connecting.
3. If a connection fails or takes a very long time, the first place to look for errors is in the developer trace files (SID\DVEBMGS00\work\dev_w??). The error messages will indicate which network protocol was attempted:
[DBNMPNTW]ConnectionOpen
for example means that named pipes were being used. However the trace files don't show a lot of detail beyond that. To get a more detailed trace you can do the following:
a) se38 -> Run program RSMSS_DBSL_PROFILE_SWITCH. Choose to set profiling ON.
b) Run the program that connects to the remote server and wait for it to fail.
c) Run program RSMSS_DBSL_PROFILE_SWITCH again and turn profiling OFF. Never leave the profiling on for extended periods.
Now new trace file(s) will exist in SID\DVEBMGS00\work named dbsl_w??. These files contain much more detail about the server name, and other connect options being used.
2014 Feb 26 6:57 PM
Thank you. I get following message when i run this tool.
Could not open connection MYCONNECTION .
sql error 12,514 occured:
ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
I will look at the note you sent in below for more info.
2014 Feb 26 7:01 PM
It looks like your DB is not correctly defined in the Listener definition file or service isn't up.
I found a lot of references to this error:
ORA-12514: TNS:listener does not currently know of service...
http://edstevensdba.wordpress.com/2011/03/19/ora-12514/
Definelly your problem is in yout database service, not in SAP. If you don't have more questions, please close the thread.
2014 Feb 28 4:48 PM
I am not an expert on the oracle side , so not sure most of the thing mentioned in the SAP notes you suggested.
- Should the sql developer client already installed on my machine?
- And the SAP notes were talking about the ORA file. do we need to have this file copied into SAP application server ?
Please explain as i have limited knowledge on oracle side.
2014 Feb 28 5:19 PM
Basically it's looks like your DB is not correctly defined in the Listener definition file or service isn't up.
Forgot about the SAP note, contact your DBA and inform that your application can't connect to the listerner (use this error code as reference: "ORA-12514").
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |