OfficeClip database can be manually installed or removed from the
command line. When OfficeClip is installed, it also installs an
executable called OCmd.exe.
When OfficeClip is installed,
this folder is located at the installation folder (by default,
OfficeClip is installed at c:\program
files\officeclip\7).
If the arguments have blank spaces please put them in double quotes
"".
If -s is not specified then the connection string is read from the
web.config file (value of the key DBString). If -l is not specified, log
files will be created in the log folder one level below.
If -lrem is not specified, all log files older than 2 days will be
removed.
Commands:
(with -c option)
1: Populate/Upgrade the database.
2: Refresh Stored Procedure.
3: Clean the Database, all tables, constraints, indices and
stored procedures will be removed.
4: Run a sql file, -sfile option should be specified and the
database must be present.
5: Recreate the constraints and indexes.
Error Codes:
-1: Invalid number of arguments.
-2: Invalid command or command not supported.
-9: An unhandled exception occurred.
The sql folder is also available at the
OfficeClip installation folder (by default, OfficeClip is installed
at c:\program
files\officeclip\7\sql).
Following are some of the example usage:
To cleanup the database (i.e. remove all tables, indexes, stored
procedure etc.) "c:\program
files\officeclip\7\OCmd.exe" -c 3
To populate a new database (note that an empty database should
exist before executing this script) "c:\program
files\officeclip\7\OCmd.exe" -c 1
To execute a sql file (for
example to load the database with some default users. Note: the
database should be populated to run this correctly)
Note that in the above examples, the path is taken as the default
OfficeClip installation path. Adjustments should be made in case
the installation folder is
changed.