Guide
Migrating Layers to New Databases
Contact DeLorme Professional Sales for support: 1-800-293-2389 Page 91
Sample Script 2:
DECLARE @LayerID int
DECLARE @LayerName varchar(100)
DECLARE @BatchLine varchar(4000)
DECLARE @ExportServer varchar(100)
DECLARE @ExportDirectory varchar(300)
DECLARE @ExportProgramPath varchar(300)
DECLARE @ImportProgramPath varchar(300)
DECLARE @ExportExtension varchar(100)
DECLARE @ImportServer varchar(50)
DECLARE @ImportDatabase varchar(100)
DECLARE @ExportFileName varchar(2000)
DECLARE @OpenspaceType varchar(100)
--This will automatically populate the export server parameter with the current server.
SET @ExportServer = CONVERT(varchar(50),SERVERPROPERTY('MachineName'))
IF SERVERPROPERTY('InstanceName') IS NOT NULL
BEGIN
SET @ExportServer = @ExportServer + '\' +
CONVERT(varchar(50),SERVERPROPERTY('InstanceName'))
END
--Adjust these two parameters to point at your copies of XMapExport.exe and XMapImporte.exe
SET @ExportProgramPath = 'w:\work\dev_XMap7_Int_shackleton\bin\xmapexport.exe'
SET @ImportProgramPath = 'w:\work\dev_XMap7_Int_shackleton\bin\xmapimport.exe'
--Change these two parameters to point at the database you want to import the layers into.
SET @ImportServer = '(local)\sql2008'
SET @ImportDatabase = 'adriantest'
--Point this at a directory which will hold the output files
SET @ExportDirectory = 'w:\work\data\exporttest\'
--Change this to be the file extension for the type of file you want to use for the transfer.
SET @ExportExtension = '.openspace'










