Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread Restore Database
Wed, Oct 22 2008 10:36 PMPermanent Link

Graeme
Hi,

Am am using a TEDBScript component. With the following SQL defined

SCRIPT (IN Filename varchar(60))
BEGIN
 
 EXECUTE IMMEDIATE 'RESTORE DATABASE "' + CURRENT_DATABASE() + '" FROM "' +
 Filename + ' ' +
 '" IN STORE "TestDBStore" INCLUDE CATALOG';
END

When I run it says it cannot get 'exclusive access'. I am sure (99.999%) I have not other connects or sessions running.
See none on server. This is running stand alone not in IDE.

Can you test that this works from a TEDBScript component?
Thu, Oct 23 2008 1:55 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Graeme,

<< Am am using a TEDBScript component. With the following SQL defined

SCRIPT (IN Filename varchar(60))
BEGIN

 EXECUTE IMMEDIATE 'RESTORE DATABASE "' + CURRENT_DATABASE() + '" FROM "' +
 Filename + ' ' +
 '" IN STORE "TestDBStore" INCLUDE CATALOG';
END

When I run it says it cannot get 'exclusive access'. I am sure (99.999%) I
have not other connects or sessions running.
See none on server. This is running stand alone not in IDE.  >>

You need to make sure that the database (that you're trying to restore) is
not open, which means that you're going to want to execute this from a
context other than the database that you're trying to restore to.  If you
click on the session name in the treeview, that will do the trick because it
will use the Configuration database as the current database in such a case.

--
Tim Young
Elevate Software
www.elevatesoft.com

Image