We are using the SQL Server Data-tier application and I'm having a hard time finding out what the current version a database is at. Is there a way to find it
- in SQL Server Management Studio
- Via an SQL statement
- From .net code
?
Thanks
Mark
We are using the SQL Server Data-tier application and I'm having a hard time finding out what the current version a database is at. Is there a way to find it
?
Thanks
Mark
Answer to 3:
ServerConnection serverConnection;
string databaseName;
using (SqlConnection sqlConnection = 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;
}
DacStore dacstore = new DacStore(serverConnection);
var dacInstance = dacstore.DacInstances[databaseName];
System.Diagnostics.Debug.Print("Database {0} has Dac pack version {1}.", databaseName, dacInstance.Type.Version);
Still looking for answers to 1 and 2
Thanks
Mark