Copying a database in SQL Server 2005
Posted on 2007-07-23
We have an enterprise edition trial version of SQL Server 2005 installed on our file server, and SQL Server Express installed on a workstation. What is the best way to copy a database from the enterprise edition installed on the file server to the SQL Server Express installed on the workstation?
The "Copy Database" option isn't available in the Express Edition, when I backup the database to a file and try to restore the database I get the error messages:
If the database already exists:
"System.Data.SqlClient.SqlError: The backup set holds a backup of a database other than the existing 'Northwind' database."
If the database doesn't exist:
"System.Data.SqlClient.SqlError: The operating system returned the error '5(Access is denied.)' while attempting 'RestoreContainer::ValidateTargetForCreation' on 'c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Northwind.mdf'. (Microsoft.SqlServer.Express.Smo)"