Whenever I try to create a copy of my database using the BACKUP and RESTORE commands, the copy is created, but contains no data. I'm running the following commands, and get success status back:
BACKUP DATABASE [SomeDB]
TO DISK = N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\SomeDB.bak'
BACKUP DATABASE successfully processed 161 pages in 0.021 seconds (62.805 MB/sec).
RESTORE DATABASE [SomeDB_Copy]
FROM DISK=N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\SomeDB.bak'
WITH MOVE N'SomeDB' TO N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\SomeDB_copy.mdf',
MOVE N'SomeDB_log' TO N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\SomeDB_copy.ldf'
RESTORE DATABASE successfully processed 162 pages in 0.095 seconds (13.958 MB/sec).
Am I missing a step? All of the examples I found use this method. Even on StackOverflow. This is on SQL Server 2005.
Update:. I backed up the database to a new file, and restored using that and everything worked fine. I don't know if my original file was corrupted, or something else weird was going on.