cancel
Showing results for 
Search instead for 
Did you mean: 

dbco connection to sqlserver - linux platform

former_member614361
Discoverer
0 Kudos

Dear colleagues,

We are trying to connect SAP ERP linux platform to external sql server database using dbco transaction following sap notes: 1601608, 1644499, 1774329. When we test connection created nothing happed, no error, looks like if were trying to connect, after a while workprocess stop and sesion is cancelled.

Fri Apr 5 09:00:53 2019
N KrbInitKeyTab: No Kerberos KeyTab available
B
B Fri Apr 5 09:01:10 2019
B Loading DB library '/usr/sap/DEV/D01/exe/dbmssslib.so' ...
B Library '/usr/sap/DEV/D01/exe/dbmssslib.so' loaded
B Version of '/usr/sap/DEV/D01/exe/dbmssslib.so' is "749.05", patchlevel (0.600)
B Connect to SQLCDGR as gdagostini with MSSQL_SERVER=<xx.xx.xx.xx>,1433 MSSQL_DBNAME=WINCC_BORRAR
C INFO: A known driver is being used: [ODBC Driver 13 for SQL Server].
C ODBC Driver chosen: ODBC Driver 13 for SQL Server native
C Server Version: 10.50.6000.34
C DB release numbers: (10,50,6000,34)
C EditionID: 1804890536 EngineEdition: 3
C comm. rd. spid 59
C unc. rd. spid 60
M SI_KERNEL: Send by kernel
M Sending process ID = 0
M Real user ID of sending process = 0
M si_code = 128
M ------------------ C-STACK ----------------------
dw.sapDEV_D01[S](LinStackBacktrace+0xa9)[0x658582]
dw.sapDEV_D01[S](LinStack+0x3e)[0x65b4ee]
dw.sapDEV_D01[S](CTrcStack2+0x4b)[0x657347]
dw.sapDEV_D01[S](SigIGenAction+0x730)[0x25c0a10]
<signal handler called> [0x7f53c1d82c10]
libpthread.so.0[S](__lll_unlock_elision+0x30)[0x7f53c1d845e0]
libodbc.so.1[__info.c:4970](function_return_ex+0x27)[0x7f53b80d9d27]
libodbc.so.1[SQLGetInfo.c:622](SQLGetInfo+0xad)[0x7f53b80b312d]
libodbc.so.1[SQLEndTran.c:529](SQLEndTran+0x805)[0x7f53b80aae95]
dbmssslib.so[S](SlCommit96+0x31c)[0x7f3e706ccfbc]
dbmssslib.so[S](SlConnect96+0x596b)[0x7f3e706e42fb]
dbmssslib.so[S](DbSlConnect96+0x2f6)[0x7f3e7067c136]
dw.sapDEV_D01[S](open_con(short, DB_CON_CA*)+0xb49)[0x11269dc]
dw.sapDEV_D01[S](supply_con(DB_CON_DA*, DB_CON_CA*, unsigned char)+0x286)[0x2446bb6]
dw.sapDEV_D01[S](dsql_connect+0xa4)[0x104978b]
dw.sapDEV_D01[S](dbac_DynamicSQL()+0x1905)[0x1037157]
dw.sapDEV_D01[S](dbac_function+0x396)[0x10405a5]
dw.sapDEV_D01[S](ab_jcaly()+0x118)[0x1e16678]
dw.sapDEV_D01[S](ab_extri()+0x1b8)[0x1d623d8]
dw.sapDEV_D01[S](ab_xevent(char16_t const*)+0x25)[0x1db8c45]
dw.sapDEV_D01[S](ab_dstep+0xf5)[0x1d5e235]
dw.sapDEV_D01[S](dynpmcal(DINFDUMY*, STPDUMMY*)+0x4cb)[0x1d446fb]
dw.sapDEV_D01[S](dynppai0(DINFDUMY*)+0x318)[0x2202cc8]
dw.sapDEV_D01[S](dynprctl(DINFDUMY*)+0x1c5)[0x1d457e5]
dw.sapDEV_D01[S](dynpen00+0x3e0)[0x1d3ca30]
dw.sapDEV_D01[S](ThrtCallAbapVm+0xc2)[0x1d2cd92]
dw.sapDEV_D01[S](GuiHandler::handleRequest(REQUEST_BUF*, bool)+0x574)[0x5b2d0a]
dw.sapDEV_D01[S](ThStart()+0x18bf)[0x4f09a8]
dw.sapDEV_D01[S](DpMain+0x379)[0x2194899]
libc.so.6[S](__libc_start_main+0xf5)[0x7f53c19ed725]
M ------------------ c-stack end ------------------
M
M Fri Apr 5 09:01:11 2019
M caught SIGSEGV (11)
M ThSigHandler (terminate=0, reason=Signal)
M in_ThErrHandle: 1
M ThIErrHandle: set thRc ERROR-CORE-ABORTED_BY_SIGNAL for T77_U28540_M0
M ThResetEmMagic: reset em magic for T77_U28540_M0_I1
M ThSigHandler: Signal for T77_U28540_M0 (step TH_WORK_SYNC, thRc ERROR-CORE-ABORTED_BY_SIGNAL, action RETURN_FOR_DUMP)
X MmxCheckOpenHandles: No open MMX handles
M
M Info for wp 8
M
M pid = 17258
M severity = 0
M status = 0
M stat = WP_RUN
M waiting_for = NO_WAITING
M workerType = DP_WORKER_DIAWP
M currentSession = T77_U28540_M0
M lastSession = T77_U28540_M0
M act_cs_count = 0
M csTrack = 0
M csTrackRwExcl = 0
M csTrackRwShrd = 0
M mode_cleaned_counter = 0
M control_flag = 2000000
M report = > <
M action = 16
M tab_name = > <
M
M Info for Session T77_U28540_M0_I1
M
M tm state = 2
M uid = 28540
M Logon type = DP_LOGON_GUI
M withDisplay = 0x1
M cpic_no = 0
M cpic_idx = -1
M usr = >SAP* <
M terminal = >LSTKBA79685 <
M client = >100<
M priority = high priority
M appc_tm_conv_idx = -1
M allowCreateMode = YES
M Fri Apr 5 09:01:11 2019
M blockSoftCanel = NO
M Session Resources:
M HEAD: adr/max_elems/act_elems/tbl = 7f53b39ba1d0/0/0/(nil)
M imode = 1
M is_cancelled = NO
M ThrtGetTaskTypeOfSession: taskType of T77_U28540_M0: THRT_TASK_DIA
M task_type = THRT_TASK_DIA
M thRc = Internal error, session terminated (16789511)
M detachReason = DP_DETACH_REASON_GUI
M async_receives = 0
M em handle = 3
M abap session state = DP_SES_ATTACHED
M em state = DP_EM_ATTACHED
M resetReason = 0
M softcancel = 0
M cancelInitiator = INVALID
M cleanupMethod = DP_DEFAULT_CLEANING
M master hook = invalid T-1_M255
M slave hook = invalid T-1_M255
M debuggingActive = 0
M tcode = >DB02 <
M act_wp = 8
M last_wp = 8
M client conversation_ID = > <
M server conversation_ID = > <
M lock = 0
M max enq infos = 9
M act enq infos = 2
M em_hyper_hdl = 7f516da9b558
M plugin_info = NULL
M act_plugin_hdl = -1
M act_plugin_no = 0
M max_plugin_no = 0
M Context Resources:
M HEAD: adr/max_elems/act_elems/tbl = 7f53b39adb80/0/0/(nil)
M ThSelPrintMask: selMask of level 1 is empty
M ThSelPrintMask: selMask of level 0 is empty
M
M
M ThIErrHandle: current incoming request:
M
M rq_id 7818913
M -IN-- ca_blk 0 len 545
M -IN-- reqHdlId REQ_HANDLER_GUI
M -IN-- sender address:
M -IN-- type LOCAL
M -IN-- agentType TERMINAL
M -IN-- session T77_U28540_M0
M -IN-- receiver address:
M -IN-- type LOCAL
M -IN-- agentType WORKER workerTyp DIA
M -IN-- session T77_U28540_M0
M Fri Apr 5 09:01:11 2019
M
M *****************************************************************************
M *
M * LOCATION SAP-Server <sapserver>_DEV_01 on host <hostserver> (wp 😎
M * ERROR ThSigHandler: Signal
M *
M * TIME Fri Apr 5 09:01:11 2019
M * RELEASE 749
M * COMPONENT Taskhandler
M * VERSION 1
M * RC 16789511
M * MODULE /bas/749_REL/src/krn/si/th/thxxhead.c
M * LINE 2798
M * COUNTER 3765
M *
M *****************************************************************************
M
M PfRejectStatistic: clear statistic record
M PfClearAllRec: clear statistic area
M PfClearAllRec: set statRecordAction = STAT_RECORD_ACTION_REJECT
M Entering TH_CALLHOOKS
M ThCallHooks: call hooks for event BEFORE_DUMP
M ThCallHooks: call hook >TrThHookFunc< for event BEFORE_DUMP
M TrThHookFunc: called for WP dump
M ThCallHooks: call hook >ThrSaveSPAFields< for event BEFORE_DUMP
M ThrSaveSPAFields: save spa fields
M ThCallHooks: call hook >ThrBtcCallLgCl< for event BEFORE_DUMP
M ThIErrHandle: entering ThSetStatError
M PfSetError: clear statistic record
M PfClearAllRec: clear statistic area
M PfClearAllRec: set statRecordAction = STAT_RECORD_ACTION_REJECT
C { cancelStatement(con_hdl=-1,cb=(nil))
C CANCEL rejected, because there is no SQL statement active
C } cancelStatement(rc=1)
B db_sqlbreak() = 1
M ThCallDbBreak: no sql statement active
M ThIErrHandle: action is RETURN_FOR_DUMP, skip rollback
M ThIErrHandle: call ThrCoreInfo
M DpICtlSetForWp: switch off control 0xded3e01d for W8 (0x2000000 -> 0x0)
M DpCtlSetForSession: switch off control 0xded3e01d for T77_U28540_M0 (0x0 -> 0x0)
M DpWpAdmSetWaitingFor: set waiting_for = WAITING_FOR_ENQUEUE for W8
M SND: <I=161967, M=0xABCDE123, D=ASYNC_ENQUE, T=ASYNC_REQUEST, MF=NO, len=396/396>
M NiIWrite: hdl 26 sent data (wrt=396,pac=1,MESG_IO)
M >>> NiBufISelUpdate: hdl 26 mStat 2 SetMode 0 UserStat 0 UserMode 0 forceSet 0 forceRemove 0 SSLState 0
M Fri Apr 5 09:01:11 2019
M NiBufISelUpdate: skip setting mode/stat, handle not in select set
M <<< NiBufISelUpdate: hdl 26(0, SAP_O_K) SetMode 0 UserStat 0 UserMode 0
M DpWpAdmSetWaitingFor: set waiting_for = NO_WAITING for W8
M ThDelEnqInfo: del enq_own >20190405085942044291000401BBGAHANAPRD.....................</1
M ThDelEnqInfo: act enq info: 1
M ThDelEnqInfo: del enq_own >20190405085942044294000401BBGAHANAPRD.....................</2
M ThDelEnqInfo: act enq info: 0
A TH VERBOSE LEVEL FULL
M SosISearchAnchor: no anchor for type/name 1/22
M SigIRegisterRoutine: handler for signal SIGSEGV installed (SigIGenAction, flag 0)
M SigIRegisterRoutine: handler for signal SIGBUS installed (SigIGenAction, flag 0)
M SigIRegisterHook: registered hook >ab_catch_dumperror< for signal SIGSEGV
M SigIRegisterHook: registered hook >ab_catch_dumperror< for signal SIGBUS
A ** RABAX: level LEV_RX_PXA_RELEASE_MTX entered.
A ** RABAX: level LEV_RX_PXA_RELEASE_MTX completed.
A ** RABAX: level LEV_RX_COVERAGE_ANALYSER entered.
A ** RABAX: level LEV_RX_COVERAGE_ANALYSER completed.
A ** RABAX: level LEV_RX_HOTSPOT_TRACE entered.
A ** RABAX: level LEV_RX_HOTSPOT_TRACE completed.
A ** RABAX: level LEV_RX_SAVE_SHMLOCKS entered.
A ** RABAX: level LEV_RX_SAVE_SHMLOCKS completed.
A ** RABAX: level LEV_RX_RESET_SHMLOCKS entered.
A ** RABAX: level LEV_RX_RESET_SHMLOCKS completed.
A ** RABAX: level LEV_RX_ROLLBACK entered.
A ** RABAX: level LEV_RX_ROLLBACK completed.
A ** RABAX: level LEV_RX_DB_ALIVE entered.
A ** RABAX: level LEV_RX_DB_ALIVE completed.
A ** RABAX: level LEV_RX_HOOKS entered.
M SosISearchAnchor: no anchor for type/name 2/1
A ** RABAX: level LEV_RX_HOOKS completed.
A ** RABAX: level LEV_RX_STANDARD entered.
A ** RABAX: level LEV_RX_STANDARD completed.
A ** RABAX: level LEV_RX_STOR_VALUES entered.
A ** RABAX: level LEV_RX_STOR_VALUES completed.
A ** RABAX: level LEV_RX_C_STACK entered.
A ** RABAX: level LEV_RX_C_STACK completed.
A ** RABAX: level LEV_RX_MEMO_CHECK entered.
A ** RABAX: level LEV_RX_MEMO_CHECK completed.
A ** RABAX: level LEV_RX_AFTER_MEMO_CHECK entered.
A ** RABAX: level LEV_RX_AFTER_MEMO_CHECK completed.
A Fri Apr 5 09:01:11 2019
A ** RABAX: level LEV_RX_INTERFACES entered.
A ** RABAX: level LEV_RX_INTERFACES completed.
A ** RABAX: level LEV_RX_GET_MESS entered.
A ** RABAX: level LEV_RX_GET_MESS completed.
A ** RABAX: level LEV_RX_INIT_SNAP entered.
A ** RABAX: level LEV_RX_INIT_SNAP completed.
A ** RABAX: level LEV_RX_WRITE_SYSLOG entered.
A ** RABAX: level LEV_RX_WRITE_SYSLOG completed.
A ** RABAX: level LEV_RX_WRITE_SNAP_BEG entered.
A ** RABAX: level LEV_RX_WRITE_SNAP_BEG completed.
A ** RABAX: level LEV_RX_WRITE_SNAP entered.
M ThGetTransactionId: got internal transaction id (SPA) >2E09407009F10040E005C9C9EFBF2425<
M ThEppGetConnectionCounter: read connectionCounter 0 from epp 0
M SosISearchAnchor: no anchor for type/name 2/2
A ** RABAX: level LEV_SN_END completed.
A ** RABAX: level LEV_RX_WRITE_SNAP_END entered.
A ** RABAX: level LEV_RX_WRITE_SNAP_END completed.
A ** RABAX: level LEV_RX_RAL_FOR_RABAX entered.
A ** RABAX: level LEV_RX_RAL_FOR_RABAX completed.
A ** RABAX: level LEV_RX_SET_ALERT entered.
M CCMS: Reporting Rabax: SnapKey: 20190405 090111, BBGAHANAPRD_DEV_01, [100:SAP*], report CL_SQL_CONNECTION=============CP, task D, entered.
M CCMS: Reporting Rabax: AlReportSingleMessage returned 0
M CCMS: Reporting Rabax: AlReportPerfValue returned 0
M CCMS: Reporting Rabax: SnapKey: 20190405 090111, BBGAHANAPRD_DEV_01, [100:SAP*], report CL_SQL_CONNECTION=============CP, task D, finished.
A ** RABAX: level LEV_RX_SET_ALERT completed.
A ** RABAX: level LEV_RX_COMMIT entered.
A ** RABAX: level LEV_RX_COMMIT completed.
A ** RABAX: level LEV_RX_SNAP_SYSLOG entered.
A ** RABAX: level LEV_RX_SNAP_SYSLOG completed.
A ** RABAX: level LEV_RX_RESET_PROGS entered.
A ** RABAX: level LEV_RX_RESET_PROGS completed.
A ** RABAX: level LEV_RX_STDERR entered.
A ** RABAX: level LEV_RX_STDERR completed.
A ** RABAX: level LEV_RX_RFC_ERROR entered.
A ** RABAX: level LEV_RX_RFC_ERROR completed.
A ** RABAX: level LEV_RX_RFC_CLOSE entered.
A ** RABAX: level LEV_RX_RFC_CLOSE completed.
A ** RABAX: level LEV_RX_IMC_ERROR entered.
A ** RABAX: level LEV_RX_IMC_ERROR completed.
A ** RABAX: level LEV_RX_APC_ERROR entered.
A Fri Apr 5 09:01:11 2019
A ** RABAX: level LEV_RX_APC_ERROR completed.
A ** RABAX: level LEV_RX_DATASET_CLOSE entered.
A ** RABAX: level LEV_RX_DATASET_CLOSE completed.
A ** RABAX: level LEV_RX_ATRA_CLEANUP entered.
M SosISearchAnchor: no anchor for type/name 1/22
A ** RABAX: level LEV_RX_ATRA_CLEANUP completed.
A ** RABAX: level LEV_RX_ERROR_SAVE entered.
A ** RABAX: level LEV_RX_ERROR_SAVE completed.
A ** RABAX: level LEV_RX_ERROR_TPDA entered.
A ** RABAX: level LEV_RX_ERROR_TPDA completed.
A ** RABAX: level LEV_RX_PXA_RELEASE_RUDI entered.
A ** RABAX: level LEV_RX_PXA_RELEASE_RUDI completed.
A ** RABAX: level LEV_RX_LIVE_CACHE_CLEANUP entered.
M RmCleanUpResources3: hdr/tbl/ext_tbl/free/keep = 7f53b39adb80/(nil)/0/0/1
M RmCleanUpResources3: no resources registered
A ** RABAX: level LEV_RX_LIVE_CACHE_CLEANUP completed.
A ** RABAX: level LEV_RX_END entered.
A ** RABAX: level LEV_RX_END completed.
M SigIRegisterHook: cleared hook for signal SIGSEGV
M SigIRegisterHook: cleared hook for signal SIGBUS
A ** RABAX: end RX_RETURN
M ThIErrHandle: ThrCoreInfo o.k.
M ThIErrHandle: Entering ThErrHdlUser
M ThErrHdlUser: set thRc (ERROR-CORE-ABORTED_BY_SIGNAL)
M ThErrHdlUser: detach session
M ThSessionDetach: detach session of T77_U28540_M0 (em_hdl=3)
M ThSessionDetach: call ab_rollout
M ThSessionDetach: act abap state of T77_U28540_M0 is DP_SES_DETACHED
M ThSessionDetach: act em state of T77_U28540_M0 = DP_EM_DETACHED
M ThSetDetachTime: detached session of T77_U28540_M0 in 1118 us
M ThSessionDetach: detach o.k.
M DpWpSetExtraAction: extraAction of W8=WP_ROLL_IN_AFTER_DUMP (after DP_BIT_OR) [thxxhead.c:3214]
M
M ***

Accepted Solutions (0)

Answers (2)

Answers (2)

Reagan
Product and Topic Expert
Product and Topic Expert

As the SAP system is running on Linux the note 1644499 - Database connectivity from Linux to SQL Server (suggested by Matt) is the one you need to follow. Based on the trace file you have supplied I can see the MSSQL DBSL and ODBC driver are being picked up by the system and the problem seems to be with the DBSL and or SQL Server driver used.

B Connect to SQLCDGR as gdagostini with MSSQL_SERVER=<xx.xx.xx.xx>,1433

Check if the SQL Server is using port 1433. Try a telnet test from the ABAP host to the SQL Server host on port 1433. If it fails then you should first fix that.

Is your system Unicode or Non-Unicode? Check note 2109404 - Signal 11 in DBCON connections to SQL Server

If all things are in place then execute the ABAP report ADBC_TEST_CONNECTION from Tx SE38 and select the remote database and test the DB connection.

former_member614361
Discoverer
0 Kudos

Hi Reagan,

We followed note 1644499 - Database connectivity from Linux to SQL Server, and yes, we can see the MSSQL DBSL and ODBC driver are being picked up by the system, we have tested connection to ms sql remote server port 1433 and it's working.

We are using the following sql server driver:

sudo odbcinst -j

LinuxODBC 2.3.0

DRIVERS …………………….: /etc/odbcinst.ini

SYSTEM DATA SOURCES: /etc/odbc.ini

FILE DATA SOURCE ..: /etc/ODBCDataSources

USER DATA SOURCE..: /root/.odbc.ini

SQLULEN Size …….= 8

SQLLEN Size ……..= 8

SQLSETPOSIROW Size= 8

Any ideas??

Thanks !!!

Reagan
Product and Topic Expert
Product and Topic Expert
0 Kudos

Have you tried restarting the system? See if that helps.

Matt_Fraser
Active Contributor

Hi Mauro,

When you say that you are attempting to connect your SAP system to an external SQL Server database, do you mean as a "remote" connection for remote data access or DB monitoring purposes, or are you trying to use a standalone SQL Server database system as your SAP system database? If the latter, this is not supported for Linux platforms, as stated in Note 1644499 (Database connectivity from Linux to SQL Server) which you referenced. Connecting to a remote SQL Server from Linux is only supported as a secondary connection, not as a database to actually run your SAP system on.

If, however, you are trying to setup a remote connection for purposes of extracting data to use in a BW on Linux scenario, this should be supported. Likewise, if it's for a SolMan on Linux system and you want to monitor the remote database. Did you download and install the ODBC driver for SQL Server for your OS from Microsoft? You do need to install that first, and the versions are either RHEL or SLES specific (you didn't state which flavor of Linux you are using). Only after that do you setup the DBCON entry.

Cheers,
Matt

p.s. I added some additional tags to your question related to the DB and OS platforms in question. I also noted that another moderator earlier removed your HANA tag as unrelated.

Matt_Fraser
Active Contributor
0 Kudos

On a side note, I am aware (very recently) that Microsoft does now have a version of SQL Server (2017) that will itself run on Linux. However, per Note 2492596 (Release planning for Microsoft SQL Server 2017):

"SAP does not plan to support SQL Server 2017 on Linux."

And indeed, there's no reference to SQL Server on Linux in the PAM. That's not to say that they'll never support it, but they don't as of today and may or may not ever do so in the future.

former_member614361
Discoverer

Hi Matt

"When you say that you are attempting to connect your SAP system to an external SQL Server database, do you mean as a "remote" connection for remote data access " Yes, we are trying to connect our SAP system (linux+hana) to a remote MS SQL server,

" Did you download and install the ODBC driver for SQL Server for your OS from Microsoft? You do need to install that first, and the versions are either RHEL or SLES specific (you didn't state which flavor of Linux you are using). Only after that do you setup the DBCON entry." Yes, we did, and we update kernel libraries too (dbmsslib.so) , we are using linux Version suse 12.2

linux odbc

sudo odbcinst -j

LinuxODBC 2.3.0

DRIVERS …………………….: /etc/odbcinst.ini

SYSTEM DATA SOURCES: /etc/odbc.ini

FILE DATA SOURCE ..: /etc/ODBCDataSources

USER DATA SOURCE..: /root/.odbc.ini

SQLULEN Size …….= 8

SQLLEN Size ……..= 8

SQLSETPOSIROW Size= 8