加载中…
个人资料
  • 博客等级:
  • 博客积分:
  • 博客访问:
  • 关注人气:
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
正文 字体大小:

开发员DB_LINK方式访问SAP底层数据库的利弊

(2014-11-03 13:45:52)
分类: SAP_Basis
开发员DB_LINK方式访问SAP底层数据库的利弊


因日常跟踪维护需要,ZMMT056表数据量较大,亦为了方便用SQL语句方式组合查询,
申请开通DBLINK,访问SAP系统自定义表ZMMT056。




分布式事务处理而已,建立DB_LINK语法如下:
create public database link LINK_NAME
connect to userName identified by password
using '(TNSNAMES.ORA
)';
两种方式一种是直接使用TNSNAME.ORA里面的标识。一种是直接写到USING后面。

可以建立公有和私用DB_LINK。



sap note 25383 - Database links, synonyms, remote DB


dblink 容易内存溢出   推荐使用  golden gate


SELECT * FROM a.test@your_db_link_name 


Unable to Access Tables in Schema Using DB Link
http://oracle.ittoolbox.com/groups/technical-functional/oracle-db-l/unable-to-access-tables-in-schema-using-db-link-5227982


I need to read SAP Note 323151, 339092 and 178949 for details but I have a DEMOSYSTEM so I can't register to have a login/password needed to access to SAP Notes web site.

Creating a DBCON Entry
 
The database multi-connect information is stored in the SAP table DBCON. You can create a DBCON entry as follows:
...
       1.      In the screen Maintain and set monitor multi-connect data, from the menu choose Goto ® Maintain DBCON.
       2.      Choose New DBCON entry.
The dialog box New DBCON entry appears.
       3.      Make entries in the following fields:
1.             Connection name:
Enter any name. This is the name by which your remote database connection is identified.
2.             Database system: MSS
This field must display MSS.
3.             DB server (instance):
Enter the name of the target SQL Server that you want to administer from your local SAP system.
4.             Database login:
SQL Server login with System Administrator privileges, that is this login should be member of the sysadmin fixed server role on the target SQL Server. If such a login does not exist, you have to create it on the target SQL Server. The SAP multi-connect mechanism allows both integrated security logins and the use of SQL Server authentication. For security reasons, we highly recommend to use integrated security (Windows authentication). If you use Windows security, leave this field empty.
5.             Password / Re-enter password :
If you have decided to use integrated security, leave these fields empty. Otherwise enter the password of the SQL Server login.
6.             Database name:
Enter the name of the target database.
7.             Database user:
For remote database monitoring, leave this field empty. This will ensure that the database connection has dbo privilege.
8.             Object source schema:
This database schema contains all SAP database monitor objects, for example, stored procedures, user defined functions and tables. They implement the low-level database monitor functions.
Make one of the following entries:
1.              If the target server is an SAP ABAP application of the same release than the source application server, and the SAP database objects (tables, views, stored procedure etc.) do not belong to the schema dbo, enter the  0.
    EXEC SQL.
      connect to 'Connection_string'
    ENDEXEC.
  ENDIF.
 
 
    EXEC SQL.
      SELECT CUST_CODE FROM CUSTOMER_MAP@IMPSCONN
            INTO :ZIMPSCTCODE
            WHERE SAP_CODE = :IT_IMPS_CUST-CUST_CODE
    ENDEXEC.
 
Salil .......
 

0

阅读 收藏 喜欢 打印举报/Report
  

新浪BLOG意见反馈留言板 欢迎批评指正

新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 产品答疑

新浪公司 版权所有