Manually installing the database


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).

The usage of the command as given below:

ocmd -c command [-s connection-string] [-sfile sql-file-path] [-l log-folder-path] [-lrem log-remove-days]

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)

"c:\program files\officeclip\7\OCmd.exe" -c 4 -sfile "c:\program files\officeclip\7\sql\Admin\install.sql"

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.


 Send us your feedback  Copyright© OfficeClip LLC 2000-2006, All Rights Reserved 

 OfficeClip provides a suite of web-based enterprise software such as Web Contact Manager, Issue and Bug Tracker, Time and Expense Reporting, Free Group Calendar, Free Document Sharing and other applications.