Compartir a través de


SetOffline Método

Sets the database offline.

Espacio de nombres:  Microsoft.SqlServer.Management.Smo
Ensamblado:  Microsoft.SqlServer.Smo (en Microsoft.SqlServer.Smo.dll)

Sintaxis

'Declaración
Public Sub SetOffline
'Uso
Dim instance As Database

instance.SetOffline()
public void SetOffline()
public:
void SetOffline()
member SetOffline : unit -> unit 
public function SetOffline()

Notas

When the database is online, you can use this method to take it offline.

Ejemplos

  'Connect to the local, default instance of SQL Server.
Dim srv As Server
srv = New Server

'Reference the AdventureWorks database.
Dim db As Database
db = srv.Databases("AdventureWorks")

'Take the database offline
db.SetOffline()

'Bring the database back online.
db.SetOnline()