CREATE DATABASE databaseName
ON (FILENAME='D:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\dbname.mdf')
FOR ATTACH_REBUILD_LOG;
NOTE: Provide the correct name for the data file (.mdf).
SELECT *
FROM sys.sysdatabases
WHERE dbid = 13
NOTE: I used dbid=13 because is the ID presented in the error message. If that's not the correct ID please replace it before running the command.
SELECT databasepropertyex('Db_users', 'STATUS')
(but it doesn't say Offline, the icon next to it has a person on the image).Ok, the person means the database is in a Single Mode status.
USE master
GO
ALTER DATABASE Db_users
SET MULTI_USER
GO
ALTER DATABASE Db_users
SET PAGE_VERIFY CHECKSUM
A) Do I have to try and restore from the previous backup (and lose a day of data)?And lost a day of data, right?