Поделиться через


Instance.Export Method

Creates an XML instance configuration file (ICF) and one or more XML application definition files (ADFs) (one per application) by exporting the metadata from the databases.

Пространство имен: Microsoft.SqlServer.Management.Nmo
Сборка: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)

Синтаксис

'Декларация
Public Sub Export ( _
    baseDirectory As String, _
    overwriteExistingFiles As Boolean _
)
public void Export (
    string baseDirectory,
    bool overwriteExistingFiles
)
public:
void Export (
    String^ baseDirectory, 
    bool overwriteExistingFiles
)
public void Export (
    String baseDirectory, 
    boolean overwriteExistingFiles
)
public function Export (
    baseDirectory : String, 
    overwriteExistingFiles : boolean
)

Параметры

  • baseDirectory
    A String that specifies the full path of the directory in which to write the files.
  • overwriteExistingFiles
    true to overwrite files of the same name in the specified directory; otherwise, false.

Замечания

The resulting files are valid definitions of the instance and applications at the time that you run the export command. You can use this information to back up your instance and application definitions or to generate files that you can use to create or update the instance.

You can export metadata while the Notification Services instance is running. There is no need to disable or stop the instance.

The resulting configuration file is named instance_name.config.xml. Each resulting ADF is named instance_name.application_name.adf.xml.

The Export method exports the files using UTF-8 encoding. To export the configuration and application definition files using other encodings, use the Export command in Microsoft SQL Server Management Studio.

Пример

The following examples show how to use this method to export an ICF for an instance of Notification Services:

nsinst.Export(@"C:\NS\Full", true);
myInstance.Export("C:\NS\Full", True)

Синхронизация потоков

Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Платформы

Платформы разработки

Список поддерживаемых платформ см. в разделе Hardware and Software Requirements for Installing SQL Server 2005.

Целевые платформы

Список поддерживаемых платформ см. в разделе Hardware and Software Requirements for Installing SQL Server 2005.

См. также

Справочник

Instance Class
Instance Members
Microsoft.SqlServer.Management.Nmo Namespace

Другие ресурсы

Экспорт экземпляра служб Notification Services и метаданных приложения