Syntax formatting conventions are summarized in the following table. Examples combining these elements follow.
Key |
Definition |
---|---|
{ } |
Curly braces mean you must choose at least one of the enclosed options. Do not include braces in the command. |
[ ]
|
Brackets mean you may choose or omit enclosed options. Do not include brackets in the command. |
|
|
Vertical bars mean you may choose no more than one option (enclosed in braces or brackets). |
,
|
Commas mean you may choose as many options as you need (enclosed in braces or brackets). Separate your choices with commas, to be typed as part of the command. Commas may also be required in other syntax contexts. |
( )
|
Parentheses are to be typed as part of the command. |
... |
An ellipsis (three dots) means you may repeat the last unit as many times as you need. Do not include ellipses in the command. |
Curly braces and vertical bars – choose only one option.
{red | yellow | blue}
Curly braces and commas – choose one or more options. If you choose more than one, separate your choices with commas.
{cash, check, credit}
One item in square brackets – choose it or omit it.
[anchovies]
Square brackets and vertical bars – choose none or only one.
[beans | rice | sweet_potatoes]
Square brackets and commas – choose none, one, or more options. If you choose more than one, separate your choices with commas.
[extra_cheese, avocados, sour_cream]
An ellipsis (...) means that you may repeat the last unit as many times as necessary. For the alter replication definition command, for example, you can list one or more columns and their datatypes for the add clause or the add searchable columns clause:
alter replication definition replication_definition {add column datatype [, column datatype]... | add searchable columns column [, column]... | replicate {minimal | all} columns}
RCL commands are similar to Transact-SQL® commands. The following sections present the formatting rules.
You can break a line anywhere except in the middle of a keyword or an identifier. You can continue a character string on the next line by typing a backslash (\) at the end of the line.
Extra spaces are ignored, except after a backslash. Do not enter any spaces after a backslash.
You can enter more than one command in a batch unless otherwise instructed.
RCL commands are not transactional. Each command is executed independently and is not affected by the completion status of other commands in the batch. However, syntax errors in a command prevent Replication Server from executing subsequent commands in a batch.
Keywords in RCL commands are not case sensitive. You can enter them in any combination of uppercase or lowercase letters.
Case sensitivity in identifiers and character data depends on the sort order that is in effect.
If you use a case-sensitive sort order such as “binary,” you must enter identifiers and character data in the correct combination of uppercase and lowercase letters.
If you use a sort order that is not case sensitive, such as “nocase,” you can enter identifiers and character data in any combination of uppercase or lowercase letters.
Identifiers are names you give to servers, databases, variables, parameters, database objects, and replication objects. Database object names include names for tables, columns, and views. Replication object names include names for replication definitions, subscriptions, functions, and publications.
Identifiers can be 1 – 255 bytes long (equivalent to 1 – 255 single-byte characters) and must begin with a letter, the @ sign, or the _ character. See “Support for longer identifiers” for a list of identifiers that have been extended to 255 bytes.
Replication Server function parameters are the only identifiers that can begin with the @ character. Function parameter names can include 255 characters after the @ character.
After the first character, identifiers can include letters, digits, and the #, $, or _ characters. Spaces are not allowed.
Parameters in function strings have the same rules as identifiers, except that:
They are enclosed in question marks (?). This allows Replication Server to locate them in the function string. Use two consecutive question marks (??) to represent a literal question mark in a function string.
The exclamation point (!) introduces a parameter modifier that indicates the source of the data to be substituted for a parameter at runtime. Refer to the Replication Server Reference Manual for a list of modifiers.