Add Oracle linked server favorites in SQL Server 2000
There are only three sentences in the Code:
Sp_addmediaserver 'canclelink ', 'oracle', 'msdaora ', 'export lenetname'
/*
Oraclelink is the name to be used in SQL, and oraclenetname is the name of the Oracle network service.
*/
Go
Sp_add1_srvlogin 'canclelink ', 'false', 'sa', 'oracleuserid', 'oraclepwd'
/*
Oraclelink is the name to be used in SQL, defined in sp_addmediaserver;
Sa is a user in SQL,
Oracleuserid is the login name of the Oracle database, and oraclepwd is the password of oracleuserid.
*/
Go
Select * from distinct lelink... oracleuserid. Area area_1
Go
/*
The username and table name oracleuserid. area must be capitalized. Otherwise, the following error message is returned:
Server: Message 7314, level 16, status 1, Row 1
The ole db Provider 'canclelink 'does not contain the table' "oracleuserid". "area "'. The table may not exist, or the current user does not have the permission to use the table.
Ole db Error Tracking [non-interface error: ole db provider does not contain the table: providername = 'your lelink ', tablename =' "oracleuserid". "area" '].
The English prompt is:
Server: MSG 7314, level 16, state 1, line 0
Ole db Provider 'your lelink 'does not contain table' "oracleuserid". "area" '. The table either does not exist or the current user does not have permissions on that table.
Ole db error trace [non-interface error: ole db provider does not contain the table: providername = 'your lelink ', tablename =' "oracleuserid". "area" '].
The current user, that is, the user who uses the Enterprise Manager or query analyzer to connect to SQL Server, must be the user set in sp_add1_srvlogin. The preceding user is Sa.
If Windows integration verification is used, the following error message is returned:
Server: Message 7399, level 16, status 1, Row 1
The ole db Provider 'msdaora 'reports an error. Verification Failed.
[OLE/DB Provider returned message: ORA-01004: Default User Name feature not supported; login denied]
Ole db Error Tracking [OLE/DB Provider 'msdaora 'idbinitialize: Initialize returned 0x80040e4d: Verification Failed.]
The English prompt is:
Server: MSG 7399, level 16, state 1, line 1
Ole db Provider 'msdaora 'reported an error. authentication failed.
[OLE/DB Provider returned message: ORA-01004: default username feature not supported; logon denied]
Ole db error trace [OLE/DB Provider 'msdaora 'idbinitialize: Initialize returned 0x80040e4d: authentication failed.].
*/
This article from the csdn blog, reproduced please indicate the source: http://blog.csdn.net/fengfangfang/archive/2006/07/28/993882.aspx