Detach Database (Production Mapping)

Lizenzstufe:BasicStandardAdvanced

Zusammenfassung

Trennt eine SQL Server Express-Geodatabase (.mdf).

Entfernt alle Verweise auf die Geodatabase aus dem Datenbankserver. Die Datendatei (.mdf) wird jedoch nicht gelöscht. Nachdem Sie die Datendatei getrennt haben, können Sie diese an eine andere SQL Server Express-Instanz anhängen.

Verwendung

Syntax

DetachDatabase_production (workspace)
ParameterErläuterungDatentyp
workspace

Die Geodatabase, die von einer Instanz von SQL Server Express getrennt werden soll.

Workspace

Codebeispiel

DetachDatabase – Beispiel (eigenständiges Skript)

Das folgende eigenständige Skript veranschaulicht, wie Sie das Werkzeug "DetachDatabase" verwenden.

# Name: DetachDatabase_Example.py
# Description: Detaches a geodatabase (.mdf file) from an instance of SQL Server Express
# Requirements: Production Mapping extension

# import arcpy and checkout a Production Mapping license
import arcpy
arcpy.CheckOutExtension("foundation")

# local variable for the workspace parameter
gds_workspace = "Database Servers\\YOURSERVER_SQLEXPRESS.gds\\ProductLibrary (VERSION:DBO.DEFAULT)"

# detach the geodatabase from the SQL Server Express instance
arcpy.DetachDatabase_production(gds_workspace)

print "Script completed successfully."

# Check in the extension
arcpy.CheckInExtension("foundation")

Umgebung

Verwandte Themen

Lizenzierungsinformationen

ArcGIS for Desktop Basic: Nein
ArcGIS for Desktop Standard: Erfordert Production Mapping
ArcGIS for Desktop Advanced: Erfordert Production Mapping
4/26/2014