Tuesday, March 27, 2012

Attach database to SQL2005 from old MSDE database

I have a medical records system, SoapWare v4.90, that uses MSDE (SQL2000) databases. Due to the 2gb limitation, I am trying to migrate over to SQL 2005 (Standard or Express) which the company says works fine. The SoapWare has a datamanager that allows me to log in to the MSDE instance, detach the SoapWare databases from msde (as well as do backups, etc) which I can confirm are detached.

Then I log back into a SQL2005 database instance using the datamanager and try to attach the database. This is what their pictured instructions demonstrate. However, I get an error:

Database 'sw_charts' cannot be upgraded because it is read-only or has read-only files. Make the database or files writeable, and rerun recovery.

Or... is there a way to attach the databases to SQLExpress manually?

Help pls?The instance of SQL Express needs to be run as "Local system" which is not the default. Once this is changed, the SQL Express database attaches to the old MSDE SQL 2000 database just fine, and the program appears to run without problems.

Thanks to anyone looking at my post, and hopefully, this will help others.

David|||1> use master
2> go

** close the database johandb

1>exec sp_dboption N'johandb',N'autoclose',N'false'
2>go

1>checkpoint
2>go

** detach database johan
1> exec sp_detach_db johandb, true
2> go

** attach with files

1> exec sp_attach_db @.dbname = 'johandb',
2> @.filename1='d:\mssql7\data\johandb_data.mdf',
3> @.filename2='d:\mssql7\data\johandb_log.ldf'
4> go

Regards,
Johan|||Does anyone use Lytec and SOAPware together?

MD in Texassql

No comments:

Post a Comment