Facilities Guide

CHAPTER 4

SilverCmd Reference

This chapter describes the SilverCmd commands that work with the Novell exteNd Application Server. It describes how to run SilverCmd and includes the associated security and authentication issues and the purpose, syntax, and arguments for each command. It includes these sections:

 
Top of page

Command locator

Click a command to display complete information:

Command

Description

AddCP

Adds a connection pool to the application server

AddDatabase

Deprecated. Registers a database with the specified application server

ClearDefaultURL

Clears a database or server default URL

ClearLog

Clears records from the HTTP log, the error log, or the trace log

DeleteURL

Deletes the directory at the specified URL.

DeployCAR

Deploys a J2EE-compatible client application archive (CAR) to an application server

DeployEAR

Deploys a J2EE-compatible enterprise application archive (EAR) to an application server

DeployEJB

Deploys a J2EE-compatible enterprise JavaBean archive (EJB) to an application server

DeployRAR

Deploys a J2EE-compatible resource adapter archive (RAR) to an application server

DeployWAR

Deploys a J2EE-compatible Web archive (WAR) to an application server

GetConsole

Redirects server console output to the local terminal

GetDefaultURL

Displays the default URL for a database or server

LdapProvider

Adds, deletes, or lists LDAP providers configured on a server

ListCP

Lists the active connection pools on a server

ModifyCP

Modifies a subset of the configuration properties for a connection pool

Prefs

Updates various compiler settings for the preferences file

PrintLog

Displays records from the HTTP log, error log, or trace log

QueryCP

Displays configuration properties for a connection pool

RemoveCP

Removes a connection pool from a server

RemoveDatabase

Deprecated. Removes a deployment database from a server's list of accessible databases

ServerState

Tests whether a server is running or shuts down the server

SetDefaultURL

Sets the default URL for a database or server

SetSecurity

Sets Read, Write, Protect, Select, and Execute security on application objects

SetUserGroupInfo

Creates, deletes, and sets properties for Silver Security users and groups

Undeploy

Undeploys any of the following J2EE archive types: EAR, EJB, CAR, RAR, or WAR

ValidateEAR

Validates the deployment descriptor within an EAR

ValidateEJB

Validates an EJB archive for correctness

 
Top of page

About SilverCmd

SilverCmd provides a way to perform operations from the command line. You can use SilverCmd to automate many of the tasks associated with managing the application server.

Separate ports   SilverCmd communicates with the application server using the HTTP(S) protocol. The application server lets you define separate runtime and administration ports for different types of users and operations. Some commands require you to specify the administration port. Specifying an inappropriate port will result in a security error code. When necessary, the reference section for each command lists the type of port you must specify.

For more information    For more information about using separate ports, see the chapter on running the server in the Administrator's Guide.

 
Top of section

Running SilverCmd

SilverCmd resides in the server's \bin directory. If you will be using SilverCmd frequently, consider adding the server's \bin directory to your system path for convenience.

Authentication

If your server is running in a restricted environment, you will need to authenticate yourself using the -U and -P options to run commands that access the server.

Running SilverCmd from the command prompt

To run SilverCmd from the command prompt, use this syntax:

  SilverCmd command arguments

To display the list of commands enter:

  SilverCmd -?

OR

  SilverCmd -h

To display the usage for a specific command enter:

  SilverCmd command -?

Normally when SilverCmd encounters an error, it stops execution, generates detailed error messages explaining the failure, and displays the messages in the command prompt window. If you specify -i, SilverCmd ignores the errors and continues execution. Here's how you use the -i option:

  SilverCmd command -i

Security

If you want a higher level of security, you can use HTTPS (instead of HTTP) as the communication protocol between SilverCmd and the application server.

To specify HTTPS, you must include the protocol and port number when specifying the server and port arguments. For example, to deploy an EJB using HTTPS, you would specify both HTTPS and the port 443, as shown here:

  SilverCMD deployEJB HTTPS://localhost:443 myDB myEJB.jar -f EJB_depl_plan.xml

You cannot specify just the port, as shown here:

  SilverCMD deployEJB localhost:443 myDB myEJB.jar -f EJB_depl_plan.xml

And you cannot specify HTTP with the HTTPS port, as shown here:

  SilverCMD deployEJB HTTP://localhost:443 DB EJB.jar -f EJB_depl_plan.xml

If you do not specify HTTPS and the port number, SilverCmd assumes that you are deploying to an HTTP port and the command will be blocked until a socket time out occurs.

Running SilverCmd in execute mode

You can run one or more SilverCmds from a file. This is called execute mode. To run in execute mode, use this syntax:

  SilverCmd Execute command-file

Logging messages to a file

By default, SilverCmd logs informational messages, warnings, and errors to the command window. You can write the messages to a file using the standard redirect symbol (>), like this:

  SilverCmd Execute command-file -i > SilverCmd.log

Permission to write temporary files when deploying

The SilverCmd deployment commands (such as DeployEAR) generate temporary files on disk. These files are created in the server's installation directory, unless you have defined a HOME environment variable. If you have a HOME variable, the temporary files are created in %HOME%\.appsrv. So if you have a HOME environment variable defined, it must point to a reachable and writable location in order to deploy successfully.

 
Top of section

Specifying values in input files and deployment plans

Some commands require an input file or a deployment plan (specified using the -f option); for other commands, the -f option is optional and provided as a convenience. For example:

Command

Description

AddDatabase

Requires you to supply the database name, database type, user name, password, and JDBC driver in an input file

Prefs

Does not require an input file; you can specify a single preference at the command line, or you can specify a list of preferences within an input file

Undeploy

Does not take an input file and will generate an error message if you attempt to use it

Input file and deployment plan format

Input files and deployment plans must be in XML format and must include a DOCTYPE statement. You do not need to be an XML expert to create input files. You can use exteNd Director's Deployment Plan Editor to create deployment plans. For other commands (unrelated to deployment), there are sample XML files, and you can copy and paste the required DOCTYPE statement from the appropriate sample into your own XML input file:

Sample file

Location

The DTD for each input file or deployment plan

The server's \Resources\DTDCatalog directory

The XML sample for each file

The server's \Samples\SilverCmd directory

The samples and DTDs are self-documenting. See them for the most up-to-date requirements.

Command line versus input file

For commands where values can be specified both at the command line and within an input file or deployment plan, values specified at the command line override input file settings.

 
Top of page

Alphabetical list of commands

 
Top of section

AddCP

Description

Adds a connection pool to the server.

Server permissions

DTD and sample input file

Modify server configuration

None

Syntax

  SilverCmd AddCP server[:port] poolName poolTypeFlag dataSourceOptions [options]

The valid arguments are:

Argument

Description

server[:port]

Specifies the name of the target server and the administration port

poolName

Specifies the logical name for the pool

poolTypeFlag

Specifies the type of pool to create. Values are:

-J—to create a JDBC connection pool

-C—to create a Connector connection pool

options

Specifies any operating criteria for the command

The valid options for all pool types are:

Option

Description

-? or -h

Displays the usage message

-A username and -W password

Specifies user name and password for connection pool resource manager authentication

-m minconn

The minimum number of connections. The pool manager will attempt to maintain this minimum number of transactions (this is a soft limit)

-t timeout

The idle timeout in seconds. The default is 60 seconds. When set to -1, idle timeout is disabled and no idle connections are ever closed

-U username and -P password

Specifies user name and password for server authentication

-w timeout

The connection wait timeout in seconds. The default is 30 seconds. When set to -1, clients are forced to wait until a connection becomes available

-v log level

Specifies the logging level. The logging levels are:

  • 0 - logging disabled

  • 1 - basic ConnectionFactory operations and settings

  • 2 - level 1 plus detailed output from connection pool manager

  • 3 - level 2 plus exception stack traces and logging information from underlying JDBC driver or Connector resource adapter

-N

When used, the connections returned by the pool are not enlisted in XA transactions

-x max conn

The maximum number of connections allowed by the pool. The default is 10. Use -1 to create a pool with no maximum

-z

When used, the connections can more efficiently handle connections in shared transactions.

This option can only be used for connection pools for drivers or RARs that support the XA standard. The driver or adapter must be able to handle active delistment of resources from and reenlistment in a transaction.

Usage

Adding JDBC1.0 connection pools   To create a data source for a JDBC1.0 connection pool, you can specify either the JDBC driver class name or the LDS Key.

To specify the JDBC driver class name, use these options:

Option

Description

-d driver

Specifies the fully qualified name of your JDBC driver class

-j url

Specifies the JDBC URL string defined by the driver vendor to connect to your database

-a attributes

(Optional) Specifies any additional URL attributes defined by the vendor that you can use to customize the driver connection. For example:

  cache=100

To specify the LDS Key, use these options:

Option

Description

-l lds key

Specifies the LDS key

-j url

Specifies the JDBC URL string defined by the driver vendor to connect to your database

-a attributes

(Optional) Specifies any additional URL attributes defined by the vendor that you can use to customize the driver connection. For example:

  cache=100

Adding JDBC2.0 connection pools   To create a data source for a JDBC2.0 connection pool, you can specify the JDBC LDS Key, the CPDS class name, or the XADS class name.

To specify the LDS key, use these options:

Option

Description

-l lds key

Specifies the LDS key

-p properties

Specifies the data source configuration properties

The format for these properties is:

  name=value

For example: name1=value1, name2=value2, name3=value3, . . .

For names and property values, see your driver documentation

To specify the CPDS class name, use this option:

Option

Description

-k class name

Specifies the fully qualified Connection Pool DataSource class name

-p properties

Specifies the data source configuration properties

The format for these properties is:

  name=value

For example: name1=value1, name2=value2, name3=value3, . . .

For names and property values, see your driver documentation

To specify the XADS class name, use this option:

Option

Description

-g class name

Specifies the fully qualified name of the XA DataSource class

-p properties

Specifies the data source configuration properties

The format for these properties is:

  name=value

For example: name1=value1, name2=value2, name3=value3, . . .

For names and property values, see your driver documentation

Adding connector connection pools   To create a data source for a connector connection pool, use these options:

Option

Description

-r adapter

Specifies the resource adapter name

-p properties

Specifies the properties for the ManagedConnectionFactory using the format:

  name=value

For example: name1=value1, name2=value2, name3=value3, . . .

For more information    See your Resource Adapter documentation for these values

 
Top of section

AddDatabase

Description

Deprecated. Registers a SQL database with the specified server.

Server permissions

DTD and sample input file

Modify server configuration

DTD: add_database.dtd

Sample: add_database_sample.xml

Syntax

  SilverCmd AddDatabase server[:port] -f file [options]

The valid arguments are:

Argument

Description

server[:port]

Specifies the name of the target server and the administration port

-f file

Specifies the input file containing the database and connection information

If -s is also specified, the XML file must contain a System Tables node describing the connection information for the database containing the system tables

options

Specifies any operating criteria for the command

The valid options are:

Option

Definition

-s

Indicates that you want to store the system tables in a different database from the one you are adding

If you want to store the system tables in a different database, the input file must include a System Tables node that specifies the database name and connection information for the different database

-U username and -P password

Specifies user name and password for server authentication

?

Displays the usage message

Usage

AddDatabase input file   The AddDatabase command requires an input file. The input file includes the following entries:

Entry

Description

Database name

Specifies the fully qualified database name

Username and Password

Specifies the user account used by the server when accessing this database

The account must have read/write permissions for the database

Platform

Specifies the database vendor name—for example: Oracle, DB2, or Sybase System 11

For more information    For more information, see Valid database connection types

Driver set

Specifies the driver type for the database

Each database type has a default connection type that the server assumes if you do not specify a value

If you are using a value that is not in the list of database type/connection type values, you must specify Other JDBC Driver plus:

  • The fully qualified package name for the JDBC driver

  • The JDBC URL that tells the driver where to connect to the specified database

  • The URL attributes (which include properties like cache size)

This syntax is driver-dependent

The following nodes are optional:

Entry

Description

Table list

Specifies a subset of the tables that should be made available to the server

The table list can include:

  • A list of table names (which must exactly match the names in the database)

  • A list of table name patterns

    NOTE:   When you specify a pattern, you can use the % symbol to match any number of characters and the underscore (_) character to specify that you want to match any one character

  • A combination of names and patterns

System tables

Stores system tables in a different database from the one you are adding

This section must include the following information about the database where you want to store the system tables: database, user name, password, database platform, and driver set or the LDS key

This entry is required when you specify the -s argument at the command line; otherwise, it is ignored

Valid database connection types   To connect to a database, the server needs either of the following:

The server has defined strings that resolve to these values. See add_database_sample.xml in the server's \Samples\SilverCmd directory for the complete listing of supported values.

 
Top of section

ClearDefaultURL

Description

Clears the default URL for a server or a database.

Server permissions

DTD and sample input file

Modify server settings

None

Syntax

  SilverCmd ClearDefaultURL server[:port] [database] [options]

The valid arguments are:

Argument

Description

server[:port]

Specifies the name of the target server and the administration port

database

Specifies the database whose default URL you want to clear. If the database is not specified, ClearDefaultURL clears the server's default URL

options

Specifies operating criteria for the command

The valid options are:

Option

Definition

-? or -h

Displays the usage message

-U username and -P password

Specifies user name and password for server authentication

 
Top of section

ClearLog

Description

Removes records from the HTTP log, the error log, or the trace log. ClearLog can only delete records when server logging output is specified as database (not file- or user-defined).

For more information    For more information on specifying logging output using the SMC, see the chapter on running the server in the Administrator's Guide.

Server permissions

DTD and sample input file

Modify server configuration

None

Syntax

  SilverCmd ClearLog server:[port] logTypeFlags [options]

The valid arguments are:

Argument

Description

server[:port]

Specifies the name of the target server and the administration port

logTypeFlags

Values are:

-E—Removes records from the error log

-H—Removes records from the HTTP log

-T—Removes records from the trace log

You can specify any combination in a space or comma separated list

options

Specifies operating criteria for the command

The valid options are:

Option

Definition

-? or -h

Displays the usage message

-U username and -P password

Specifies user name and password for server authentication

 
Top of section

DeleteURL

Description

Deletes the directory at the specified URL.

Use this command when a deployment fails with error messages indicating that the server is not able to create the context URL resources because the resource already exists.

This might happen when:

The deployment will fail unless you remove the myPortal directory.

To allow the deployment using the myProject/myPortal context path, use DeleteURL to delete the myPortal directory resource. The command would look like this:

  SilverCmd DeleteURL http://localhost/SilverMaster50/myProject/myPortal

When DeleteURL completes you'll be able to deploy using the myProject/myPortal context.

Syntax

  SilverCmd DeleteURL url [options]

The valid arguments are:

Argument

Description

url

The full URL to the resource to delete including the protocol, the server name and port, for example:

  http://localhost:80/SilverMaster50/myProject/MyPortal

This command deletes the MyPortal resource.

options

Specifies any operating criteria for the command

The valid options are:

Option

Description

-? or -h

Displays the usage message

-U username and -P password

Specifies user name and password for authentication by the server

 
Top of section

DeployCAR

Description

Deploys a J2EE-compatible application client archive file to the specified application server.

Once the deployed object is on the server, any application client can access it using SilverJ2EEClient. All application components are automatically available for client requests; you do not need to restart the server.

The archive file must comply with the J2EE specification and must contain a manifest file that includes a Main-Class entry.

The deployed object is given the same name as the archive unless you specify the -d option.

Server permissions

DTD and sample input file

Write to the Deployed Objects directory of the deployment database

DTD: deploy_car.dtd

Syntax

  SilverCmd DeployCAR server[:port] database jarfile 
      [-f deployment_plan] [options]

The valid arguments are:

Argument

Description

server[:port]

Specifies the name of the target server and the administration port

database

Specifies the name of the target database

jarfile

Specifies the name (and path) of the client application archive to deploy

options

Specifies any operating criteria for the command

The valid options are:

Option

Description

-? or -h

Displays the usage message

-d

Specifies an alternate name for the deployed object

Use this option when you want to use the same client archive for multiple deployments

-f deployment plan

Specifies the name (and path) of the deployment plan

If this option is not specified, DeployCAR looks in the CAR's META-INF/appserver.xml file by default

-o

Overwrites an existing deployed object of the same name

-U username and -P password

Specifies user name and password for authentication by the server

-v verbose-level

Specifies the level of messages to output. Values range from 0 for no messages (default) to 5 for the most messages

 
Top of section

DeployEAR

Description

Deploys an enterprise archive file (EAR) to the specified server. You can use this command to deploy EARs of any supported J2EE version.

DeployEAR performs these tasks:

  1. Opens the EAR file and extracts all files to a local temporary directory.

  2. Validates any EJBs.

  3. Passes the -o flag (if specified) to each of the DeployXXX commands:

Syntax

  SilverCmd DeployEAR server[:port] database [EARFile] 
     [-f deploymentPlan] [options]

The valid arguments are:

Argument

Description

server[:port]

Specifies the name of the target server and the administration port

database

Specifies the name of the target database

EARFile

Specifies the name and location (on disk) of the EAR file to deploy

This value can also be specified in the deployment plan (specified with -f). When specified in both places, the command-line value is used

-f deploymentPlan

Specifies the name and location (on disk) of the XML-based deployment plan

If this option is not specified, DeployEAR will look for the EAR's META-INF/appserver.xml by default

For more information    For more information on the structure of this file, see Deployment Plan DTDs

options

Specifies any operating criteria for the command

The valid options are:

Option

Description

-? or -h

Displays the usage message

-d

Specifies development mode deployment.

CAUTION:    Do not use for production deployment.

When specified, DeployEAR determines if any modules in the EAR have changed (or been added) since the last deployment, and redeploys only the changed (or added) modules.

When the changed module is an EJB interface, DeployEAR:

  • Deploys the interface

  • Regenerates the stub classes

  • Repackages the other modules in the EAR with the new stub classes and uploads them to the server (instead of redeploying them).

NOTE:   Does not detect changes in the deployment plan or deployment descriptor. If you change either of these, use -m instead.

-i

Ignores errors when compiling JSP pages and deploys whatever builds successfully

-m modulename [,moduleName]

Specifies the name(s) of the module to deploy. You can specify a single module name or a comma-separated list of modules. The name corresponds to the <module> element of the EAR's deployment descriptor.

This option is useful when you make changes to one or more modules of the EAR and want to deploy just those changed modules. When updating already deployed modules, use the -m option in conjunction with -o to ensure that the updated module overwrites the already deployed module.

-n

Specifies that EJB validation should be skipped during deployment. If not present, SilverCmd ValidateEJB is executed before the EAR is deployed

-o

If a deployed object (or remoteJar object for 1.2 deployments only) already exists on the server, this flag forces that object to be overwritten

-t

Used for debugging JSP pages using non–Latin-1 character sets: if specified, the JSP compiler outputs into the compile cache an additional Java file with the extension -local (for example, along with date_jsp_xxxxxxxxxxx.java you will also find date_jsp_xxxxxxxxxxx-local.java). The version of the file with -local is in the machine's local character set (instead of UTF-8)

By default, these files reside in compilecache/server/database/temp/sources//archive/com/sssw/gen/jsps

-U username and -P password

Specifies user name and password for authentication by the server

-v verbose-level

The level of messages to write to the SilverCmd console window. Values range from 0 for no messages (default) to 5 for the most messages

 
Top of section

DeployEJB

Description

Deploys an EJB JAR on the specified server.

DeployEJB performs these tasks:

Syntax

  SilverCmd DeployEJB server[:port] database [EJBFile] [-f deploymentPlan] [options]

The valid arguments are:

Argument

Description

server[:port]

Specifies the name of the target application server and the administration port

database

Specifies the name of the target database

EJBFile

Specifies the name of the EJB archive to deploy

If not specified at the command line, the EJB archive must be specified in the deployment plan

-f deploymentPlan

Specifies the name and path of the deployment plan

If this option is not specified, DeployEJB will look in the JAR's META-INF/appserver.xml by default

For more information    For more information on the structure of this file, see Deployment Plan DTDs

options

Specifies operating criteria for the command

The valid options are:

Option

Description

-? or -h

Displays the usage message

-U username and -P password

Specifies user name and password for application server authentication

-o

Specifies that when the ejbDeployedObject or ejbRemoteJar values are used in the deploymentPlan and the object exists on the application server, the objects will be overwritten

-n

Specifies that validation should be skipped. If not present, SilverCmd ValidateEJB is executed before DeployEJB

-t

Specifies that DeployEJB should write temporary Java files in the local character set for debugging

-v verboseLevel

The level of messages to write to the SilverCmd console window; values range from 0 for no messages (default) to 5 for the most messages

 
Top of section

DeployRAR

Description

Uploads a resource adapter archive (RAR) to the specified application server and creates the associated connection pool(s).

Server permissions

DTD and sample input file

Write to the Deployed Objects directory of the deployment database

deploy-rar_1_0.dtd

deploy_rar_sample.xml

Syntax

  SilverCmd DeployRAR server[:port] database RARFile [-f deployment plan] [options]

The valid arguments are:

Argument

Description

server[:port]

Specifies the name of the target application server and the administration port

database

Specifies the name of the target database

RARFile

Specifies the name of the RAR to deploy

-f deploymentPlan

Specifies the name of the deployment plan

If this option is not specified, DeployRAR looks in the RAR's META-INF/appserver.xml by default

You can create the RAR deployment plan using exteNd Director's Deployment Plan Editor

options

Specifies operating criteria for the command

The valid options are:

Option

Definition

-? or -h

Displays the usage message

-U username and -P password

Specifies user name and password for authentication by the application server

-o

When specified, overwrites a RAR of the same name deployed in the same database

-n resource adapter name

Specifies the name that the resource adapter will be deployed as on the server. This can also be specified in the deployment plan

-d extract directory

Specifies the directory (on the deployer's machine) that the contents of the RAR file are extracted to during deployment. This value can also be specified in the deployment plan

If -d is not specified, files are extracted to the compilecache directory

-v verboseLevel

The level of messages to output. Values range from 0 for no messages (default) to 5 for the most messages

 
Top of section

DeployWAR

Description

Deploys a J2EE-compatible Web archive (WAR) to an application server.

DeployWAR performs these tasks:

Syntax

  SilverCmd DeployWAR server[:port] database [WARFile] 
      [-f deploymentPlan] [options]

The valid arguments are:

Argument

Description

server[:port]

Specifies the name of the target server and the administration port

database

Specifies the name of the target database

WARFile

Specifies the name of the WAR file to deploy

This value can be specified either at the command line or in the deployment plan. Values specified at the command line override deploymentPlan settings

-f deploymentPlan

An XML-based file that specifies the server-specific deployment information

If this option is not specified, DeployWAR looks in the WAR's WEB-INF/appserver.xml file by default

options

Specifies any operating criteria for the command

The valid options are:

Option

Description

-? or -h

Displays the usage message

-i

Ignores errors when compiling JSP pages and deploys whatever builds successfully

-o

If a deployedObject or remoteJar object already exists on the server, this flag forces it to be overwritten

-t

Used for debugging JSP pages using non-Latin-1 character sets: if specified, the JSP compiler outputs into the compile cache an additional Java file with the extension -local (for example, along with date_jsp_xxxxxxxxxxx.java you will also find date_jsp_xxxxxxxxxxx-local.java). The version of the file with -local is in the machine's local character set (instead of UTF-8)

By default, you will find these files in the server's compilecache/server/database/temp/sources/archive/com/sssw/gen/jsps

-U username and -P password

User name and password for authentication by the server

-v verboseLevel

The level of messages to output. Values range from 0 for no messages (default) to 5 for the most messages

 
Top of section

GetConsole

Description

Displays the contents of the specified server's console in the SilverCmd console window.

Server permissions

DTD and sample input file

Read server configuration

None

Syntax

  SilverCmd GetConsole server[:port] [options]

The valid arguments are:

Argument

Description

server[:port]

Specifies the name and optionally the administration port number of the target server

options

Specifies operating criteria for the command

The valid options are:

Options

Description

-? or -h

Displays the usage message

-p

Specifies the port to use for the server console socket connection

-U username and -P password

Specifies user name and password for server authentication

 
Top of section

GetDefaultURL

Description

Displays the default URL for the specified database or server.

Server permissions

DTD and sample input file

Read server configuration

None

Syntax

  SilverCmd GetDefaultURL server[:port] database [options]

The valid arguments are:

Argument

Description

server[:port]

Specifies the name (and optionally the adminstration port) of the target server

database

Specifies the name of the database whose default URL you want to get

options

Specifies operating criteria for the command

The valid options are:

Options

Description

-? or -h

Displays the usage message

-U username and -P password

Specifies user name and password for server authentication

 
Top of section

LdapProvider

Description

Adds or deletes LDAP security providers on the specified server. When using the command to add a provider, you must also supply an input file containing all of the configuration information. The input file must comply with the add_ldap_provider.dtd.

Server permissions

DTD and sample input file

Modify server configuration

add_ldap_provider.dtd

add_ldap_provider_sample.xml

Syntax

  SilverCmd LdapProvider server[:port] [options]

The valid arguments are:

Argument

Description

server[:port]

Specifies the name of the server and the administration port where you want to configure an LDAP provider

[options]

Specifies operating criteria for the command

The valid options are:

Option

Definition

-? or -h

Displays the usage message

-U username and -P password

Specifies the user name and password for server authentication

-a file

Adds the LDAP providers listed in the file

-d name

Deletes the named LDAP provider

-l

Lists the LDAP providers currently configured

 
Top of section

ListCP

Description

Lists the connection pools that are active on the specified server.

Server permissions

DTD and sample input file

Read server configuration

None

Syntax

  SilverCmd ListCP server[:port] [options]

The valid arguments are:

Argument

Description

server[:port]

Specifies the name of the server and the administration port for which you want the connection pool listing

[options]

Specifies operating criteria for the command

The valid options are:

Option

Definition

-? or -h

Displays the usage message

-U username and -P password

Specifies the user name and password for server authentication

 
Top of section

ModifyCP

Description

Modifies a subset of connection pool properties. To change properties not listed, you must recreate the connection pool.

Server permissions

DTD and sample input file

Modify server configuration

None

Syntax

  SilverCmd ModifyCP server[:port] poolName [options]

The valid arguments are:

Argument

Description

server[:port]

Specifies the name of the target server and the administration port

poolName

Specifies the name of the connection pool whose properties you want to modify

options

Specifies operating criteria for the command

The valid options are:

Option

Definition

-? or -h

Displays the usage message

-m min conn

The minimum number of connections. The pool manager will attempt to maintain this minimum number of transactions (this is a soft limit)

-x max conn

Specifies the maximum number of connections allowed by the pool. The default is 10. Use -1 to create a pool with no maximum

-t timeout

Specifies the idle timeout in seconds. The default is 60 seconds. When set to -1, idle timeout is disabled and no idle connections are ever closed

-w timeout

The connection wait timeout in seconds. The default is 30 seconds. When set to -1, clients are forced to wait until a connection becomes available

-U username and -P password

Specifies the user name and password for server authentication

-v log level

Specifies the logging level. The logging levels are:

  • 0 - Logging disabled

  • 1 - Basic connection factory operations and settings

  • 2 - Level 1 plus detailed output from connection pool manager

  • 3 - Level 2 plus exception stack traces and logging information from underlying JDBC driver or Connector resource adapter

You must remove and recreate the connection pool to change these values.

 
Top of section

Prefs

Description

Updates the following compiler settings in the preferences file:

The preferences file contains additional information that is not settable from the Prefs command line. Any compiler values not specified via the command line or in an input file are left unchanged in the preferences file.

Server permissions

DTD and sample input file

None

DTD: prefs.dtd

Sample: prefs_sample.xml

Syntax

  SilverCmd Prefs [options]

The valid options are:

Option

Description

-? or -h

Displays the usage message

-a flags

Sets the compiler-specific flags. It must be a quoted string

If compiler flags start with a hyphen (-), eliminate the space between the -a and the flags. For example:

  SilverCmd Prefs -c sj "-a-nodeprecated -noinline"

-c name

Sets the compiler type. The value must be one of the following:

  • Sun Javac In-Proc

  • Sun javac

  • Symantec cafe sj

  • Jikes Compiler jikes

-d dir

Sets the compiler's directory

-g true/false

Turns debugging information on or off

Debug is off (false) by default

-t dir

Sets the compile-cache directory

-r true/false

Runs the rmi2iiop compiler in process (true) or not (false)

-f file

Specifies an input file that contains the new compiler preferences

Values specified at the command line override input file settings

For more information    For an example that shows how to create one of these files, see the prefs_sample.xml file in the \Samples\SilverCmd directory

-l

Lists existing preferences to the console

Do not specify -l with any other options; if you do, the other options will not take effect

-s file

Saves existing preferences to the specified file

Do not specify -s with options specified at the command line. If you do, the other options will not take effect

Setting debug flags   The DebugFlags option is a directive not to the compiler but to the server.An existing preferences file might list the value as 0 or 1, but when you set this flag you should always set it to a boolean value (true or false). You cannot change the debug flags option at the command line; you must set it via the XML file specified, using the -f option.

 
Top of section

PrintLog

Description

Displays records from the HTTP log, error log, or trace log to the SilverCmd console window. Use the standard redirect symbol (>) to write the records to a file. PrintLog can only display records when server logging output is specified as database (not file or user defined).

For more information    For more information on specifying logging output using the SMC, see the chapter on running the server in the Administrator's Guide.

Server permissions

DTD and sample input file

Read server configuration

None

Syntax

  SilverCmd PrintLog server[:port] logTypeFlags [options]

The valid arguments are:

Argument

Description

server[:port]

Specifies the name of the target server and the administration port

logTypeFlags

Values are:

-E—Removes records from the error log

-H—Removes records from the HTTP log

-T—Removes records from the trace log

You can specify any combination in a space or comma-separated list

options

Specifies operating criteria for the command

The valid options are:

Option

Definition

-? or -h

Displays the usage message

-U username and -P password

Specifies user name and password for server authentication

 
Top of section

QueryCP

Description

Displays configuration properties for a connection pool.

Server permissions

DTD and sample input file

Read server configuration

None

Syntax

  SilverCmd QueryCP server[:port] poolName [options]

The valid arguments are:

Argument

Description

server[:port]

Specifies the name of the target server and the administration port

poolName

Specifies the connection pool name

options

Specifies operating criteria for the command

The valid options are:

Option

Definition

-? or -h

Displays the usage message

-a

Displays all properties for a connection pool

When -a is not specified, only the settable properties are displayed. Settable properties include connection wait timeout, idle timeout, minimum, connections, maximum connections, and debug

-U username and -P password

Specifies user name and password for server authentication

 
Top of section

RemoveCP

Description

Shuts down the specified connection pool and removes it so that the server does not try to restart the connection pool during a server restart.

Server permissions

DTD and sample input file

Modify server configuration

None

Syntax

  SilverCmd RemoveCP server[:port] poolName [options]

The valid arguments are:

Argument

Description

server[:port]

Specifies the target server and administration port

poolName

Specifies the name of the connection pool to remove

options

Specifies operating criteria for the command

The valid options are:

Option

Definition

-? or -h

Displays usage message

-U username and -P password

Specifies user name and password for server authentication

 
Top of section

RemoveDatabase

Description

Deprecated. Removes a deployment database from the server's list of accessible databases.

Server permissions

DTD and sample input file

Modify server configuration

None

Syntax

  SilverCmd RemoveDatabase server[:port] database [options]

The valid arguments are:

Argument

Definition

server[:port]

Specifies the name of the source server and the administration port

database

Specifies the name of the deployment database to remove

options

Specifies operating criteria for the command

The valid options are:

Option

Definition

-? or -h

Print the usage message

-U username and -P password

Specifies user name and password for application server authentication

 
Top of section

ServerState

Description

Manages the server's state. Use it to shut down a server or test whether the server is currently running.

NOTE:   ServerState can be run on either (runtime or administration) port with the isrunning action—if you have configured separate ports. If you run ServerState with the shutdown action, you must specify the administration port.

Server permissions

DTD and sample input file

Modify server configuration when the action is shut down

Read server configuration with the action is isrunning

None

Syntax

  SilverCmd ServerState server[:port] action [options]

The valid arguments are:

Argument

Definition

server[:port]

Specifies the name of the source server and the port. The required port depends on which of the following two actions you specify

action

Specifies one of the following:

  • isrunning—Returns a message when the server is (or is not) running. You can run ServerState with the isrunning action on either (runtime or administration) port. This action must be run as part of a batch file or script

  • shutdown—Gracefully shuts down the server. You must enter the administration port when running this action; otherwise, a security error code is returned

options

Specifies operating criteria for the command

The valid options are:

Option

Definition

-? or -h

Displays the usage message

-U username and -P password

Specifies user name and password for server authentication

-d

Deactivate the target server. For use only when action is shutdown

-r

Restart the target server. For use only when action is shutdown

 
Top of section

SetDefaultURL

Description

Sets the default URL for a server or database.

Server permissions

DTD and sample input file

Modify server configuration

None

Syntax

  SilverCmd SetDefaultURL server[:port] [database] [options] -e URL

The valid arguments are:

Argument

Description

server[:port]

Specifies the target server and the administration port

database

Specifies the target database; include only if setting a database-default URL (see the examples below)

options

Specifies operating criteria for the command

The valid options are:

Option

Definition

-? or -h

Displays the usage message

-U username and -P password

Specifies user name and password for server authentication

-e URL

Specifies a server-relative URL (database/URL) or a database-relative URL (URL)

Here is a server-relative URL:

  /MyDatabase//pgHome.html

Here is a database-relative URL:

  /SilverStream/pgHome.html

Examples

Setting server-default URLs   When setting a server-default URL, do not specify a database name as an argument, and specify an URL using a server-relative URL.

For example, the following command sets a server-default URL for the server myServer:

  SilverCmd SetDefaultURL myServer 
  -e /MyDatabase/SilverStream/pgHome.html

Setting database-default URLs   When setting a database-default URL, specify the database name as an argument, and use a database-relative URL.

For example, the following command sets a database-default URL for the database myDatabase on the server myServer:

  SilverCmd SetDefaultURL myServer myDatabase 
  -e /SilverStream/pgHome.html

 
Top of section

SetSecurity

Description

Sets Read, Write, Protect, Select, and Execute security permissions on the application server, a database, a directory, or one or more objects. Certain permission types are applicable only for certain types of items. For example, the Select permission is only applicable to tables.

You can also set permissions on the Security directory of a server. The Read permission on this resource rules who can have access to user and group information such as lists of users and groups and user/group properties. The Protect permission rules who can set the permissions on the Security directory.

Server permissions

DTD and sample input file

Set Permissions

Read Users and Groups

DTD: set_security.dtd

Sample: set_security_sample.xml, secure_application_sample.xml, secure_cluster_sample.xml, secure_server_sample.xml

Syntax

  SilverCmd SetSecurity server[:port] [database] -f file [options]

The valid arguments are:

Argument

Definition

server[:port]

Specifies the name of the server and the administration port

database

Specifies the name of the target database

Not required when setting server permissions

-f file

Specifies the fully qualified name for an input file whose contents specify the security permissions information

options

Specifies the operating criteria for the command

The valid options are:

Option

Definition

-? or -h

Displays the usage message

-U username and -P password

Specifies user name and password for server authentication

-i

Continues on error

 
Top of section

SetUserGroupInfo

Description

Creates and deletes Silver Security users and groups, adds users to groups, and sets properties for both. This command has eight optional actions (listed in Actions).

Server permissions

DTD and sample input file

Modify server settings

DTD: set_user_group_info.dtd

Sample: set_user_group_info_sample.xml

Syntax

  SilverCmd SetUserGroupInfo server[:port] [action action-parameters] [options]

The valid arguments are:

Argument

Description

server[:port]

Specifies the name of the server and the administration port

action

Specifies the action to perform—for example, CreateUser or DeleteUser

For more information    For a list of actions, see Actions below

action-parameters

Specifies any special operating criteria for the action

options

Specifies operating criteria for the command

The valid options are:

Option

Description

-? or -h

Displays the usage message

-f file

Specifies the name of a file containing data for the SetUserGroupInfo command

-i

Continues on error

This is valid in batch mode only

-U username and -P password

Specifies user name and password for server authentication

Actions   The SetUserGroupInfo actions are:

Action

Description

AddUserToGroup

Adds a user to a Silver Security group

CreateGroup

Creates a Silver Security group

CreateUser

Creates a Silver Security user or certificate

DeleteGroup

Deletes a Silver Security group from the server

DeleteUser

Deletes a Silver Security user from the server

DeleteUserFromGroup

Deletes a user from the specified Silver Security group

SetGroupProperties

Specifies properties for an existing Silver Security group

SetUserProperties

Specifies properties for an existing Silver Security user

AddUserToGroup action

Description

Adds an existing user from a known security realm (such as NT) to an existing Silver Security group.

Syntax

  SilverCmd SetUserGroupInfo server[:port] AddUserToGroup username
  groupname [options] 

The action-parameters are:

Action-parameter

Description

username

Specifies the name of the user to add. The name must be in a valid login format

If the name includes spaces, it must be enclosed in quotes

For more information    For more information about supplying these values for the security realms, see the chapter on setting up security in the Administrator's Guide

groupname

Specifies the name of the Silver Security group to which you want to add the user

If the name includes spaces, it must be enclosed in quotes. The name is case-sensitive and must exactly match an existing groupname

Examples

This example shows how to add the NT user admin to the Silver Security group Admins:

  SilverCmd SetUserGroupInfo localhost AddUserToGroup ntDomain1\admin Admins

This example shows how to add the NT user admin to the Silver Security group Our NT Administrators:

  SilverCmd SetUserGroupInfo localhost AddUserToGroup ntDomain1\admin "Our NT Administrators"

CreateGroup action

Description

Creates a Silver Security group for the specified server.

Syntax

  SilverCmd SetUserGroupInfo server[:port] CreateGroup -g groupname [-d description]

The action-parameters are:

Action-parameter

Description

-g groupname

Specifies the name of the group

This value is required. If the groupname includes spaces, it must be enclosed in quotes

-d description

Specifies a description for the group

This value is optional. If the description includes spaces, it must be enclosed in quotes

Examples

The following examples show how to create three distinct Silver Security groups: one called Developers, one called Our Administrators, and one called Finance:

  SilverCmd SetUserGroupInfo localhost CreateGroup -g Developers -d "Research and Development Group"
  
  SilverCmd SetUserGroupInfo localhost CreateGroup -g "Our Administrators" -d "Our Admins"
  
  SilverCmd SetUserGroupInfo http://myserver CreateGroup -g Finance

CreateUser action

Description

Creates a Silver Security user by specifying a user name/password or a certificate user.

Syntax

  SilverCmd SetUserGroupInfo server[:port] CreateUser -u username [-p password] [-n full-name] [-d description]

OR

  SilverCmd SetUserGroupInfo server[:port] CreateUser -c client-certificate-file

The action-parameters are:

Action-parameter

Description

-u username

Specifies the name by which the new user will be known to the application server. This value is required except when specifying a client certificate file

Note that this value is different from the -U and -P (uppercase) parameters used for authenticating the user running SilverCmd

-p password

Specifies the user's password. This value is optional

Note that this value is different from the -U and -P (uppercase) parameters used for authenticating the user running SilverCmd

-n full-name

Specifies the user's full name. If the name includes spaces, it must be enclosed in quotes. This value is optional

-d description

Specifies a description for the user. If the description includes spaces, it must be enclosed in quotes. This value is optional

-c client-certificate-file

Specifies the client certificate file

Examples

These examples show how to create a new user:

  SilverCmd SetUserGroupInfo http://myserver CreateUser -u user1 -p MyPassword -n "John Doe" -d "Applications Developer"
  
  SilverCmd SetUserGroupInfo localhost CreateUser -u user1 -n "John Doe"
  
  SilverCmd SetUserGroupInfo localhost CreateUser -u user1

This example shows how to create a certificate user, given a client certificate file:

  SilverCmd SetUserGroupInfo localhost CreateUser -c c:\certs\ClientCert1.cer

DeleteGroup action

Description

Deletes a Silver Security group.

Syntax

  SilverCmd SetUserGroupInfo server[:port] DeleteGroup groupname

The action-parameter is:

Action-parameter

Description

groupname

Specifies the name of the group to delete. It must exactly match the existing groupname (it is case-sensitive). If the name includes spaces, it must be enclosed in quotes

Example

  SilverCmd SetUserGroupInfo localhost DeleteGroup TestGroup

DeleteUser action

Description

Deletes a Silver Security user from the system.

Syntax

  SilverCmd SetUserGroupInfo server[:port] DeleteUser username

The action-parameters are:

Action-parameter

Description

username

Specifies the name of the user to delete. It must exactly match an existing username (it is case-sensitive). If the name includes spaces it must be enclosed in quotes

Example

  SilverCmd SetUserGroupInfo http://myserver DeleteUser testUser1

Usage

To delete a certificate user:

  SilverCmd SetUserGroupInfo localhost DeleteUser "CERT\\Jack Brown, DigitalID Class 1 - Microsoft Full Service, VeriSign, Inc. (28f52c889e8d6d8cf21d932d9b71z705)"

You must specify the complete distinguished name of the certificate user:

You can specify the default security realm (via the SMC or by setting the AgiAdmServer.PROP_DEFAULT_SECURITY_REALM property on the server object). If you set the default to Certificate Security Realm (for example, by setting the property value to CERT), there would be no need for the CERT\\ part, because it would be assumed by default.

DeleteUserFromGroup action

Description

Deletes a user from a Silver Security group.

Syntax

  SilverCmd SetUserGroupInfo server[:port] DeleteUserFromGroup username groupname

The action-parameters are:

Action-parameter

Description

username

Specifies the name of the user to delete from the group.

It must exactly match an existing username (it is case-sensitive). If the name includes spaces, it must be enclosed in quotes

groupname

Specifies the name of the Silver Security group from which to delete the user. It must exactly match an existing groupname (it is case-sensitive). If the name includes spaces, it must be enclosed in quotes

Example

  SilverCmd SetUserGroupInfo localhost DeleteUserFromGroup ntDomain1\admin Admins

SetGroupProperties action

Description

Sets properties for a Silver Security group. Any properties that are not specified retain their original values.

Syntax

  SilverCmd SetUserGroupInfo server[:port] SetGroupProperties -g groupname [-d description -l "is-locksmith"]

The action-parameters are:

Action-parameter

Description

-g groupname

Specifies the name of the group. It must exactly match an existing groupname (it is case-sensitive). If the name includes spaces, it must be enclosed in quotes

-d description

Provides a description of the group. If the name includes spaces, it must be enclosed in quotes

-l "is-locksmith"

Specifies the Locksmith value, which may be true or false

You may set is-locksmith on any type of group, not just Silver Security groups

You can only grant Locksmith privileges if you have them—for example, if you are a Locksmith

The value true means grant the privilege, and false means revoke the privilege

Examples

  SilverCmd SetUserGroupInfo myserver SetGroupProperties -g testGroup -d "This is a test group"
  
  SilverCmd SetUserGroupInfo myserver SetGroupProperties -g "Our Administrators" -l false

SetUserProperties action

Description

Modifies properties for a Silver Security or certificate user. Values not specified are not modified.

Syntax

  SilverCmd SetUserGroupInfo server[:port] SetUserProperties -u username -p password -n full-name [-d description] [-l "is-locksmith"]

OR

  SilverCmd SetUserGroupInfo server[:port] SetUserProperties -u username -p password -c certificate-file [-l is-locksmith]

The action-parameters are:

Action-parameter

Description

-u username

Specifies the user name for the user whose properties you want to change. This value is required and is not configurable

-p password

Specifies a new password for the user

-n full-name

Specifies a full name for the user. If the name includes spaces, it must be enclosed in quotes

-d description

Provides a description of the user. If the name includes spaces, it must be enclosed in quotes

-l is-locksmith

Specifies the Locksmith privilege value. You can give Locksmith privileges to any type of user, not just SilverUser or CertificateUser. You can only grant Locksmith privileges if you have them—for example, if you are a Locksmith. The value true means grant the privilege and false means revoke the privilege

-c certificate-file

Specifies the certificate file for updating the certificate users. This is a required value for certificate files and is not configurable

Examples

  SilverCmd SetUserGroupInfo localhost SetUserProperties -u jsmith -p "new password" -l false
  
  SilverCmd SetUserGroupInfo localhost SetUserProperties -u jsmith -n "Jonathan H. Smith"
  
  SilverCmd SetUserGroupInfo localhost SetUserProperties -u jsmith -d "Principal Engineer" -p "new pwd"

 
Top of section

Undeploy

Description

Undeploys a J2EE deployed object from a specified server. You can use this command to undeploy EARs, EJBs, RARs, CARs, and WARs.

Server permissions

DTD and sample input file

Modify server configuration

None

Syntax

  SilverCmd Undeploy server[:port] database object [options]

The valid arguments are:

Argument

Description

server[:port]

The target server

database

The database containing the deployed J2EE archive

object

The name of the J2EE object to undeploy

Use the name exactly as shown in the SMC's Deployed Object panel (accessed via the Deployment icon)

options

Specifies operating criteria for the command

The valid options are:

Option

Definition

-? or -h

Displays the usage message

-U username and -P password

Specifies user name and password for server authentication

-v verboseLevel

The level of messages to output. Values range from 0 for no messages (default) to 5 for the most messages

 
Top of section

ValidateEAR

Description

Validates the deployment descriptor within the specified EAR file. It reports any deployment descriptor problems, missing application assembly components, and class-related problems. The problems are written to the command window.

Use this command when you want to verify that the descriptor is correct before attempting to deploy the EAR on the server with DeployEAR.

Server permissions

DTD and sample input file

None

None

Syntax

  SilverCmd ValidateEAR earfile [options]

The valid arguments are:

Argument

Description

earfile

Specifies the name of the EAR file to validate

options

Specifies any operating criteria for the command

The valid options are:

Option

Description

-? or -h

Displays the usage message

 
Top of section

ValidateEJB

Description

Validates the beans, the deployment plan, and the deployment descriptor. It is automatically called by SilverCmd DeployEAR and DeployEJB and writes any errors or warnings to the SilverCmd console window.

Server permissions

DTD and sample input file

None

None

Syntax

  SilverCmd ValidateEJB ejbJarFile deploymentPlan [options]

The valid arguments are:

Argument

Description

ejbJarFile

Specifies the EJB JAR file whose beans are to be validated

deploymentPlan

Specifies the EJB's deployment plan

options

Specifies operating criteria for the command

The valid options are:

Option

Description

-? or -h

Displays the ValidateEJB usage message

-v verboseLevel

The level of messages to output. Values range from 0 for no messages (default) to 5 for the most messages



Copyright © 2004 Novell, Inc. All rights reserved. Copyright © 1997, 1998, 1999, 2000, 2001, 2002, 2003 SilverStream Software, LLC. All rights reserved.  more ...