c# - Publish dacpac in single user mode using Microsoft.SqlServer.Dac.DacServices -


i want publish dac pac in single user mode prevent unnecessary db changes while database upgrading. have used deploy function in microsoft.sqlserver.dac.dacservices.

that function there argument dacdeployoptions options. have set deploydatabaseinsingleusermode = true in options. though set true able db operation while dacpac deploying.

is there missing? or there other way achieve this.

help appreciated!

which version of dacfx using? if it's not latest, best latest, because lot of older ones not @ recognizing options specify.

alternatively, this(it's i've done, instead of trying dacfx work properly.

            serverconnection connection = new serverconnection(servername);             server sqlserver = new server(connection);             database qadatabase = sqlserver.databases[databasename];             qadatabase.databaseoptions.useraccess = databaseuseraccess.single;             qadatabase.alter(terminationclause.rollbacktransactionsimmediately);             qadatabase.refresh();  //dacpac logic goes here              qadatabase.databaseoptions.useraccess = databaseuseraccess.multiple;             qadatabase.alter(terminationclause.rollbacktransactionsimmediately);             qadatabase.refresh(); 

Comments

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

javascript - Complex json ng-repeat -

jquery - Cloning of rows and columns from the old table into the new with colSpan and rowSpan -