Export (0) Print
Expand All

Application.ExistsOnSqlServer Method

Returns a Boolean that indicates whether the specified package exists on the instance of SQL Server.

Namespace: Microsoft.SqlServer.Dts.Runtime
Assembly: Microsoft.SqlServer.ManagedDTS (in microsoft.sqlserver.manageddts.dll)

bool ExistsOnSqlServer (
	String^ packagePath, 
	String^ serverName, 
	String^ serverUserName, 
	String^ serverPassword
public boolean ExistsOnSqlServer (
	String packagePath, 
	String serverName, 
	String serverUserName, 
	String serverPassword
public function ExistsOnSqlServer (
	packagePath : String, 
	serverName : String, 
	serverUserName : String, 
	serverPassword : String
) : boolean



The package you are looking for.


The name of the instance of SQL Server to search for the package.


The user name to authenticate against the instance of SQL Server.


The password for the specified serverUserName.

Return Value

true if the package exists on the specified instance of SQL Server. false if the package does not exist.

The following code example creates a SQL Server folder, verifies that it exists, and then removes the folder and rechecks its existence. It also saves a package and verifies that the package was saved using the ExistsOnSqlServer method.

No code example is currently available or this language may not be supported.

Sample Output:

Folder exists? True

Package exists? True

Folder exists? False

Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Development Platforms

For a list of the supported platforms, see Hardware and Software Requirements for Installing SQL Server 2005.

Target Platforms

Community Additions

© 2015 Microsoft