首頁 資料庫 mysql教程 如何从SAP中连接其他数据库

如何从SAP中连接其他数据库

Jun 07, 2016 pm 03:24 PM
sap the 如何 工作 資料庫 環境 連接 需求

1. 工作环境需求 A . The operating system user sidadm must be able to log on to the secondary database. B. The R/3 table DBCON must be maintained. C . The correct database library 'dboraslib.ext' must exist in the kernel directory. Connectt

 

1.       工作环境需求

    A. The operating system user adm must be able to log on to the secondary database.

    B. The R/3 table DBCON must be maintained.

    C. The correct database library 'dboraslib.' must exist in the kernel directory. 
Connect  to SQL Server database Prerequisite: At least one Windows application server must be available on the R/3 system and the DBSL dynamic library (DLL) dbmssslib.dll must be installed on this server. This dll can be downloaded from the SAP Service Marketplace.

dbmssslib.dll

2.       配置连接信息

配置TCODE: dbco

任何配置信息都存储在DBCON表中.

配置示例:

A.      访问MSSQL的配置示例(参见SAP Notes 178949)

CON_NAME:
DBMS: MSS
USER_NAME:
PASSWORD:  
CON_ENV: MSSQL_SERVER= MSSQL_DBNAME=

   db_user could be sapr3 for example if the server is running R/3.  The password field may be blocked from view by asterisks in sm30. USER_NAME can be left blank in order to use integrated security (4.6d kernel and later).  In that case make sure that the OS User running R/3 has the required privilege on the remote server.  A dummy password must be entered in sm30, it will not be used when the user name is blank.

  • Specifying the server name

           The server name is simply the name of the SQL Server or named instance i.e. the hostname (for a default instance), or /
Starting with release 6.40 however there are some special considerations that should be taken into account.  When running with kernel release 6.40 or later, the R/3 system will prepend a protocol specifier to the server name.  Example:
   1. For a server running on the same server:
            np:
  2. For a remote server:
            tcp:
This forces the connection to be made with a named pipes and tcp/ip protocols respectively.
When specifying the server name you can override this by setting your own protocol (tcp: or np:), or you can make R/3 avoid setting any prefix by using simply : - a colon in front of the server name.

B.      访问ORACLE的配置示例()

   Connection name        logical name of the connection

     DBMS                   ORA

     User name              Oracle users

     DB password            password for the above-mentioned Oracle user

     Conn.info              TNS alias

     Permanent              Usually should not be set for a secondary connection.

 

3.       程序中如何使用

例程一
report zdbcon .
data: dbn(128).
EXEC SQL.
CONNECT TO 'DAN1'
ENDEXEC.
EXEC SQL.
SET CONNECTION 'DAN1'
ENDEXEC.
EXEC SQL.
SELECT db_name() INTO :DBN FROM SVERS
ENDEXEC.
write: / 'current database name', dbn. 
DAN1在DBCON表中配置
CON NAME DAN1
DBMS MSS
USER NAME iis_log
PASSWORD CON ENV
MSSQL_SERVER=tcp:###.###.###.### MSSQL_DBNAME=iislog


例程二
Here is an example for how to connect to another server with CON_NAME=BSK.  The example assumes BSK is running R/3:

 EXEC SQL.
  CONNECT TO 'BSK'
ENDEXEC.
EXEC SQL.
  SET CONNECTION 'BSK'
ENDEXEC.
EXEC SQL.
  SELECT db_name() INTO :DBN FROM SVERS
ENDEXEC.
WRITE: / 'current database name', DBN.
EXEC SQL.
  SET CONNECTION DEFAULT
ENDEXEC.
EXEC SQL.
  SELECT db_name() INTO :DBN FROM SVERS
ENDEXEC.
WRITE: / 'current database name', DBN.

notes: https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=178949&nlang=EN&smpsrv=https%3a%2f%2fwebsmp103%2esap-ag%2ede

本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn

熱AI工具

Undresser.AI Undress

Undresser.AI Undress

人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover

AI Clothes Remover

用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool

Undress AI Tool

免費脫衣圖片

Clothoff.io

Clothoff.io

AI脫衣器

AI Hentai Generator

AI Hentai Generator

免費產生 AI 無盡。

熱門文章

R.E.P.O.能量晶體解釋及其做什麼(黃色晶體)
2 週前 By 尊渡假赌尊渡假赌尊渡假赌
倉庫:如何復興隊友
4 週前 By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island冒險:如何獲得巨型種子
3 週前 By 尊渡假赌尊渡假赌尊渡假赌

熱工具

記事本++7.3.1

記事本++7.3.1

好用且免費的程式碼編輯器

SublimeText3漢化版

SublimeText3漢化版

中文版,非常好用

禪工作室 13.0.1

禪工作室 13.0.1

強大的PHP整合開發環境

Dreamweaver CS6

Dreamweaver CS6

視覺化網頁開發工具

SublimeText3 Mac版

SublimeText3 Mac版

神級程式碼編輯軟體(SublimeText3)

2 個月不見,人形機器人 Walker S 會摺衣服了 2 個月不見,人形機器人 Walker S 會摺衣服了 Apr 03, 2024 am 08:01 AM

2 個月不見,人形機器人 Walker S 會摺衣服了

Go語言如何實作資料庫的增刪改查操作? Go語言如何實作資料庫的增刪改查操作? Mar 27, 2024 pm 09:39 PM

Go語言如何實作資料庫的增刪改查操作?

在PHP中使用MySQLi建立資料庫連線的詳盡教學 在PHP中使用MySQLi建立資料庫連線的詳盡教學 Jun 04, 2024 pm 01:42 PM

在PHP中使用MySQLi建立資料庫連線的詳盡教學

Hibernate 如何實作多型映射? Hibernate 如何實作多型映射? Apr 17, 2024 pm 12:09 PM

Hibernate 如何實作多型映射?

iOS 18 新增「已復原」相簿功能 可找回遺失或損壞的照片 iOS 18 新增「已復原」相簿功能 可找回遺失或損壞的照片 Jul 18, 2024 am 05:48 AM

iOS 18 新增「已復原」相簿功能 可找回遺失或損壞的照片

MySQL資料庫管理系統的基本原理解析 MySQL資料庫管理系統的基本原理解析 Mar 25, 2024 pm 12:42 PM

MySQL資料庫管理系統的基本原理解析

深入解析HTML如何讀取資料庫 深入解析HTML如何讀取資料庫 Apr 09, 2024 pm 12:36 PM

深入解析HTML如何讀取資料庫

華為手機投影機教學:快速連接電視機 華為手機投影機教學:快速連接電視機 Mar 25, 2024 am 11:42 AM

華為手機投影機教學:快速連接電視機

See all articles