Home Forums SQL Server 2008 Working with Oracle Anyway to connect to Oracle on the fly without tnsnames entry? RE: Anyway to connect to Oracle on the fly without tnsnames entry?

  • Regardless of method, first the Oracle client, at least the Instant Client, must be installed on the SQL Server box.

    For a linked server connection, you'll need a TNSNAME. However, have you investigated either of these two options? This would be my first attempt, but I'm not sure if it will work.

    Reply back if you find a solution and get it working. I could use it myself on occasion, but am too busy to dick around with it.

    OPENROWSET

    ( { 'provider_name' , { 'datasource' ; 'user_id' ; 'password'

    | 'provider_string' }

    , { [ catalog. ] [ schema. ] object

    | 'query'

    }

    | BULK 'data_file' ,

    { FORMATFILE = 'format_file_path' [ <bulk_options> ]

    | SINGLE_BLOB | SINGLE_CLOB | SINGLE_NCLOB }

    } )

    https://msdn.microsoft.com/en-us/library/ms190312(v=sql.105).aspx

    OPENDATASOURCE ( provider_name, init_string )

    https://msdn.microsoft.com/en-us/library/ms179856(v=sql.105).aspx

    "Do not seek to follow in the footsteps of the wise. Instead, seek what they sought." - Matsuo Basho