db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From T E Schmitz <mail...@numerixtechnology.de>
Subject Re: Restore database in MSSQL using torque
Date Fri, 23 Jul 2004 11:24:17 GMT
Hello  Artur,

Artur Z wrote:

> the following command in MSSQL restores database from file:
> RESTORE DATABASE database_name FROM DISK = 'backup.bak'
> but when i invoke it as query using torque server says that operation can not be performed
because I'm logged in
> it means that I will never be able to do it from my app :(
> is there another way to restore database from file ? (making backup works fine)

I can only presume that you are using BasePeer.executeQuery(String 
queryString) ???
If so, executeQuery with unspecified connection object will create a new 
implicit transaction (connection) for execution of the statement.

I haven't done this myself, but it might be worth trying
executeQuery(String queryString, boolean singleRecord, Connection con)
passing null for the Connection.

If this doesn't work, you should investigate how the Torque generator 
carries out the db-create. This is done without connection, too.



Tarlika Elisabeth Schmitz

To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org

View raw message