Web Hosting Forum | Lunarpages

Author Topic: How to restore database from MS SQL 2005?  (Read 8104 times)

Offline Lucky:)

  • Space Explorer
  • ***
  • Posts: 7
How to restore database from MS SQL 2005?
« on: January 24, 2011, 08:40:07 AM »
I've created db in MS SQL 2005.
When I try to restore it I'm getting this error:

.Net SqlClient Data Provider
 
An object or column name is missing or empty. For SELECT INTO statements, verify each column has a name. For other statements, look for empty alias names. Aliases defined as "" or [] are not allowed. Add a name or single space as the alias name.
 
USE [master]
GO
 
ALTER DATABASE []
SET SINGLE_USER
WITH ROLLBACK IMMEDIATE
GO
 
RESTORE DATABASE []
FROM DISK=N'\\xxx.xxx.xxx.xxx\dbupload\6431418856379623_my_db.bak'
WITH RECOVERY
, REPLACE
, NOUNLOAD, STATS = 10
GO
 
ALTER DATABASE []
SET MULTI_USER
GO

I have no problem to restore this bak on other SQL server 2005.
Are there any incompatibility issues lunarpages MSSQL vs MS SQL 2005?  :?
« Last Edit: January 24, 2011, 09:11:19 AM by Lucky:) »

Offline annaharris

  • Spacescooter Operator
  • *****
  • Posts: 48
    • PHP Development Comapny
Re: How to restore database from MS SQL 2005?
« Reply #1 on: April 23, 2013, 04:20:48 AM »
First of all, You need to start SQL Server in single user mode and then restore your database. So using parameter -m it should work if you can get in via Management Studio.

 

Share |