Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 1 to 7 of 7 total |
Drop Dayabase via script? |
Mon, Mar 2 2009 2:31 PM | Permanent Link |
darrell | I am trying to run:
SCRIPT BEGIN EXECUTE IMMEDIATE 'DROP Database "BrainMan"'; EXECUTE IMMEDIATE 'CREATE Database "BrainMan" PATH ''C:\ElevateSoft\Databases\'''; ... The database is closed at that point, yet I receive error #300 Cannot lock database .. for exclusive access. How do I resolve this? TIA Darrell |
Wed, Mar 4 2009 10:39 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Darrell,
<< I am trying to run: SCRIPT BEGIN EXECUTE IMMEDIATE 'DROP Database "BrainMan"'; EXECUTE IMMEDIATE 'CREATE Database "BrainMan" PATH ''C:\ElevateSoft\Databases\'''; .. The database is closed at that point, yet I receive error #300 Cannot lock database .. for exclusive access. >> How are you running the script - in the EDB Manager or in an application ? What database is the active database when you run the script ? -- Tim Young Elevate Software www.elevatesoft.com |
Wed, Mar 4 2009 1:00 PM | Permanent Link |
Kai | "Tim Young [Elevate Software]" wrote:
Darrell, << I am trying to run: SCRIPT BEGIN EXECUTE IMMEDIATE 'DROP Database "BrainMan"'; EXECUTE IMMEDIATE 'CREATE Database "BrainMan" PATH ''C:\ElevateSoft\Databases\'''; .. The database is closed at that point, yet I receive error #300 Cannot lock database .. for exclusive access. >> How are you running the script - in the EDB Manager or in an application ? What database is the active database when you run the script ? -- Tim Young Elevate Software www.elevatesoft.com In EDB Manager. I only have one database, so I guess it can be closed and be the active one? Darrell |
Wed, Mar 4 2009 1:20 PM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Kai
Are you running it in the context of the session or the database? Roy Lambert [Team Elevate] |
Wed, Mar 4 2009 4:20 PM | Permanent Link |
Darrell | Roy Lambert wrote:
Are you running it in the context of the session or the database? Roy Lambert [Team Elevate] Roy: I don't know what you mean by that - how can I tell? Darrell |
Thu, Mar 5 2009 3:24 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Darrell
This is one that I fail on frequently Look at the status bar at the bottom. Third in from the right will be a database icon and the name of the current database. If its showing one of your database names then you're executing it from the context of the database, if it shows Configuration then its from the context of the session (the session is shown in the next box right) and if its blank you're at the context of the engine. Roy Lambert [Team Elevate] |
Thu, Mar 5 2009 3:24 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Darrell,
<< I only have one database, so I guess it can be closed and be the active one? >> See Roy's response - you want the active database in the EDB Manager to say "Configuration", not the name of your database, when you run that script. Otherwise, the EDB Manager will implicitly open the active database when you execute the script, thus causing the lock error. -- Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Saturday, May 4, 2024 at 09:18 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |