Reputation: 1
In my online database I take the database in offline and close the SQL Server.
Now my database shows an error
login failed
but login Id and password are correct and not connect to database
Please help me to connect to it again, I use SQL Server 2005.
Upvotes: 0
Views: 91
Reputation: 3793
You won't be able to connect to the database itself when it's offline, but should still be able to connect to the master database. The question isn't clear on how you're trying to access it but for example:
USE [master]
GO
ALTER DATABASE [MyDB] SET ONLINE
GO
Or from SQL Server Management Studio you should still be able to connect to the database server itself and execute the second command under the context of the master database.
Upvotes: 1