Error while trying to connect oracle from SQL server thru Linked Server

  • Hi-

    I created a linked server TEST_LK to connect oracle 10g from SQL server 2005.

    Also created a login with the following sp.

    EXEC sp_addlinkedsrvlogin 'TEST_LK', 'FALSE', 'support', 'support'

    While trying to run the query in SQL server 2005

    select *

    from openquery(TEST_LK, 'select * from db_name.table_name')

    Got the following Error Msg:

    OLE DB provider "OraOLEDB.Oracle" for linked server "TEST_LK" returned message "ORA-01005: null password given; logon denied".

    Msg 7303, Level 16, State 1, Line 3

    Cannot initialize the data source object of OLE DB provider "OraOLEDB.Oracle" for linked server "TEST_LK".

    Can any one please advice in this.

    Thanks

    -Keerthi

  • Try this,

    Might be helpful : http://www.mssqltips.com/tip.asp?tip=1433

    EXEC sp_addlinkedserver

    @server = ''

    , @srvproduct = ''

    , @provider= 'SQLOLEDB'

    , @datasrc= ''

    GO

    sp_addlinkedsrvlogin @rmtsrvname = 'Server Name'

    ,@useself = 'FALSE'

    ,@locallogin = 'LOGIN'

    ,@rmtuser = 'RemoteLogin'

    ,@rmtpassword = 'RemoteLogin Password'

    GO

    Cheers,
    - Win.

    " Have a great day "

  • try

    exec ('select * from db_name.table_name'' ) at TEST_LK

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply