SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Script to test connection to SQL Server


Script to test connection to SQL Server

Author
Message
na1774
na1774
SSC Veteran
SSC Veteran (241 reputation)SSC Veteran (241 reputation)SSC Veteran (241 reputation)SSC Veteran (241 reputation)SSC Veteran (241 reputation)SSC Veteran (241 reputation)SSC Veteran (241 reputation)SSC Veteran (241 reputation)

Group: General Forum Members
Points: 241 Visits: 273
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.
AlexSQLForums
AlexSQLForums
SSCommitted
SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)

Group: General Forum Members
Points: 1896 Visits: 2269
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
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search