Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with DBCO

Former Member
0 Kudos

Hi abapers.

I've been using a DBCON to a SQL Server DB, i configured the conection in Trx. DBCO and it works just perfect.... however, the DB is being changed to another server, now when i configured this new DB the system can't connect to it. I can access it from the network, from the SQL Server admin tool, everything seems to be just fine, but i can't access it from SAP.

I repeat, the original configuration works perfect, when i change to the other server is when it breaks down.

some ideas what might be the problem?

thanx

Jesus

2 REPLIES 2

former_member182371
Active Contributor
0 Kudos

Hi Jesus,

have a look at SAP Note 738371 where you can find the following report to check your connection:

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.

Best regards,

Former Member
0 Kudos

Hi ..

for that wirte 1 small ABAP program

*Native SQL command

EXEC SQL.

set connection 'Connection_string'

ENDEXEC.

IF sy-subrc 0.

EXEC SQL.

connect to 'Connection_string'

ENDEXEC.

ENDIF.

*here use any table and work area to transfer data

EXEC SQL.

SELECT CUST_CODE FROM CUSTOMER_MAP@IMPSCONN

INTO :ZIMPSCTCODE

WHERE SAP_CODE = :IT_IMPS_CUST-CUST_CODE

ENDEXEC.

Salil ....