In SQL Server Management Studio
From http://msdn.microsoft.com/en-us/library/ee210574.aspx
To view information about the DAC deployed in an instance of the database engine:
Select View / Object Browser .
Connect to the instance from the Object Browser panel.
Select the View / Browser Object menu.
Select the node server in the Object Browser that maps to the instance, and then go to Office \ Application node level data .
The list view in the upper pane of the details page lists all the DACs deployed in the Database Engine instance. Select the DAC to display the information in the details panel at the bottom of the page.
The right-click menu for node-level data applications is also used to deploy a new DAC or delete an existing DAC.
Using SQL statement
SELECT instance_name, type_version FROM msdb.dbo.sysdac_instances
Via SQL statement on Azure
SELECT instance_name, type_version FROM master.dbo.sysdac_instances
Programmatically Using .NET Code
Please note that in DacFx 3.0 this is no longer valid. See my other answer to do this.
FROM#
ServerConnection serverConnection; string databaseName;
Vb.net
Dim serverConnection As ServerConnection Dim databaseName As String ' Establish a connection to the SQL Server instance. Using sqlConnection As New SqlConnection(ConfigurationManager.ConnectionStrings("DefaultConnection").ConnectionString) serverConnection = New ServerConnection(sqlConnection) serverConnection.Connect() ' Assumes default database in connection string is the database we are trying to query. databaseName = sqlConnection.Database End Using ' Get the DAC info. Dim dacstore As New DacStore(serverConnection) Dim dacInstance = dacstore.DacInstances(databaseName) System.Diagnostics.Debug.Print("Database {0} has Dac pack version {1}.", databaseName, dacInstance.Type.Version)
Mark
source share