Overview of command line interface for Model Explorer functions (Model Explorer)
You can perform the following Model Explorer functions through the ScfUtils command line interface:
• Bookmarking databases.
• Starting and stopping databases.
• Listing all available databases.
• Backing up and restoring databases.
• Optimizing databases.
• Creating and deleting databases.
• Listing database users.
• Clearing locks.
• Adding server logins.
• Adding database principals.
• Synchronizing Active Directory group changes.
• Transferring access permissions.
• Exporting and importing Models.
• Creating and deleting Models.
• Cloning and versioning Models.
• Protecting and unprotecting Models.
• Branching, rebasing and reconciling Models.
• Getting and setting the model comment.
If a ScfUtils command succeeds, 0 is returned; If a ScfUtils command fails, 1 is returned.
If you run ScfUtils with a -h parameter, a summary of the ScfUtils commands is listed.
Important In each case, the <server>, <database> and <model> names are case sensitive.
If you have installed Modeler to the default locations, ScfUtils resides in the following location:
C:\Program Files (x86)\PTC Integrity Modeler\Modeler\Exe\SCFUtils.exe
In addition, you can difference Models and Packages through the ModelDifferencer.exe command, create replicas through the createreplica command, and find and optionally delete orphaned items through the findorphans command.
To bookmark a database:
ScfUtils -map Enterprise \\SQL\<server>@<instance>\<database>"
To start or stop a database:
ScfUtils -startdb Enterprise \\SQL\<server>@<instance>\<database>"
ScfUtils -stopdb Enterprise \\SQL\<server>@<instance>\<database>"
To list all available databases
ScfUtils -listdb Enterprise \\SQL\<server>@<instance>\<database>\<instance-name>"
To branch a model:
ScfUtils -sandboxmodel Enterprise \\SQL\<server>@<instance>\<database>\<model>\<version>"
To clone a model:
ScfUtils -clonemodel Enterprise \\SQL\<server>@<instance>\<database>\<model>\<version>" "<new model name>" <retain permissions 1 or 0> [\\SQL\<server>@<instance>\<database>"]
To create a model:
ScfUtils -addmodel Enterprise \\SQL\<server>@<instance>\<database>" "<new model name>"
To Create a replica:
createreplica Enterprise \\SQL\<server>@<instance>\<database>\<model>\<version>" -d -f "<folder containing exported files>"
To delete a model:
ScfUtils -deletemodel Enterprise \\SQL\<server>@<instance>\<database>\<model>\<version>"
To difference a model or package:
Syntax is dependent on which difference operation is being performed.
To export a model:
ScfUtils -exportmodel Enterprise \\SQL\<server>@<instance>\<database>\<model>\<version>" "<directory>"
To find and optionally delete orphaned items
ScfUtils -findorphans Enterprise \\SQL\<server>@<instance>\<database>" [-D]
To generate a model branch report:
ScfUtils -getmodelbranchreport Enterprise \\SQL\<server>@<instance>\<database>" "<file path and name>"
To generate a model family report:
ScfUtils -getmodelfamilyreport Enterprise \\SQL\<server>@<instance>\<database>" "<file path and name>"
To get a model's comment:
ScfUtils -getmodelcomment Enterprise \\SQL\<server>@<instance>\<database>\<model>\<version>" "<path and file name>"
To import a model (Unzipped):
ScfUtils -importmodel Enterprise \\SQL\<server>@<instance>\<database>" "<directory>"
To import a model (Zipped):
ScfUtils -importzippedmodel Enterprise \\SQL\<server>@<instance>\<database>" "<zip file>"
To protect a model:
ScfUtils -protectmodel Enterprise \\SQL\<server>@<instance>\<database>\<model>\<version>"
To rebase a model:
ScfUtils -rebasemodel Enterprise \\SQL\<server>@<instance>\<database>\<model>\<version>" "<path and name of log file>"
To reconcile a branch to the trunk
ScfUtils -reconcilemodel Enterprise \\SQL\<server>@<instance>\<database>\<model>\<version>" "<path and name of log file>"
To reconcile a branch to another branch:
ScfUtils - mergesandboxes Enterprise "\\SQL\<source server>\<source database>\<source model>\<source version>" "\\SQL\<target server>\<target database>\<target model>\<target version>" "<log file>" [-X]
To remove a bookmark from a database:
ScfUtils -unmap Enterprise \\SQL\<server>@<instance>\<database>"
To rename a model:
ScfUtils -renamemodel Enterprise \\SQL\<server>@<instance>\<database>\<model>\<version>" "<new model name>"
To set a model's comment:
ScfUtils -setmodelcomment Enterprise \\SQL\<server>@<instance>\<database>\<model>\<version>" "<text>"
To unprotect a model:
ScfUtils -unprotectmodel Enterprise \\SQL\<server>@<instance>\<database>\<model>\<version>"
To update all PTC profiles in a model:
ScfUtils -updateallprofiles Enterprise \\SQL\<server>@<instance>\<database>\<model>\<version>" [-B] [-A]
To upgrade a model:
ScfUtils -upgrade Enterprise \\SQL\<server>@<instance>\<database>"
To version a model:
ScfUtils -versionmodel Enterprise \\SQL\<server>@<instance>\<database>\<model>\<version>"