Silkroad Database Files

To Download The Database u need just click on the box p.s the database are cleen not edit:) Vsro DataBases. And Elitepvpers.com for the servers files. Download Silkroad Database for free. So, target of this project is to get the official Silkroad server files to work. There is many missing tables/content at the moment, but, progress is still pretty good.
I have used tsql to detach a database like this:
I then made use of PHP to rename the physical files. I was able to rename the mdf file but not the ldf file! I even tried a dos command REN
but that didn't work for the ldf file either!
I wanted to ask, is there something special about the physical log files that allow it not to be renamed?
Silkroad Database Files Pdf
Is there a better way of doing this?
Thanks all
AbsAbs5 Answers
Detach the Database, Rename the files, Attach it again.
You can do it using an ALTER DATABASE
statement - like this:
You need to modify each file separately, e.g. if you have multiple data files, you need to modify each of those.
For details, see the Technet documentation on this topic.
ShivaThe 'ALTER DATABASE (your database) MODIFY FILE' command will only rename the logical names. This post shows how to use xp_cmdshell to also rename the physical files: http://www.mssqltips.com/sqlservertip/1891/best-practice-for-renaming-a-sql-server-database/
Please note the following:
1. xp_cmdshell will be executed under the user which the SQL Server process runs as, and might not have the file system permissions required to rename the database files
2. For security reasons, remember to disable xp_xmdshell
The following is an example of how the renaming can be done based on the mentioned blog post. It will replace the database MyDB with the database NewMyDB. The original MyDB (renamed to MyDB_OLD) will be left detached.
The simplest way to rename SQL server physical database files
is:
- Open and connect to the
SQL server
where the database you wanted to rename is located. - Execute the following script in the query window in order to change the physical and logical names. Remember to replace all the '
OldDatabaseName
' with the new name of the database ('NewDatabaseName
') you want to change its name to. Replace allNewDatabaseName
with the new name you want to set for your database
use OldDatabaseName
And then Right click on the
OldDatabaseName
, selectTasks
and then chooseTake Offline
- Go to the location (
C:Program FilesMicrosoft SQL ServerMSSQL10_50.MSSQLSERVERMSSQLDATA...
) where the physical files are located and rename them to theNewDatabaseName
you specified in number 2. Remember to check the absolute path of these files to be used on your computer. - Go back to
Microsoft SQL Server Management Studio
. Right click on theOldDatabaseName
, selectTasks
and then chooseBring Online
. - Finally, go ahead and rename your
OldDatabaseName
to theNewDatabaseName
. You are done :-)
- Backup the original database
- Drop the original database
- Restore the original database from the backup, but with different name; the files of the restored database will be also automatically named taking into account new database name.
