Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unlocking the database

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi Guys:

I uploaded coldfusion files to the webhost. i need to update the database with a new databse.But its not getting updated bcos its locked. How do i unlock the database so that i can renew it.


Thanx
GG
 
Hum...

I hope there is another solution... but the usual one I use is to stop the CF server and send the new DB... that's kinda the only way I found...

You can also (what I usually do) upload a new db, create a new db mapping in cf and change your db name in your cf code... if your code is well-done it will be easy to do ;-)
And you remove the old mapping...

Someone out there must have a better way!

Chris
 
It's very easy. Create a CF template with the following QUERY (make sure to change the DSN):

<CFQUERY DATASOURCE=&quot;YOURDSN&quot; NAME=&quot;UNLOCK&quot;>
SELECT * FROM TableDoesNotExist </CFQUERY>

Basically, this QUERY gives the CF Server an error, thus disconnecting the database from the server until it is accessed again.

Whenever you want to upload your database (usually should be done when there are the least visitors on the site--otherwise the database will keep reconnecting) just run the template with the above code before.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top