January 18, 2012 at 3:37 pm
so how exactly it will be? can you please put an example of full code?
Thank you
January 18, 2012 at 3:43 pm
USE master;
GO
EXEC sp_attach_single_file_db @dbname = 'YourDatabase',
@physname = N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\YourDatabase_Data.mdf';
make sure there isn't a YourDatabase_log.ldf in there
OR
USE [master]
GO
CREATE DATABASE [YourDatabase] ON
( FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\YourDatabase_Data.mdf' )
FOR ATTACH
January 18, 2012 at 3:48 pm
vazaryan84 (1/18/2012)
so how exactly it will be? can you please put an example of full code?Thank you
As you had it, without the log files and FOR ATTACH_REBUILD_LOG
CREATE DATABASE [DM_REPO_ERP ] ON
( FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10_50.SQLEXPRESS\MSSQL\DATA\DM_REPO_ERP .mdf' )
FOR ATTACH_REBUILD_LOG
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
January 18, 2012 at 3:57 pm
Thank You VERY MUCH!!!
Viewing 4 posts - 16 through 18 (of 18 total)
You must be logged in to reply to this topic. Login to reply