20110601

SQL Server database offline

Sinceramente, no tengo ni p*** idea de Microsoft SQL Server, y hoy me ha tocado trillar de rebote un servidor de estos. La cosa es que hay un cenagal de BDD de narices y no se sabe si se están utilizando o no, y ¿cómo me han dicho que lo resuelva? Pues poniendo offline las bases de datos y ya se quejará algo o alguien que acceda a esto y yo, 'como soy muy obediente', pues me he puesto manos a la obra.
Después de buscar un poco, y haciendo uso de los Microsoft SQL Server books online, gran fuente de documentación, he visto que:
Para cambiar el estado de una BDD a offline:
alter database database_name set offline;

Para consultar el estado de las bases de datos:
select name, state_desc from sys.databases;

Podéis encontrar una descripción detallada de alter database en los books online.
I have no f****ing idea about Microsoft SQL Server, and today I have to deal with it. There's a Microsoft SQL Server administred by third people but I've been ordered to chage the state of some DB to offline.
Few minutes after look for the way to do that and using the great, great Microsoft SQL Server books online, I have read that:
To change the DB state to offline:
alter database database_name set offline;

To query the DB state:
select name, state_desc from sys.databases;

You can find more detailled info about alter database in the books online.

PS. I know, I know. My English is not good enought but, the more you help me, the more I learn.

No hay comentarios: