Identifiers are symbolic names for objects—databases,
tables, replication definitions, publications, subscriptions, functions,
parameters, function string variables, and so on.
Identifiers are 1–255 bytes long for these objects:
Tables
Columns
Procedures
Parameters
Functions – as part of function replication definition
or internal functions
Note: The create function, alter
function, and drop function commands
do not support long identifiers. The name of the function and the
parameters of these commands cannot exceed 30 bytes.
Function strings
Replication definitions – including table
replication definitions, function replication definitions, and database
replication definitions
Articles
Publications
Subscriptions
All other identifiers
are 1–30 bytes long.
If an identifier is not enclosed in quotes, its first character
must be an ASCII letter. Subsequent characters can be ASCII letters,
digits, or the $ or _ character. Embedded spaces
are not allowed.
Identifiers that begin with the characters “rs_” are
reserved for Replication Server. See “Reserved Words” for a list of other reserved
words.
Parameter names for Replication Server functions and Adaptive
Server stored procedures are the only identifiers that can begin
with the @ character.
You can use reserved words for identifiers by enclosing the
identifiers in double quotes. When you use quotes, you can also
use embedded spaces and otherwise prohibited characters, such as
!@#$%^&*(), and
8-bit and multibyte characters. Replication Server strips any trailing
blanks from the end of the identifier, even if you have placed it
within quotes. For example:
check subscription "publishers_sub"
for "publishers_rep"
with replicate at "SYDNEY_DS"."pubs2"
Warning! Adaptive Server allows you to place identifiers within
quotes when you set quoted_identifier to
on. This lets you use reserved words for Adaptive Server object
names. However, Replication Server does not recognize identifiers
in quotes in the commands that it sends to Adaptive Server, so you cannot
use Transact-SQL keywords as names for replicated Adaptive Server objects.
If necessary, you can alter function strings to place quotes around
identifiers for replicated objects.
Enclose variable names in function-string templates in question
marks. For example, this variable name could be used in a function
string to refer to a primary database:
?rs_origin_db!sys?
or, using quoted identifiers:
?”rs_origin_db”!sys?