Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Script to test connection to SQL Server Expand / Collapse
Author
Message
Posted Tuesday, August 07, 2012 2:04 PM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Sunday, January 13, 2013 11:24 PM
Points: 93, Visits: 259
Hi All,



We have a table 'Servers' which lists all the Servers in our Company.

My scenario is that we have a a Dynamic as well as static FQDN to connect to a database server.

I need the script or packgae(SSIS) to first test if we are able to connect using the static name if 'Yes' then I need to update a column 'IsConnectStatic' in a table Servers to 1 and then test connection using Dynamic name if that connection is also successful then I need to update the column 'IsConnectDynamic' column to 1.
in Servers table.

I am wondering how I can establish this logic. If I can use SSIS which SSIS task I need to use? And whiin the task how do I establish the object.

Thank you.
Post #1341531
Posted Wednesday, August 08, 2012 11:52 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Wednesday, March 19, 2014 10:03 AM
Points: 1,256, Visits: 1,758
na1774 (8/7/2012)
Hi All,



We have a table 'Servers' which lists all the Servers in our Company.

My scenario is that we have a a Dynamic as well as static FQDN to connect to a database server.

I need the script or packgae(SSIS) to first test if we are able to connect using the static name if 'Yes' then I need to update a column 'IsConnectStatic' in a table Servers to 1 and then test connection using Dynamic name if that connection is also successful then I need to update the column 'IsConnectDynamic' column to 1.
in Servers table.

I am wondering how I can establish this logic. If I can use SSIS which SSIS task I need to use? And whiin the task how do I establish the object.

Thank you.


If they are sql servers you can use this article http://sql-bi-dev.blogspot.com/2010/07/dynamic-database-connection-using-ssis.html


Alex S
Post #1342081
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse