Hi there, i would please like to know how to get a database online in T-SQL, I managed to get it offline in T-SQL, but know I can't get the database back online.
If someone can please help me with the T-SQL command.
Or direct me to a link where I can get more information.
You will not be able to start the server from Query Analyzer or from a program sending T-Sql commands. Starting the server requires an operating system command. You could use OSql and !! to force the shell command.
Any other option would require the service to be started in order to respond to the command.
Hi, now the SQL Server isn't offline, it's only a database in SQL Server thats offline...
SQl Server 2005 is still running, all I need to do is to bring that one specific db online again....
EXECsp_dboption ''db_name, 'offline', 'TRUE'
to take the db offline.... Now I need a command to bring the dabase back online.