Checking Linked Server If Running ??

  • I have been attempting to write a stored procedure which will check if a linked oracle 8.7 server on another IP address is running or that I can or cannot attach to it to run some procedures which import rows from the oracle.

    It would also help to be able to keep a local connection log.

    Currently I am running jobs and "looking" at the job history log.

    It would be a lot "better" if I could check the oracle server, log the datetime and status in a table and then run my job(s).

    Would it be possible for anyone to point me in a direction, OR allow me to see and example of a sproc that can do this ?

    Many Thanks

    Jon Spartan

    email: jonu@ixtech.net

  • You can use OPENDATASOURCE or OPENROWSET to connect to Oracle using an ad hoc connection that does not make use of the linked server.

    Please check out the online Transact-SQL Reference:

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_ta-tz_3zaq.asp

    OPENDATASOURCE

    Provides ad hoc connection information as part of a four-part object name without using a linked server name.

    Syntax

    OPENDATASOURCE ( provider_name, init_string )

    quote:


    I have been attempting to write a stored procedure which will check if a linked oracle 8.7 server on another IP address is running or that I can or cannot attach to it to run some procedures which import rows from the oracle.

    It would also help to be able to keep a local connection log.

    Currently I am running jobs and "looking" at the job history log.

    It would be a lot "better" if I could check the oracle server, log the datetime and status in a table and then run my job(s).

    Would it be possible for anyone to point me in a direction, OR allow me to see and example of a sproc that can do this ?

    Many Thanks

    Jon Spartan

    email: jonu@ixtech.net


  • Why not use OPENQUERY to execute some SQL code simply to test the Oracle server?

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

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