java - Failed to restore SQLServer 2012 database with exception com.microsoft.sqlserver.jdbc.SQLServerException: -


i trying restore sqlserver 2012 database using java code. receiving following exception.

com.microsoft.sqlserver.jdbc.sqlserverexception: restore cannot process database 'dbname'  because in use session 

it recommended master database used when performing operation.

following code.

string path ="f:\verity_sqlserver_2012.bk" resultset rs11=stmt11.executequery("restore database verity disk"+" "+"="+"  "+"'"+path+"'"+"select 0"); 

please me.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -