October 29, 2008 at 4:42 pm
I have SQL Server 2005 Express edition and SQL Server 2005 Standard edition installed on my system.
Meanwhile a client has sent SQL Server 2000 files .mdf and .ldf.
Is it possible to move these files into SQL Server 2005?
🙂 If Yes how and where can I get information on this issue
:ermm: If No what is the workaround?
My undesrstanding is quite below 5 so I do need a little bit of hand holding to understand this.
Thanks
October 29, 2008 at 4:47 pm
Is the mdf and ldf files sent by client for system databases(master, model, msdb) or is it for user created databases?
MJ
October 29, 2008 at 4:58 pm
Its a User created db
October 30, 2008 at 6:51 am
Yes, you can connect this database to 2005, however, when you attach these files, the structure is internally converted to a 2005 database. Which means, you can't detach these files and attach them back to a 2000 databaseserver. Same for a backup!
To connect this database:
- place the files on your disk (where? you tell me)
- attach the database (search .mdf file, check location of .ldf file)
Wilfred
The best things in life are the simple things
October 30, 2008 at 7:54 am
you might have to fix users/logins as well.
October 30, 2008 at 12:01 pm
When I attach as suggested I get an error.
Should I move the mdf & ldf files into the SQL Server folder?
TITLE: Microsoft SQL Server Management Studio
------------------------------
An error occurred when attaching the database(s). Click the hyperlink in the Message column for details.
------------------------------
BUTTONS:OK
TITLE: Microsoft SQL Server Management Studio
------------------------------
Attach database failed for Server 'COMP-VISTAPC'. (Microsoft.SqlServer.Smo)
------------------------------
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
------------------------------
Directory lookup for the file "d:\sqldb\MSSQL\data\archive_sample.mdf" failed with the operating system error 3(The system cannot find the path specified.). (Microsoft SQL Server, Error: 5133)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.3068&EvtSrc=MSSQLServer&EvtID=5133&LinkId=20476
------------------------------
BUTTONS:OK
------------------------------
October 30, 2008 at 12:56 pm
You tried to attach the file to a directory which doesn't exist (it's probably the original directory on the 2000 server). Check directories for both .mdf and .ldf files
Wilfred
The best things in life are the simple things
October 30, 2008 at 1:26 pm
Please elaborate on what you sya as it doesn't seem to sink in
[You say] You tried to attach the file to a directory which doesn't exist (it's probably the original directory on the 2000 server). Check directories for both .mdf and .ldf files
Let me give you a picture of what I have
1. I have SQL Server 2005 installed on my system and that is it.
2. I have been provided with a .mdf and .ldf file from the client which is SQL 2000
Do I have to move these files to some other designated folder before attaching? What is it I need to do or have for the scenario explained ?
:blink:
October 30, 2008 at 1:53 pm
You should right click Databases, select all tasks, then Attach. You should browse to your mdf files.
October 30, 2008 at 3:26 pm
===================================
Attach database failed for Server 'COMP-VISTAPC'. (Microsoft.SqlServer.Smo)
------------------------------
------------------------------
Program Location:
at Microsoft.SqlServer.Management.Smo.Server.AttachDatabase(String name, StringCollection files, String owner)
at Microsoft.SqlServer.Management.SqlManagerUI.AttachDatabaseData.PrimaryFile.Attach()
at Microsoft.SqlServer.Management.SqlManagerUI.AttachDatabase.SendDataToServer()
===================================
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
------------------------------
Program Location:
at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(String sqlCommand, ExecutionTypes executionType)
at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(StringCollection sqlCommands, ExecutionTypes executionType)
at Microsoft.SqlServer.Management.Smo.ExecutionManager.ExecuteNonQuery(StringCollection queries)
at Microsoft.SqlServer.Management.Smo.Server.AttachDatabaseWorker(String name, StringCollection files, String owner, AttachOptions attachOptions)
at Microsoft.SqlServer.Management.Smo.Server.AttachDatabase(String name, StringCollection files, String owner)
===================================
Database 'archive_sample' cannot be upgraded because it is read-only or has read-only files. Make the database or files writeable, and rerun recovery. (.Net SqlClient Data Provider)
------------------------------
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.3068&EvtSrc=MSSQLServer&EvtID=3415&LinkId=20476
------------------------------
Server Name: COMP-VISTAPC
Error Number: 3415
Severity: 16
State: 1
Line Number: 1
------------------------------
Program Location:
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(String sqlCommand, ExecutionTypes executionType)
Viewing 10 posts - 1 through 10 (of 10 total)
You must be logged in to reply to this topic. Login to reply