Tuesday, February 14, 2012

Create database in SQL Server 2005 and Attaching it in SQL Express

Hi,

I've created a database in sql server 2005, but now I need to detach this database and attach it in sql express. Is this possible? I keep getting an error that my database is readonly. Any help would be greatly appreciated.

thanks in advance.

Yes, it is possible.

Sometimes, when the database file is detached, the OS changes the file permissions.

Using Windows Explorer, check the file properties, and remove the Read Only checkmark if one is present. Then re-attach.

|||

or you can use Backup/Restore method. Restore the database with MOVe option. Check Restore syntax in BOL

Madhu

No comments:

Post a Comment