Take the database OFFLINE. Go and change the MDF & LDF files name in it's locations and the take the DB online.
Do just that and the DB will be suspect when brought back online.
Step 1: Run ALTER DATABASE and use the MOVE option to change the names of the mdf and ldf that is stored in SQL's data catalog
Step 2: Take the DB offline
Step 3: Rename the files themselves
Step 4: Bring the database online
If you leave out either step 1 or step 3, the DB will be suspect when it's brought online.
2. just as we query "
select name from master.dbo.sysdatabases
" for db names is there a way we can list out mdf or ldf file names ?
SELECT * FROM sys.master_files
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)SQL In The Wild
: Discussions on DB performance with occasional diversions into recoverability
We walk in the dark places no others will enter
We stand on the bridge and no one may pass