Renaming a Database - the databasename.mdf file that is...
Posted on 2008-01-29
I am creating a utility that works with SQLExpress, and while Express doesn't have an export feature, I would like to be able to allow them to rename the database, so that they can more or less archive the info in that database locally. Then, when the app resumes, it will create a fresh instance of the database.
Does anyone havethe T-SQL that will allow me to do this? If I try to do it simply by going through file manager, I get the error message that: "Cannot rename IRLRV: It is being used by another person or program. Close any programs that might be using this file and try again."
Thanks in advance!