DSMI: Command line tools Part 2 – dsmoImpExp

This command line tools lets you import & export items like sets and documents but also even whole catalogues of on DSMI into another. It creates a zip archive which contains all resources and an xml file describing the contents of the archive. This zip archive can later be reimported easily.

dsmoImpExp [/e:<ItemID>] [/i:<ZipArchive>] [/?]

Description in detail:
Exports an item, group or whole catalog (if ItemID=0) and returns the path to the created zip archive.

Imports a zip archive into the account catalog of your DSMI. This can be an item, a group or a whole catalog.

The DSMO username to authenticate the user and his catalog.

The DSMO password to authenticate the user and his catalog.

Configuration file
Customize the endpoint address to allow this tool to connect to your DSMI.

DSMOImpExp.exe /e:0 /u:su /p:su
Exports the whole catalog of the su account



DSMI: Command line tools Part 1 – dsmobck

My plan is to describe some of the DSMI command line tools in a row here. The tool I want to start with is called dsmobck. It is a maintenance tool for the DSMI databases. It can do several things. First it can do backups, but it can also update an existing version of a database and even migrate older versions to the latest version.

The program is called automatically in any installation of DSMI. It has different command line switches which will be described here.

The backup function is actually just a wrapper around the built-in SQL Server backup function. You can do backups of any SQL Server database using this tool if you like.

dsmobck [/p:<destination>] [/c:<connectionstring>] [/c2:<connectionstring>] [/s] [/t:15] [/e] [/sn] [/us] [/uc] [/m] [/o] [/i] [/q] [/?]

Description in detail:
/p:[Path] –> Destination
If you do not provide a filename, the filename will be created using the current date and time.The destination can include a local or a UNC path.If you are running this application from a different machine than the SQL Server, please have in mind, that the backup will be stored by the SQLSERVER and the path must be accessible by the SQLSERVER. You have to quote the path, if it includes spaces.

/c:[.\SQLEXPRESS] or an optional /c2:[.\SQLEXPRESS] –> ConnectionString
String used to connect to the SQL Server. Because access to the master database is needed for several tasks, please provide credentials that meet the correct privileges.

/s –> Shrink database
If switched on, which is the default, the database and the log will be shrunken, when the backup was successful.

/t:[15] –>Timeout
Sets the ADO Command timeout. The default is 15 seconds, 0 sets the timeout to infinity (which is not recommended).

/e -> Emtpy Session and Log Table (DSMO Only)
Clears the Session and ApplicationLog table of DSMO.

/sn -> Service name of the SQL Instance
Calls the MSSQL @@SERVICENAME function, to get the Windows service name for the instance you specified in the connection string.

/us or /uc -> Updates the dsmodb master or slave database
Updates the database structure of dsmodb. Running the update with the verbose flag does a check only.

/m –> Migration
Use the /m switch to migrate a DSMO version 2 database to version 3. The old database will be untouched. Please use this switch always in combination with the /c and /c2 switches. The new database must be created upfront, therefore run this tool with the /us switch to create the new server database.

/o: -> Export SQL
Writes the SQL script to file you specify.

/x: -> Export Structure
Writes the structure XML to file you specify.

/i: -> Import Structure
Reads the structure XML from a file you specify.

/? –> Detailed help

Some examples
How to do a database backup (writes a backup to c:\dsmtemp)
dsmobck.exe /p:c:\dsmtemp /c:”Server=DSMO-SRV\SQLEXPRESS;Initial Catalog=dsmodb;Persist Security Info=True; Integrated Security=SSPI”

How to update the DSMO database
dsmobck.exe /us /c:”Server= DSMO-SRV\SQLEXPRESS;Initial Catalog=NewDSMO;Persist Security Info=True; Integrated Security=SSPI

How to migrate the DSMO db from version 2 to 3
dsmobck.exe /m /c:”Server= DSMO-SRV\SQLEXPRESS;Initial Catalog=DSMO;Integrated Security=SSPI” /c2:”Server= DSMO-SRV\SQLEXPRESS;Initial Catalog=NewDSMO;Integrated Security=SSPI”

This migrates all objects from the database called DSMO to the new database called NewDSMO.



My last blog post is a while ago. In the meantime Claudia and I became parents of a beautiful little boy called Paul.


As the picture shows, he’s already a fan of DirectSmile and vice versa 😀
Thanks to Silja who personalized Paul’s body perfectly 🙂

After a few weeks at home, getting familiar, I’m now back in the office. I intend to write more posts in the next weeks, because there are so many new features in DSMI which are just sparely documented.