Silkroad Database Files

Posted on by admin
Silkroad Database Files 5,8/10 6223 reviews
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.

Active5 months ago

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

AbsAbs
21.3k86 gold badges240 silver badges386 bronze badges

5 Answers

Detach the Database, Rename the files, Attach it again.

BabakBabak

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.

Shiva
15k10 gold badges65 silver badges96 bronze badges
marc_smarc_s
603k137 gold badges1155 silver badges1290 bronze badges

The '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.

sverrehundeidesverrehundeide

The simplest way to rename SQL server physical database files is:

  1. Open and connect to the SQL server where the database you wanted to rename is located.
  2. 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 all NewDatabaseName with the new name you want to set for your database

use OldDatabaseName

  1. And then Right click on the OldDatabaseName, select Tasks and then choose Take Offline

  2. Go to the location (C:Program FilesMicrosoft SQL ServerMSSQL10_50.MSSQLSERVERMSSQLDATA...) where the physical files are located and rename them to the NewDatabaseName you specified in number 2. Remember to check the absolute path of these files to be used on your computer.
  3. Go back to Microsoft SQL Server Management Studio. Right click on the OldDatabaseName, select Tasks and then choose Bring Online.
  4. Finally, go ahead and rename your OldDatabaseName to the NewDatabaseName. You are done :-)
Desta Haileselassie HagosDesta Haileselassie Hagos
11k2 gold badges31 silver badges42 bronze badges
  1. Backup the original database
  2. Drop the original database
  3. 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.
SevenateSevenateDatabase
4,1792 gold badges34 silver badges61 bronze badges

Not the answer you're looking for? Browse other questions tagged sql-servertsqlmdfldf or ask your own question.