Perl validating file names spanish dating link online


10-Aug-2020 02:56

Hi, I am planning to automate a nighty restore of a DB on another server can someone point me in the right direction with the SQL script to modify the logical file names to the correct path and not the ones carried over with the DB??

i.e the database is to be renamed on the new server any help much appreciated Many thanks in advance Hi, I am planning to automate a nighty restore of a DB on another server can someone point me in the right direction with the SQL script to modify the logical file names to the correct path and not the ones carried over with the DB??

You need to find out what the names are, and there are two ways to do it: 1) sp_helpdb on the source database. -- Erland Sommarskog, SQL Server MVP, es****@Books Online for SQL Server 2005 at Online for SQL Server 2000 at I finally got this working so thanks for anyone else here is the script i used databasename should be the Database Name step 1 kill conections ALTER DATABASE databasename SET SINGLE_USER WITH ROLLBACK IMMEDIATE step 2 restore DB RESTORE DATABASE datbasename FROM DISK = 'F:\backup\databasename.bak' WITH MOVE 'databasename_Data' TO 'F:\MSSQL\MSSQL\Data\databasename MDF', MOVE 'databasename_Log' TO 'F:\MSSQL\MSSQL\databasename.

It's the first column in the second result set, just copy and paste into the single quotes.

i.e the database is to be renamed on the new server any help much appreciated Many thanks in advance This should point you in the right direction: If you restore the database to a different file location than the source database, you must specify the WITH MOVE option.

For example, on the source server the database is in the D:\Mssql\Data folder.

Or, if all you have is a backup, RESTORE FILELISTONLY.If validation errors are found, we cache an edited version of the file, adding error messages to any invalid lines in the CSV file.