Hi, I want to retrieve server name(on which package is present) in activeX script of that DTS package. However I don't want to run a sql command on an ADO connection. Any suggestion using only ActiveX script is required. Thanks in advance.... On the same notes how to retrive the package name?
What is the problem in running @@SErvername? Satya SKJ Microsoft SQL Server MVP Writer, Contributing Editor & Moderator http://www.SQL-Server-Performance.Com This posting is provided AS IS with no rights for the sake of knowledge sharing. Knowledge is of two kinds. We know a subject ourselves or we know where we can find information on it.
I want the same package on two servers, test and production, I want to delete some data on a third server, if production server package is running. I dont same package to run on both the servers but do different functionality based on servername condition. if ( server_name = Production) do something; if (server_name = test) do something else; Is there some OLE DB provider property from which we can retrieve the server name?
You can access the connection object which you have created in your package through activeX script. In your script add this: Dim oConnection As ConnectionManager oConnection = Dts.Connections("Connection Name") Dim sServer As String = CStr(oConnection.Properties("ServerName").GetValue(oConnection))