Renaming local database files after pathcode copy

msouterblight1

VIP Member
Hello all,

I have created a custom pathcode and environment by copying the DV pathcode and environment. I now have a need to run the local webdev client in this new envirronment. The issue is that the database files AND the database held within them are named the same as DV. The work around has been to install the SQL client utilities and attach/detach the database files depending on which snapshot we are using. My question(s) is this, how can I copy the database files and change the database name wihthin them, AND how do I get those files to deploy with the package?

Thanks...
 
Hi,

At the Web development client, you can move the local MSDE
files by running the following commands (from DOS Prompt)

osql -S.\JDELOCAL -E -Q"sp_renamedb 'JDELocal_DV810','JDELocal_XX810'"
osql -S.\JDELOCAL -E -Q"sp_detachdb JDELocal_XX810"
osql -S.\JDELOCAL -E -Q"sp_attachdb JDELocal_XX810,'c:\e812\xx812\data\newfilename.mdf',
'c:\e812\xx812\data\newfilename.ldf'"

Then, you have to modify your local JDBJ.INI to
reflect the new local MSDE database
(typically under SpecDataSource section)

Once done, you can copy these files to \\deployment\
e812\xx812\package\data
You should compress them as a CAB file and store them
on \\deployment\e812\xx812\package\datacomp too

Good luck
 
Back
Top