Sybase Administration Guid 1 PDF
Sybase Administration Guid 1 PDF
Volume 1
Contents
CHAPTER 1
CHAPTER 2
21
21
23
24
24
25
26
26
27
28
28
28
iii
Contents
29
29
29
30
30
30
CHAPTER 3
CHAPTER 4
iv
Contents
CHAPTER 5
CHAPTER 6
CHAPTER 7
283
283
284
286
286
287
287
288
289
290
291
291
291
Contents
294
295
296
297
299
299
300
300
301
301
302
302
304
304
305
305
CHAPTER 8
CHAPTER 9
CHAPTER 10
vi
321
321
322
323
324
Contents
CHAPTER 11
369
369
370
370
371
372
372
374
vii
Contents
CHAPTER 12
374
374
375
376
377
377
378
378
379
379
381
382
384
385
385
386
387
390
392
393
394
397
398
398
399
399
399
400
401
402
402
403
381
viii
CH A PTE R
Overview of System
Administration
Page
1
7
System procedures
System extended stored procedures
10
12
13
14
18
sa_role
sso_role
oper_role
sybase_ts_role
CHAPTER 1
Granting and revoking the system security officer and operator roles
Database owner
Database owner
The database owner is the creator of a database or someone to whom database
ownership has been transferred. A system administrator can use the grant
command to grant users the authority to create databases.
A database owner logs in to Adaptive Server using his or her assigned login
name and password, and has the dbo account. When this user logs in to
databases they did not create, this user is known by his or her regular user
name.
A database owner can:
Use the grant command to give other users permission to create objects
and execute commands within the database
should plan carefully who should own databases in the server. The system
security officer should consider auditing the database activity of all database
owners.
CHAPTER 1
owner, the user (including a system administrator) must qualify the name of
that object with the object owners nameownername.objectnameto access
the object. If an object or a procedure must be accessed by a large number of
users, particularly in ad hoc queries, having these objects owned by dbo
greatly simplifies access.
Starting isql
To start isql on most platforms, type this command at an operating system
prompt, where username is the system administrator:
isql -Uusername
Entering statements
The statements that you enter in isql can span several lines. isql does not process
statements until you type go on a separate line. For example:
1>
2>
3>
4>
select *
from sysobjects
where type = "TR"
go
On UNIX and other platforms, use the less than symbol (<) to redirect the
file.
The Transact-SQL statements in the ASCII file must use valid syntax and the
go command.
Include the named users password on the first line of the input file.
CHAPTER 1
Creating logins
Creating databases
Defining roles
Use the Monitor Viewer feature of Sybase Central to access Adaptive Server
Monitor. Sybase Central includes extensive online help.
Use the Sybase Central DDL-generation feature to record your work to
Transact-SQL scripts. The DDL-generation feature lets you save to a script the
actions you perform in an entire server or within a specific database.
System tables
The master database contains system tables that keep track of information
about Adaptive Server. In addition, each database (including the master
database) contains system tables that keep track of information specific to that
database.
All the Adaptive Server-supplied tables in the master database (the Adaptive
Server controlling database) are considered system tables. Each user database
is created with a subset of these system tables. The system tables may also be
called the data dictionary or the system catalogs.
A master database and its tables are automatically created when Adaptive
Server is installed. The system tables in a user database are created when the
create database command is issued. The names of all system tables start with
sys. You cannot create tables in user databases that have the same names as
system tables. See Reference Manual: Tables for detailed descriptions of
system tables and their columns.
System tables
sp_helpremotelogin
sp_help_resource_limit
sp_countmedatada
sp_dboption
sp_helprotect
sp_helpsegment
sp_estspace
sp_help
sp_helpserver
sp_helpsort
sp_helpartition
sp_helpcache
sp_helptext
sp_helpthreshold
sp_helpconfig
sp_helpconstraint
sp_helpuser
sp_lock
sp_helpdb
sp_helpdevice
sp_monitor
sp_monitorconfig
sp_helpgroup
sp_helpindex
sp_showcontrolinfo
sp_showexeclass
sp_helpjava
sp_helpjoins
sp_showplan
sp_spaceused
sp_helpkey
sp_helplanguage
sp_who
sp_help_resource_limit
sp_helplog
For complete information about the system procedures, see the Reference
Manual: Procedures.
CHAPTER 1
Verify that only the rows you wanted changed have been affected by the
command, and that the data has been changed correctly.
System procedures
System procedures
The names of all system procedures begin with sp_. They are located in the
sybsystemprocs database, but you can run many of them in any database by
issuing the stored procedure from the database or by qualifying the procedure
name with the database name.
Sybase-supplied system procedures (such as sp_who) are created using the
installmaster installation script. Use sp_version to determine the version of
installmaster was most recently executed. See the Reference Manual: System
Procedures for more information about sp_version.
If you execute a system procedure in a database other than sybsystemprocs, the
procedure operates on the system tables in the database from which it was
executed. For example, if the database owner of pubs2 runs sp_adduser from
pubs2 or issues the command pubs2..sp_adduser, the new user is added to
pubs2..sysusers. However, this does not apply to system procedures that update
only tables in the master database.
Permissions on system procedures are discussed in the Reference Manual:
Procedures.
10
CHAPTER 1
The spt_values table can be updated only by an upgrade; you cannot modify it.
To see how it is used, execute sp_helptext and look at the text for one of the
system procedures that references it.
The other system procedure tables are spt_monitor, spt_committab, and tables
needed by the catalog stored procedures. (The spt_committab table is located in
the sybsystemdb database.)
In addition, several system procedures create, and then drop, temporary tables.
For example, sp_helpdb creates #spdbdesc, sp_helpdevice creates #spdevtab,
and sp_helpindex creates #spindtab.
11
12
CHAPTER 1
Invoke a system ESP just like a system procedure. The difference is that a
system ESP executes procedural language code rather than Transact-SQL
statements. All ESPs are implemented by an Open Server application called
XP Server, which runs on the same machine as Adaptive Server. XP Server
starts automatically on the first ESP invocation.
For information about the system ESPs provided with Adaptive Server, see the
Reference Manual: Procedures.
messages in the operating system event log. See the installation guide and
configuration guide for your platform.
13
Connect me
to the TEST
Adaptive Server.
interfaces
interfaces file
TEST
TEST
Adaptive Server
The name, location, and contents of the interfaces file differ between operating
systems. Also, the format of the Adaptive Server addresses in the interfaces file
differs between network protocols.
14
CHAPTER 1
The Adaptive Server installation program creates a simple interfaces file that
you can use for local connections to Adaptive Server over one or more network
protocols. As a system administrator, modify the interfaces file and distribute
it to users so that they can connect to Adaptive Server over the network. See
the Configuration Guide for your platform for information about the interfaces
file.
See Chapter 2, Networks and Performance in the Performance and Tuning
Series: Basics for more information about the interfaces file and network
listeners.
Directory services
A directory service manages the creation, modification, and retrieval of
network service information. Directory services are provided by platform or
third-party vendors and must be purchased and installed separately from
Adaptive Server. Two examples of directory services are Registry and
Distributed Computing Environment (DCE).
The $SYBASE/$SYBASE_OCS/config/libtcl.cfg file is a Sybase-supplied
configuration file used by servers and clients to determine:
15
You can configure the LDAP server to use these access restrictions:
16
User name and password authentication Adaptive Server uses the default
user name and password from the appropriate file:
Windows %SYBASE%\%SYBASE_OCS%\ini\libtcl.cfg
CHAPTER 1
User name and password authentication properties establish and end a session
connection to an LDAP server.
Note The default user name and password stored in libtcl.cfg and passed to the
LDAP server for authentication purposes are distinct and different from those
used to access Adaptive Server. The default user name and password allow
access to the LDAP server for administrative tasks.
When an LDAP server is specified in the libtcl.cfg or libtcl64.cfg file
(collectively called libtcl*.cfg file), the server information is then accessible
only from the LDAP server; Adaptive Server ignores the interfaces file.
If multiple directory services are supported in a server, the order in which they
are searched is specified in libtcl*.cfg. You cannot use the dataserver command
line option to specify the search order.
See the Open Client Client-Library/C Programmers Guide and the Open
Client Client-Library/C Reference Manual.
17
Table 1-1 highlights the differences between the Sybase interfaces file and an
LDAP server.
Table 1-1: interfaces file versus LDAP directory services
interfaces file
Platform-specific
Directory services
Platform-independent
Performance
Performance when using an LDAP server may be slower than when using an
interfaces file because the LDAP server requires time to make a network
connection and retrieve data. Since this connection is made when Adaptive
Server is started, changes in performance are seen at login time, if at all. During
normal system load, the delay should not be noticeable. During high system
load with many connections, especially repeated connections with short
duration, the overall performance difference of using an LDAP server versus
the traditional interfaces file might be noticeable.
18
CHAPTER 1
19
20
CH A PTE R
This chapter describes the system databases that reside on all Adaptive
Server systems. It also describes optional Sybase-supplied databases that
you can install, and the sybdiag database, which Sybase Technical Support
may install for diagnostic purposes.
Topic
Overview of system databases
Page
21
master database
model database
23
25
sybsystemprocs database
tempdb database
26
26
sybsecurity database
sybsystemdb database
28
28
sybmgmtdb database
pubs2 and pubs3 sample databases
28
29
dbccdb database
sybdiag database
30
30
30
21
Install the sybsecurity and sybmgmtdb databases on their own devices and
segment. See the installation documentation for your platform.
Install the sybsystemprocs database on a device of your choice. You may want
to modify the installation scripts for pubs2 and pubs3 to share the device you
create for sybsystemprocs.
Use the installjsdb script (located in $SYBASE/ASE-15_0/scripts) to install the
sybmgmtdb database. installjsdb looks for a device named sybmgmtdev on
which to create the sybmgmtdb database and its accompanying tables and
stored procedures. If the sybmgmtdb database already exists, installjsdb creates
the Job Scheduler tables and stored procedures in the existing database. If
installjsdb cannot find either a sybmgmtdev device or a sybmgmtdb database, it
creates sybmgmtdb on the master device. However, Sybase strongly
recommends that you remove the sybmgmtdb database from the master device.
The installpubs2 and the installpubs3 scripts do not specify a device in their
create database statement, so they are created on the default device. During
installation, the master device is the default device. To change this, either edit
the scripts or follow the instructions in Chapter 8, Initializing Database
Devices.
22
CHAPTER 2
master database
The master database controls the operation of Adaptive Server and stores
information about all user databases and their associated database devices.
Table 2-1 describes the information that the master database stores.
Table 2-1: Information the master database stores
Information
System table
User accounts
Remote user accounts
syslogins
sysservers
sysconfigures
sysmessages
sysusages
Active locks
Character sets
syslocks
Languages
Users who hold server-wide roles
syslanguages
Server roles
Adaptive Server engines that are online
syssrvroles
sysremotelogins
sysprocesses
sysdatabases
sysdevices
syscharsets
sysloginroles
sysengines
Because the master database stores information about user databases and
devices, you must be in the master database to issue the create database, alter
database, disk init, disk refit, disk reinit, and disk mirroring commands.
The minimum size of your master database depends on your server's logical
page size. The master database must contain at least 6656 logical pages, so its
minimum physical size for each logical page size is:
2K page 13MB
4K page 26MB
8K page 52MB
23
master database
You may also want to use alter login to change the default database for users (the
database to which a user is connected when he or she logs in). See Chapter 3,
Managing Adaptive Server Logins and Database Users, in the Security
Administration Guide.
Create any system procedures in the sybsystemprocs database rather than in
master.
Perform frequent backups of the master database and all user databases.
See Keep up-to-date backups of master on page 40, and Chapter 13,
Restoring the System Databases, in System Administration Guide:
Volume 2.
24
CHAPTER 2
model database
Adaptive Server includes the model database, which provides a template, or
prototype, for new user databases. Each time a user enters the create database
command, Adaptive Server makes a copy of the model database and extends
the new database to the size specified by the create database command.
Note New databases must be at least as large as the model database.
The model database contains the required system tables for each user database.
You can modify model to customize the structure of newly created databases
everything you do to model is reflected in each new database. Some of the
changes that system administrators commonly make to model are:
Typically, most users do not have permission to modify the model database.
There is not much point in granting read permission either, since Adaptive
Server copies its entire contents into each new user database.
The model database cannot be larger than tempdb. By default, the size of model
is six allocation units (an allocation unit is 256 logical pages.). You see error
message if you increase the size of model without making tempdb at least as
large.
Note Keep a backup copy of the model database, and back up model with dump
database each time you change it. In case of media failure, restore model as you
25
sybsystemprocs database
sybsystemprocs database
Sybase system procedures are stored in the database sybsystemprocs. When a
user in any database executes a system stored procedure (that is, a procedure
whose name begins with sp_), Adaptive Server first looks for that procedure in
the users current database. If there is no procedure there with that name,
Adaptive Server looks for it in sybsystemprocs. If there is no procedure in
sybsystemprocs, Adaptive Server looks for the procedure in master.
If the procedure modifies system tables (for example, sp_adduser modifies the
sysusers table), the changes are made in the database from which the procedure
was executed.
To change the default permissions on system procedures, modify those
permissions in sybsystemprocs.
Note Any time you make changes to sybsystemprocs, back up the database.
tempdb database
Adaptive Server has a temporary database, tempdb, that provides a storage
area for temporary tables and other temporary working storage needs. The
space in tempdb is shared among all users of all databases on the server.
The default size of tempdb depends on the logical page size for your server, 2,
4, 8, or 16K. Certain activities may make it necessary for you to increase the
size of tempdb:
Use alter database to increase the size of tempdb. tempdb is initially created on
the master device. You can add space to tempdb from the master device or from
any other database device.
If you run update index statistics against large tables, the command fails with
error number 1105 if tempdb is not large enough.
26
CHAPTER 2
You can create and manage multiple temporary databases in addition to the
system temporary database, tempdb. Multiple temporary databases reduce
contention on system catalogs and logs in tempdb.
If a stored procedure creates temporary tables, the tables are dropped when the
procedure exits. You can also explicitly drop temporary tables before a session
ends.
Warning! Do not create temporary tables with the tempdb.. prefix from
inside a stored procedure unless you intend to share those tables among other
users and sessions.
Each time you restart Adaptive Server, it copies model to tempdb, which clears
the database. You cannot recover temporary tables.
27
sybsecurity database
sybsecurity database
The sybsecurity database, which contains the auditing system for Adaptive
Server, includes :
The sysauditoptions table, which contains rows describing the global audit
options
All other default system tables that are derived from model
sybsystemdb database
The sybsystemdb database stores information about distributed transactions.
Adaptive Server versions 12.0 and later can provide transaction coordination
services for transactions that are propagated to remote servers using remote
procedure calls (RPCs) or Component Integration System (CIS). Information
about remote servers participating in distributed transactions is stored in the
syscoordinations table.
The sybsystemdb database also stores information about SYB2PC transactions
that use the Sybase two-phase commit protocol. The spt_committab table,
which stores information about and tracks the completion status of each twophase commit transaction, is stored in the sybsystemdb database.
See the Configuration Guide for your platform for information about twophase commit transactions and how to create the sybsystemdb database.
sybmgmtdb database
The sybmgmtdb database stores jobs, schedules, scheduled jobs information,
and data the internal Job Scheduler task needs for processing. sybmgmtdb also
maintains the output and results from these executed tasks. See the Job
Scheduler Users Guide.
28
CHAPTER 2
29
dbccdb database
See the installation documentation for your platform for information about
installing the image data in pubs2.
dbccdb database
dbcc checkstorage records configuration information for the target database,
operation activity, and the results of the operation in the dbccdb database.
Stored in the database are dbcc stored procedures for creating and maintaining
dbccdb and for generating reports on the results of dbcc checkstorage
sybdiag database
Sybase Technical Support may create the sybdiag database on your system for
debugging purposes. This database holds diagnostic configuration data, and
should not be used by customers.
where:
script_file is the name of the installation script (the default value is NULL).
all reports details about each script, such as the date executed, and the
length of time for execution.
30
CHAPTER 2
This example describes what installation scripts were run, what time they were
run, and what time they finished:
sp_version null, 'all'
Script
Version
Status
-------------------------------------------------------------------------------installmaster
15.0/EBF XXXXX/B/Sun_svr4/OS 5.8/asemain/1/32-bit/OPT/Thu Sep
23 22:12:12 2004
Complete [Started=Sep 24 2004 3:39PM]-[Completed=Sep 24 2004 3:45PM
31
32
CH A PTE R
This chapter:
Page
33
34
35
37
39
42
43
Additional resources
46
33
Select the page size when you create the master device with dataserver -z.
For more information about the dataserver command, which is the command
used to create the master device, see the Utility Guide. For more information
about logical page sizes, see Chapter 3, Configuring Memory, in System
Administration Guide: Volume 2.
Planning resources
Using a test server helps you plan the final resource requirements for your
system and helps you discover resource deficiencies that you might not have
anticipated.
In particular, disk resources can have a dramatic effect on the final design of
the production system. For example, you may decide that, in the event of a
media failure, a particular database requires nonstop recovery. This means you
must configure one or more additional database devices to mirror the critical
database. Discovering these resource requirements in a test server allows you
to change the physical layout of databases and tables without affecting
database users.
Use a test server to benchmark both Adaptive Server and your applications
using different hardware configurations. This allows you to determine the
optimal setup for physical resources at both the Adaptive Server level and the
operating system level before bringing the entire system online for general use.
34
CHAPTER 3
35
If you are upgrading a server, back up all data (including the master database,
user databases, triggers, and system procedures) offline before you begin. After
upgrading, immediately create a separate, full backup of your data, especially
if there are incompatibilities between older dump files and the newer versions.
36
CHAPTER 3
37
38
If you are working with a test Adaptive Server, for convenience, you may
find it easier to initialize database devices as operating system files, rather
than raw devices. Adaptive Server supports either raw partitions or
certified file systems for its devices.
CHAPTER 3
If you are using raw partitions, initialize the raw devices to the sizes
required by Adaptive Server. If you initialize a raw device for Adaptive
Server, you cannot use that device for any other purpose (for example, to
store operating system files). Ask your operating system administrator for
assistance in initializing and configuring raw devices to the required sizes.
39
To back up master to a tape device, start isql and enter the command:
dump database master to "tape_device"
where tape_device is the name of the tape device (for example, /dev/rmt0).
*
*
*
*
*
from
from
from
from
from
If you have copies of these tables, and a hard-disk failure or other disaster
makes your database unusable, you can use the recovery procedures described
in Chapter 13, Restoring the System Databases, in System Administration
Guide: Volume 2.
40
CHAPTER 3
Also keep copies of all data definition language (DDL) scripts for user objects,
as described under Keeping records on page 43.
Start isql and dump the transaction log to a holding area (for example, a
temporary file).
Rename the dump file to a name that contains the dump date, time, and
database name.
In a separate file, record any errors that occurred during the dump.
41
Over time, if you discover few or no errors while running dbcc, you may decide
that the risk of database corruption is small and that you need to run dbcc only
occasionally. If the consequences of losing data are too high, continue to run
dbcc commands each time you back up a database.
Note For performance considerations, many sites choose to run dbcc checks
42
CHAPTER 3
Keeping records
Keeping records about your Adaptive Server system is an important part of
your job as a system administrator. Accurate records of changes and problems
that you have encountered can be a valuable reference when you are contacting
Sybase Technical Support or recovering databases. They can also provide vital
information for administrators who manage the Adaptive Server system in
your absence.
43
Keeping records
Contact information
Maintain a list of contact information for yourself as well as the System
Security Officer, Operator, and database owners on your system. Also, record
secondary contacts for each role. Make this information available to all
Adaptive Server users so that the appropriate contacts receive enhancement
requests and problem reports.
Configuration information
Ideally, create databases and database objects, and configure Adaptive Server
using script files that you store in a safe place. Storing the script files makes it
possible to re-create your entire system in the event of a disaster. You can also
use script files to quickly re-create database systems for evaluation purposes on
new hardware platforms. If you use a third-party tool to perform system
administration, remember to generate equivalent scripts after performing
administration tasks.
Consider recording the following kinds of information:
Commands that add new Adaptive Server logins and database users
The names, locations, and sizes of all files and raw devices initialized as
database devices
Maintain a dated log of all changes to the Adaptive Server configuration. Mark
each change with a brief description of when and why you made the change, as
well a summary of the end result.
Maintenance schedules
Keep a calendar of regularly scheduled maintenance activities; list any of the
procedures you perform at your site:
44
Monitoring the space left in transaction logs (if this is not done
automatically)
CHAPTER 3
Examining the error log contents for Adaptive Server, Backup Server, and
Adaptive Server Monitor
Running the update statistics command (see Chapter 1, Using the set
statistics Commands, in Performance and Tuning Series: Improving
Performance with Statistical Analysis)
System information
Record information about the hardware and operating system on which you run
Adaptive Server, including:
Copies of network configuration files (for example, the hosts and services
files)
Names and permissions for the Adaptive Server executable files and
database devices
45
Additional resources
Additional resources
The amount of information for system administrators to learn may seem
overwhelming. There are several software tools that can help you learn and
facilitate basic administration tasks. These include Adaptive Server Monitor,
used for monitoring server performance and other activities, and Sybase
Central, which simplifies many administration tasks. There are also many
third-party software packages available designed to help system administrators
manage daily maintenance activities.
46
CH A PTE R
Topic
Sybase Control Center for Adaptive Server
Adaptive Server Sybase Central Plug-in
Page
47
48
This chapter describes the GUI managing and monitoring tools for
Adaptive Server: This is meant merely as an overview to introduce you to
these tools. See the online help for a complete description.
47
48
Manage multiple servers from one console You can manage all the
Adaptive Server installations from the Sybase Central main window.
Generate database definition language (DDL) You can generate DDL for
the objects in Adaptive Server.
CHAPTER 4
Visually represent objects You can see the databases and logins in each
Adaptive Server and the objects in each database, and windows expand
and contract to display information about databases and logins. The
Adaptive Server plug-in expands to display information about many
items, including:
Disk devices
Data caches
Generating the SQL text for creating an object (which allows you to
reverse engineer Adaptive Server objects)
Deleting an object
49
Managing:
Database devices
Indexes
Partitions
Segments
Triggers
Views
ASE Replicator
Executing queries
50
CHAPTER 4
Select Register
Click Browse.
If the Unified Agent is monitoring Adaptive Server, you can start, stop, and
restart the server by right-clicking on the server and selecting Shutdown, Start,
or Restart.
If the Unified Agent is not monitoring Adaptive Server, you can shutdown the
server by selecting Shutdown.
Connecting to
Adaptive Server
Right click on Adaptive Server Enterprise and select Connect from the
menu.
Right click on any server group and select Connect from the menu.
The connected server is displayed in the Default server group if the
connection is initiated from the Adaptive Server Enterprise folder or the
connect icon. The plug-in displays Connected to server in the
corresponding server group if the connection is initiated from the server
group.
51
You can also specify a server to which you want to connect by any of the
following:
Creating a database
Specifying the servers host name and port number in the Connect dialog
box.
Choose File | New | Database or click on the Add Database option in the
Databases folder. The Create a New Database wizard opens. The Create a
New Database wizard asks for the following information:
Table 4-1: Inputs to create a new database wizard
Input
Database name
Description
Enter a name for the database
Database device
Database device
size
Specify the database device or devices on which to allocate the new database
Specify a size for each database device
Data or log
With override
Specify whether the database device will store data or the transaction log.
Specify with override if you want to store data and log on the same device.
For load
If you are creating the database so you can restore it from a backup, check the For Load check
box. This is the case only if you are recovering from media failure or if you are moving a
database from one location to another.
Specify whether to create a guest user in the database.
Guest account
If you do not enter a size, Adaptive Server allocates either the value of the
database size configuration variable or the size of the model database,
whichever is larger.
52
CHAPTER 4
If you have limited storage and must put the transaction log and the data on the
same logical device, specifying With Override allows Adaptive Server to
maintain the log on separate device fragments from the data.
You cannot remove or change a database device after creating the database
unless you first delete the database.
Warning! Deleting a database also deletes all its objects.
Deleting a database
Note Sybase recommends that you back up the master database after you
Database owners can add and delete users in the databases they own.
To create a user:
1
Expand the databases folder (select the + icon) and select the Users
folder.
Description
A name for the user. The name does not have to be the same as the
login.
Login to which this user is assigned.
Group
Note A user can be a member of one assigned group or the default public
group.
53
You can also select the Users folder. In the right pane, double-click the Add
User icon.
Deleting a user
You cannot delete a user who owns objects. Since there is no command to
transfer ownership of objects, you must delete objects owned by a user before
you can delete the user. Also, you cannot delete a user who has granted
permissions to other users without first revoking the permissions with cascade.
If appropriate, re-grant the permissions to the other users.
Locking a login is a simple alternative to deleting a user.
To delete a user:
1
You can also select the user folder by right-clicking on the user icon and select
Delete.
Before you delete a user:
Creating a table
Only a database owner or a user with create table permission can create a table.
To create a table:
1
In a database you are working in, select the User Tables folder.
Choose File | New | Table or click on the Add Table icon in the User Tables
folder.
The Table Editor opens.
You can also select the User Tables folder. In the right pane, double-click the
Add Table icon.
54
CHAPTER 4
Deleting a table
Before you delete a table, be sure that no other objects reference it. If any
objects reference it, edit those objects to avoid errors. To find out if other
objects reference a table, check its dependencies.
Note When you delete a table, Adaptive Server deletes the indexes and triggers
associated with the table and unbinds the rules or defaults that are bound to its
columns.
Only table owners can delete tables.
To delete a table:
Creating a server
group
You can also select the table by right-clicking on the table icon and
selecting Delete.
Follow the steps provided by the Create New Server Group wizard.
You can also add a server group by double-clicking on the Add Server Group
from the right-hand pane.
Getting server status
If the Unified Agent is monitoring Adaptive Server, check the server status by
any of the following:
Click on the server group to which the server belongs. Check the Status
column in the Details pane of the server group.
Click on the Adaptive Server Enterprise listed under Sybase Central, and
then click on Servers tab on the right hand side panel. The server status is
printed in the Status column.
55
A green triangle on the lower right-hand side of the server icon indicates
that Adaptive Server is running. A red square indicates that Adaptive
Server is stopped.
Note By default, the Adaptive Server plug-in does not have Check Server
Status enabled. To enable Unified Agent to monitor Adaptive Server:
If the Unified Agent is monitoring Adaptive Server, retrieve the server log by
selecting the server and clicking on the Server Log tab in the right-hand pane.
The server log is retrieved based on how you have configured the filter for the
the server log. To configure the server log filtering, right-click on the server
and select Server Log Filter. By default, the Adaptive Server plug-in retrieves
the last 1000 lines from the server log. You can configure the server filter to
retrieve:
Logging SQL
statements
Executing SQL
statements
To log all SQL statements executed through the Adaptive Server plug-in:
Execute SQL statements from within the Adaptive Server plug-in by using the
Interactive SQL query tool. To start the Interactive SQL tool, you can either:
Right-click the server on which you want to execute the SQL statements
and select Open Interactive SQL from the menu, or
Click the Utilities tab on the right-hand pane and select Interactive SQL
56
CHAPTER 4
Select the servers on which you want to execute the SQL statements
Click Execute.
The result set for each server is listed in the Result Set pane of the SQL
Execution dialog.
Viewing SQL
execution plan and
cost information
Use the Adaptive Server plug-in to view a GUI version of the SQL execution
plan for individual queries (much like a GUI version of showplan) and
execution plans for all queries in a stored procedure. This GUI display includes
nodes for each of the operators of the execution plan.
To get the GUI plan:
1
Click the Details tab to see the GUI plan of the selected query. Click on an
operator node to see the detailed statistics for that node.
Click on the XML tab to see an XML representation of the execution plan
for the selected query
Click on the Text tab to see the execution plan in a text format for the
submitted queries
For more information about Interactive SQL, see Starting Interactive
SQL on page 58.
View and modify the configuration of any object represented in the Adaptive
Server plug-in using the Property dialog.
To bring up the Property dialog:
Generate the SQL text required for creating an object, which allows you to
reverse engineer the object. To generate SQL text, right-click on the object and
select Generate DDL.
57
View and update the Adaptive Server configuration parameters using the
Server Properties dialog.
1
Select the functional group from the drop down list in the Show
Configuration Parameters
In addition, Interactive SQL can run command files or script files. For
example, you can build repeatable scripts to run against a database and then use
Interactive SQL to execute these scripts as batches.
Select a database in Sybase Central and select File | Open Interactive SQL.
Interactive SQL connects to the database. You can also right-click on the
database and select Open Interactive SQL.
The menu item Open Interactive SQL opens a connection to a server.
However, when you select the menu item for a server, Interactive SQL
opens a connection to the default database for that server. When you select
a specific database from the Open Interactive SQL menu, Interactive SQL
opens to the selected database.
58
CHAPTER 4
To start Interactive
SQL from the
command line
How you start Interactive SQL from the command line depends on your
operating system.
If you start Interactive SQL independently, the Connect dialog appears, which
lets you connect to a database just as you would in Sybase Central.
You can also connect to or disconnect from a database with the Connect and
Disconnect commands in the SQL menu, or by executing a connect or
disconnect statement in the SQL Statements pane.
59
60
CH A PTE R
Setting Configuration
Parameters
Page
61
66
sp_configure output
Named cache configuration parameters
77
79
79
Configuration parameters
80
Overview
Configuration parameters are user-definable settings that control various
aspects of Adaptive Server behavior. Adaptive Server supplies default
values for all configuration parameters. Use configuration parameters to
tailor Adaptive Server for an installations particular needs.
Read this chapter carefully to determine which configuration parameters
you should reset to optimize server performance.
Warning! Change configuration parameters with caution. Arbitrary
changes in parameter values can adversely affect Adaptive Server
performance and other aspects of server operation.
61
Overview
By editing your configuration file and then invoking sp_configure with the
configuration file option, or
62
CHAPTER 5
allow sendmsg
auditing
enable ssl
select on syscomments.text
63
Overview
a parameter that controls memory, Adaptive Server uses the logical page size
for the basic unit.
Note When you are configuring memory-related parameters, use only the P
(page size) parameter for your unit specification. If you use any other
parameter to configure memory related parameters, Adaptive Server may issue
an arithmetic overflow error message.
or:
sp_configure "number of locks", 0, "1K"
This functionality does not change the way in which Adaptive Server reports
sp_configure output.
And you attempt to add user joe to the server with a insufficiently long
password:
64
CHAPTER 5
Adaptive Server tests all configuration limits independently, and the login
attempt must pass all the applicable limits to succeed.
65
Using sp_configure
Default
------500
Memory Used
----------208
Config Value
-----------500
Run Value
--------500
Using sp_configure
sp_configure displays and resets configuration parameters. You can restrict the
number of parameters that sp_configure shows by using sp_displaylevel to set
Basic
Intermediate
Comprehensive
Effect
Displays all configuration parameters by group, their current values, their
default values, the value to which they have most recently been set, and
the amount of memory used by this particular setting.
Displays current value, default value, most recently changed value, and
amount of memory used by the specified parameter.
Resets parameter to value.
sp_configure
sp_configure parameter
66
CHAPTER 5
Command
Effect
sp_configure group_name
Syntax elements
The commands in Table 5-1 use the following variables:
value is any integer within the valid range for that parameter. (See the
descriptions of the individual parameters for valid range information.)
Parameters that work as toggles have only two valid values: 1 (on) and 0
(off).
Parameter parsing
sp_configure parses each parameter (and parameter name fragment) as
%parameter%. A string that does not uniquely identify a particular
parameter returns values for all parameters matching the string.
The following example returns values for all configuration parameters that
include lock, such as lock shared memory, number of locks, lock promotion
HWM, server clock tick length, print deadlock information, and deadlock retries:
sp_configure "lock"
Note If you attempt to set a parameter value with a nonunique parameter name
fragment, sp_configure returns the current values for all parameters matching
the fragment and asks you to specify a unique parameter name.
67
Using sp_configure
For information on editing the file, see Editing the configuration file on page
70. For information on specifying the name of the configuration file at start-up,
see Starting Adaptive Server with a configuration file on page 71.
where:
configuration file including quotes, specifies that this command uses the
configuration file.
parameter.
68
CHAPTER 5
69
Using sp_configure
where:
Examples
DEFAULT specifies that you want to use the default value for
parameter_name.
Example 1 This example specifies that the transaction can retry its attempt to
acquire a lock one time when deadlocking occurs during an index page split or
shrink:
deadlock retries = 1
Example 2 This example specifies that the default value for the parameter
cpu accounting flush interval should be used:
cpu accounting flush interval=DEFAULT
When you edit a configuration file, your edits are not validated until you check
the file using the verify option, read the file with the read option, or restart
Adaptive Server with that configuration file.
If all your configuration files are lost or corrupted, you can re-create one from
a running server by using the restore subcommand and specifying a name for
the new file. The parameters in the new file are set to the values with which
your server is currently running.
70
CHAPTER 5
Configuration files are nonencrypted ASCII text files. By default, they are
created with read and write permissions set for the file owner, and read
permission set for all other users. If you created the configuration file at the
operating system level, you are the file owner; if you created the configuration
file from Adaptive Server, using the write or restore parameter, the file owner
is the user who started Adaptive Server. Usually, this is the user sybase. To
restrict access to configuration files, use your operating systems file
permission command to set read, write, and execute permissions as
appropriate.
Note You must set permissions accordingly on each configuration file created.
Configuration files are not automatically backed up when you back up the
master database. They are operating system filesback them up in the same
way you back up your other operating system files.
Checking the name of the configuration file currently in use
71
Using sp_configure
When there are errors in the configuration file, Adaptive Server may not start,
or may use default values.
Adaptive Server uses default values if:
Backup/Recovery
Cache manager
DTM administration
Diagnostics
Disk I/O
Disk I/O
72
CHAPTER 5
Parameter group
Error log
Extended stored procedures
Error log, and the logging of Adaptive Server events to the Windows event log
The behavior of extended stored procedures (ESPs).
General information
Java services
Languages
If you use method calls to JDBC, you may need to increase the size of the
execution stack available to the user. See stack size on page 260.
Languages, sort orders, and character sets
Lock manager
Memory use
Locking
Memory consumption
Metadata caches
Setting the metadata cache size for frequently used system catalog information.
The metadata cache is a reserved area of memory used for tracking information
on databases, indexes, or objects. The greater the number of open databases,
indexes, or objects, the larger the metadata cache size. For a discussion of
metadata caches in a memory-usage context, see Chapter 3, Configuring
Memory, in System Administration Guide: Volume 2.
Monitoring
O/S resources
Physical memory
Processors
Query Tuning
RepAgent thread administration
Query optimization
Replication via Replication Server
Cluster Edition.
General Adaptive Server administration.
Security related
Unicode
Security-related features
Unicode-related features
User environment
User environments
Network communication
The syntax for displaying all groups and their associated parameters, and the
current values for the parameters, is:
73
Using sp_configure
sp_configure
Note The number of parameters returned by sp_configure depends on the value
to which you have your display level set. See User-defined subsets of the
parameter hierarchy: display levels on page 74.
The following is the syntax for displaying a particular group and its associated
parameter:
sp_configure "group_name"
74
CHAPTER 5
The default display level is comprehensive. When you set your display level,
the setting persists across multiple sessions. However, you can reset it at any
time.
Basic shows only the most basic parameters, and is appropriate for
general server tuning.
To set the display level, use the following, where user_name is your Adaptive
Server login name:
sp_displaylevel user_name[, basic | intermediate | comprehensive]
Unit
---id
id
Type
---static
dyna
This represents only a subset of the parameters in the languages group; some
language parameters appear only when your display level is comprehensive.
75
Using sp_configure
You can run sp_sysmon before and after using sp_configure to adjust
configuration parameters. The output gives you a basis for performance tuning
and allows you to observe the results of configuration changes.
76
CHAPTER 5
sp_configure output
The sample output below shows the type of information sp_configure prints if
your display level is comprehensive, and you execute sp_configure with no
parameters. The values it prints vary, depending on your platform and on what
values you have already changed.
sp_configure
Group: Configuration Options
Group: Backup/Recovery
Parameter Name
Default Memory Used Config Value Run Value
-------------------- ----------- ------------ --------allow remote access
1
0
1
1
print recovery info
0
0
0
0
recovery interval in m
5
0
5
5
...
Unit Type
---- ---switch dyn
switch dyn
minutes dyn
The Default column displays the default value. If you do not explicitly
reconfigure a parameter, it retains its default value.
Config Value displays the most recent value to which the configuration
parameter has been set. When you execute sp_configure to modify a
dynamic parameter:
77
sp_configure output
The change takes effect only when you restart Adaptive Server.
Name of unit
Unit description
number
clock ticks
Number of items.
Number of clock ticks.
microseconds
Number of microseconds.
milliseconds
seconds
Number of millisecond.s
Number of seconds.
minutes
hours
Number of minutes.
Number of hours.
bytes
days
Number of bytes.
Number of days.
kilobytes
megabytes
Number of kilobytes.
Number of megabytes.
logical pages
Number of logical pages. This value depends on the logical page size your server is using: 2,
4, 8, or 16K.
percent
ratio
switch
id
Value of the parameter is either TRUE (the parameter is turned on), or FALSE.
ID of the configured parameter you are investigating.
name
Character string name assigned to the run or configure value of the parameter. For example,
binary appears under the Run Value or Config Value column for the output of
sp_configure "lock scheme".
row
Number of rows
78
CHAPTER 5
cache size - size of the cache. By default Adaptive Server creates 8MB
caches. Change this parameter dynamically with sp_cacheconfig, or
change the value in the server configuration file to have the change take
place after the next server restart.
cache status status of the cache. One of default data cache, log on
ly, mixed, or in-memory storage. The default data cache must have a
cache status of default data cache, and cannot be changed. cache
status for named caches can be log only, mixed, or, for in-memory
databases, in-memory storage (you cannot change the cache status for
in-memory databases).
You cannot dynamically change the cache status in a clustered
environment from log only on a local cache while other instance use a
different cache status.
or change the value in the server configuration file to have the change take
place after the next server restart. The cache replacement policy must be
none for in-memory databases because they do not use buffer or page
replacement.
79
Configuration parameters
The value column in the sysconfigures table records the last value set from
sp_configure or the configuration file; the value column in syscurconfigs stores
the value currently in use. For dynamic parameters, the two values match; for
static parameters, which require a restart of the server to take effect, the two
values are different if the values have been changed since Adaptive Server was
last started. The values may also be different when the default values are used.
In this case, sysconfigures stores 0, and syscurconfigs stores the value that
Adaptive Server computes and uses.
sp_configure performs a join on sysconfigures and syscurconfigs to display the
values reported by sp_configure.
Configuration parameters
In many cases, the maximum allowable values for configuration parameters are
usually limited by available memory, rather than by sp_configure limitations.
Note To find the maximum supported values for your platform and version of
Adaptive Server, see Adaptive Server Specifications in the Installation
Guide for your platform.
80
CHAPTER 5
0 (off)
Range of values
Status
0 (off), 1 (on)
Dynamic
Display level
Required role
Comprehensive
System administrator
Configuration group
Query Tuning
abstract plan cache enables caching of abstract plan hash keys. See Chapter 12,
Creating and Using Abstract Plans in the Performance and Tuning Series:
Query Processing and Abstract Plans. abstract plan load must be enabled for
plan caching to take effect.
0 (off)
0 (off), 1 (on)
Status
Display level
Dynamic
Comprehensive
Required role
Configuration group
System administrator
Query Tuning
abstract plan dump enables the saving of abstract plans to the ap_stdout abstract
plans group. See Chapter 12, Creating and Using Abstract Plans in the
Performance and Tuning Series: Query Processing and Abstract Plans.
0 (off)
0 (off), 1 (on)
81
Configuration parameters
Summary information
Status
Display level
Dynamic
Comprehensive
Required role
Configuration group
System administrator
Query Tuning
abstract plan load enables association of queries with abstract plans in the
ap_stdin abstract plans group. See Chapter 12, Creating and Using Abstract
Plans in the Performance and Tuning Series: Query Processing and Abstract
Plans.
0 (off)
0 (off), 1 (on)
Status
Display level
Dynamic
Comprehensive
Required role
Configuration group
System administrator
Query Tuning
abstract plan replace enables plan replacement for abstract plans in the
ap_stdout abstract plans group. See Chapter 12, Creating and Using Abstract
Plans in the Performance and Tuning Series: Query Processing and Abstract
Plans. abstract plan load must be enabled for replace mode to take effect.
82
Default value
Range of values
0
0 2147483647
Status
Display level
Dynamic
Intermediate
Required role
Configuration groups
System administrator
Memory Use, Network Communication, Physical
Memory
CHAPTER 5
additional network memory sets the maximum size of additional memory that
can be used for network packets that are larger than the default packet size.
Adaptive Server rounds down the value you enter to the nearest 2K value. The
default value indicates that no extra space is allocated for large packets.
When a login requests a large packet size, Adaptive Server verifies it has
sufficient memory available to satisfy the request. If it does not, Adaptive
Server finds the largest available block of memory and tries the appropriate
size (which is a multiple of default network packet size) less than the largest
memory block. If that fails, Adaptive Server decreases the value of the request
by the number of bytes equal to default network packet size, if this is available.
Adaptive Server continues for 10 iterations, or until the size equals the value of
default network packet size, whichever comes first. On the tenth iteration,
Adaptive Server uses the value of the default network packet size for the packet
size.
If you increase max network packet size, you must increase additional network
memory because all allocated network memory is reserved for users at the
default size. Adaptive Server guarantees that every user connection can log in
at the default packet size.
If you increase max network packet size but do not increase additional network
memory, Adaptive Server does not guarantee that clients who request network
packet sizes larger than the default size can login at the requested packet size.
Increasing additional network memory may improve performance for
applications that transfer large amounts of data. To determine the value for
additional network memory when your applications use larger packet sizes:
1
Estimate the number of simultaneous users who will request the large
packet sizes, and the sizes their applications will request,
Multiply this sum by three, since each connection needs three buffers,
Add two percent for overhead for 32-bit servers, or four percent for 64-bit
servers, and
For example, if you estimate these simultaneous needs for larger packet sizes:
Application
bcp
Packet size
8192
Client-Library
Client-Library
8192
4096
Client-Library
Total
4096
24576
Overhead
83
Configuration parameters
Application
Packet size
Multiply by 3 buffers/user
Compute 2% overhead
* 3=73728
Add overhead
Additional network memory
+ 1474
75202
75776
Overhead
* .02=1474
0 (off)
Range of values
Status
0 (off), 1 (on)
Dynamic
Display level
Required role
Basic
System administrator
Configuration groups
allocate max shared memory determines whether Adaptive Server allocates all
the memory specified by max memory at start-up or only the amount of memory
the configuration parameter requires.
By setting allocate max shared memory to 0, you ensure that Adaptive Server
uses only the amount of shared memory required by the current configuration,
and allocates only the amount of memory required by the configuration
parameters at start-up, which is a smaller value than max memory.
If you set allocate max shared memory to 1, Adaptive Server allocates all the
memory specified by max memory at start-up. If you set allocate max shared
memory to 1, and if you increase max memory, Adaptive Server attempts to
allocate the memory immediately. If the memory allocation fails, Adaptive
Server writes messages to the error log. Check the error log to verify that no
errors have occurred.
A successful memory allocation means that Adaptive Server always has the
memory required for any memory configuration changes you make and there
is no performance degradation while the server readjusts for additional
memory. However, if you do not predict memory growth accurately, and max
memory is set to a large value, you may waste total physical memory.
84
CHAPTER 5
1 (on)
0 (off), 1 (on)
Status
Display level
Dynamic
Intermediate
Required role
Configuration group
System administrator
Query Tuning
allow backward scans controls how the optimizer performs select queries that
contain the order by...desc command:
When the value is set to 1, the optimizer can access the index or table rows
by following the page chain in descending index order.
When the value is set to 0, the optimizer selects the rows into a worktable
by following the index page pointers in ascending order, and then sorts the
worktable in descending order.
1 (on)
0 (off), 1 (on)
Status
Display level
Static
Intermediate
Required role
Configuration group
System administrator
SQL Server Administration
85
Configuration parameters
allow nested triggers controls the use of nested triggers. When the value is set
to 1, data modifications made by triggers can fire other triggers. Set allow
nested triggers to 0 to disable nested triggers. A set option, self_recursion,
controls whether the modifications made by a trigger can cause that trigger to
fire again.
1 (on)
0 (off), 1 (on)
Status
Dynamic
Display level
Required role
Comprehensive
System security officer
Configuration group
Security Related
allow procedure grouping controls the ability to group stored procedures of the
same name so that they can be dropped with a single drop procedure statement.
1 (on)
Valid values
Status
0 (off), 1 (on)
Dynamic
Display level
Required role
Intermediate
System security officer
Configuration groups
allow remote access controls logins from remote Adaptive Servers. The default
Server communicates with Backup Server via RPCs, setting this parameter to
0 makes it impossible to back up a database.
Since other system administration actions are required to enable remote servers
other than Backup Server to execute RPCs, leaving this option set to 1 does not
constitute a security risk.
86
CHAPTER 5
0 (off)
0 (off), 1 (on)
Status
Display level
Static
Comprehensive
Required role
Configuration groups
System administrator
Memory Use, SQL Server Administration
allow resource limits controls the use of resource limits. When the value is set to
1, the server allocates internal memory for time ranges, resource limits, and
internal server alarms. The server also internally assigns applicable ranges and
limits to user sessions. The output of showplan and statistics io displays the
optimizers cost estimate for a query. Set allow resource limits to 0 to disable all
resource limits.
allow sendmsg
Summary information
Default value
Valid values
0 (off)
0 (off), 1 (on)
Status
Display level
Dynamic
Comprehensive
Required role
Configuration group
1 (on)
87
Configuration parameters
Summary information
Valid values
Status
0 (off), 1 (on)
Static
Display level
Required role
Comprehensive
System administrator
Configuration group
Disk I/O
allow sql server async i/o enables Adaptive Server to run with asynchronous
disk I/O. To use asynchronous disk I/O, enable it on both Adaptive Server and
your operating system. See your operating system documentation for
information on enabling asynchronous I/O at the operating system level.
0 (off)
Valid values
Status
0 (off), 1 (on)
Dynamic
Display level
Required role
Comprehensive
System administrator
Configuration group
allow updates to system tables enables users with the system administrator role
to make changes to the system tables and to create stored procedures that can
modify system tables. A database administrator can update system tables in
any tables that he or she owns if allow updates to system tables is enabled.
88
CHAPTER 5
All tables in user databases that begin with sys and that have an ID value
in the sysobjects table of less than or equal to 100
Warning! Incorrect alteration of a system table can result in database
corruption and loss of data. To protect against errors that might corrupt
your databases, always use begin transaction when modifying a system
table. Immediately after finishing your modifications, disable allow
updates to system tables.
Stored procedures and triggers you create while allow updates to system tables
is set on can update the system tables, even after the parameter has been set off.
When you set allow updates to system tables to on, you create a window of
vulnerability, a period of time during which users can alter system tables or
create a stored procedure with which the system tables can be altered in the
future.
Because the system tables are so critical, Sybase suggests that you set this
parameter to on only in highly controlled situations. To guarantee that no other
users can access Adaptive Server while the system tables can be directly
updated, restart Adaptive Server in single-user mode. For details, see
startserver and dataserver in the Utility Guide.
Note The server-wide configuration option allow updates to system tables takes
precedence over the stored procedure settings for allow updates to system
tables. If you do not enable allow updates to system tables at the server level,
individual stored procedure settings determine whether you can modify system
catalogs.
200
Range of values
Status
100 10000
Static
Display level
Required role
Configuration group
Diagnostics
89
Configuration parameters
100
1 65535
Status
Display level
Dynamic
Intermediate
Required role
Configuration groups
The in-memory audit queue holds audit records generated by user processes
until the records can be processed and written to the audit trail. To change the
size of an audit queue, a system security officer can use audit queue size. When
you configure the queue suze, there is a trade-off between performance and
risk. If the queue is too large, records can remain in it for some time. As long
as records are in the queue, they are at risk of being lost if the system fails.
However, if the queue is too small, it can repeatedly become full, which affects
overall system performance; user processes that generate audit records sleep if
the audit queue is full.
Following are some guidelines for determining how big your audit queue
should be. You must also take into account the amount of auditing to be
performed at your site.
The memory requirement for a single audit record is 424 bytes; however,
a record can be as small as 22 bytes when it is written to a data page.
The maximum number of audit records that can be lost in a system failure
is the size of the audit queue (in records), plus 20. After records leave the
audit queue, they remain on a buffer page until they are written to the
current audit table on the disk. The pages are flushed to disk every 20
records, less if the audit process is not constantly busy.
In the system audit tables, the extrainfo field and fields containing names
are of variable length, so audit records that contain complete name
information are generally larger.
The number of audit records that can fit on a page varies from 4 to as many as
80 or more. The memory requirement for the default audit queue size of 100 is
approximately 42K.
90
CHAPTER 5
auditing
Summary information
Default value
Range of values
0 (off)
0 (off), 1 (on)
Status
Display level
Dynamic
Intermediate
Required role
Configuration group
1
1 (enabled), 0 (disabled)
Status
Display level
Dynamic
Comprehensive
Required role
Configuration group
System administrator
Shared Disk Cluster
91
Configuration parameters
0
01
Status
Dynamic
Display level
Required role
Configuration group
Query tuning
50
Range of values
Status
5 50
Static
Display level
Required role
Configuration group
Diagnostics
92
0 (off)
CHAPTER 5
Summary information
Range of values
Status
1 (on), 0 (off)
Dynamic
Display level
Required role
10
System administrator
Configuration group
0 (off)
Range of values
Status
1 (on), 0 (off)
Dynamic
Display level
Required role
10
System security officer
Configuration group
Security Related
The system security officer can tell the server to check for at least one character
or digit in a password using the server-wide configuration parameter check
password for digit. If set, this parameter does not affect existing passwords.
512
Valid values
Status
512 2147483647
Static
Display level
Required role
Comprehensive
System administrator
Configuration group
CIPC large message pool size specifies the number of large message buffers
allocated by CIPC at start-up time.
93
Configuration parameters
8192
2048 2147483647
Status
Display level
Static
Comprehensive
Required role
Configuration group
System administrator
Shared Disk Cluster
CIPC regular message pool size specifies the number of regular message buffer
allocated by CIPC at start-up time.
50
0 2147483647
Status
Display level
Dynamic
Comprehensive
Required role
Configuration group
System administrator
Component Integration Services
When performing a bulk transfer of data from one Adaptive Server to another
Adaptive Server, CIS internally buffers rows, and asks the Open Client bulk
library to transfer them as a block. The size of the array is controlled by cis bulk
insert array size.
94
Summary information
Default value
Range of values
Status
0 2147483647
Dynamic
Display level
Required role
Comprehensive
System administrator
Configuration group
CHAPTER 5
cis bulk insert batch size determines how many rows from the source tables are
to be bulk copied into the target table as a single batch using select into.
If you leave cis bulk insert batch size at 0, all rows are copied as a single batch.
Otherwise, after the count of rows specified by this parameter has been copied
to the target table, the server issues a bulk commit to the target server, causing
the batch to be committed.
If a normal client-generated bulk copy operation (such as that produced by the
bcp utility) is received, the client is expected to control the size of the bulk
batch, and the server ignores the value of this configuration parameter.
Range of values
Status
032767
Dynamic
Display level
Required role
Comprehensive
System administrator
Configuration group
cis connect timeout determines the wait time, in seconds, for a successful
Client-Library connection.
50
Range of values
Status
1 2147483647
Dynamic
Display level
Required role
Comprehensive
System administrator
Configuration group
cis cursor rows specifies the cursor row count for cursor open and cursor fetch
operations. Increasing this value means more rows are fetched in one
operation. This increases speed but requires more memory.
95
Configuration parameters
0
0 2147483647
Status
Display level
Dynamic
Comprehensive
Required role
Configuration group
System administrator
Component Integration Services
cis idle connection timeout configures Adaptive Server to check for CIS
connections to any remote server that have been unused longer than the
specified number of seconds. Adaptive Server deletes the unused connections
and reallocates their resources.
Although the number you specify is in seconds, the housekeeper task wakes up,
at most , once a minute, so idle connections may be idle for much longer than
the configured value. Adaptive Server does not drop idle connections if a
transaction is active on the connection, and reestablishes the connection
automatically if the user executes any command that accesses the connection.
512
51232768
Status
Display level
Dynamic
Comprehensive
Required role
Configuration group
System administrator
Component Integration Services
cis packet size specifies the size of Tabular Data Stream (TDS) packets that
are exchanged between the server and a remote server when a connection is
initiated.
The default packet size on most systems is 512 bytes, and this may be adequate
for most applications. However, larger packet sizes may result in significantly
improved query performance, especially when text, unitext, and image or bulk
data is involved.
If you specify a packet size larger than the default, then the target server must
be configured to allow variable-length packet sizes, using:
96
CHAPTER 5
additional netmem
Status
Display level
Dynamic
Comprehensive
Required role
System administrator
Configuration group
cis rpc handling specifies the default method for remote procedural call (RPC)
handling. Setting cis rpc handling to 0 sets the Adaptive Server site handler as
the default RPC handling mechanism. Setting the parameter to 1 forces RPC
handling to use Component Integration Service access methods. See set cis rpc
handling in the Component Integration Services Users Guide.
10
Valid values
Status
1 127
Dynamic
Display level
Required role
Comprehensive
System administrator
Configuration group
cluster heartbeat interval controls the interval that cluster instances use to send
and check the heartbeat status.
Using a lower value for cluster heartbeat interval reduces the failure detection
time but increases the risk of a false failure because of a transient problem
(such as an overloaded CPU). Tuning cluster heartbeat interval to a larger value
reduces the risk of a false failure but increases the time needed to detect a
failure.
97
Configuration parameters
1
1 127
Status
Display level
Dynamic
Comprehensive
Required role
Configuration group
System administrator
Shared Disk Cluster
cluster heartbeat retries controls the number of times an instance retries a failed
cluster heartbeat before entering failure mode.
Tuning cluster heartbeat retries to a lower value reduces the time to detect
failure but increases the risk of a false failure because of a transient problem
(such as an overloaded CPU). Tuning cluster heartbeat retries to a larger value
reduces the risk of a false failure but increases the time needed to detect a
failure.
1
1 to n 1, where n is the maximum number of
instances specified in cluster.cfg or the quorum file.
Status
Display level
Static
Comprehensive
Required role
Configuration group
System administrator
Shared Disk Cluster
98
CHAPTER 5
The value of cluster redundancy level to a value equal to or greater than the
value of maximum number of instances
When the cluster redundancy level value increases, so does the messaging
traffic, as there are multiple copies of each lock in the cluster, and an increase
in overhead required to maintain this redundancy level.
Other configuration parameters, such as number of locks and cache size need
more resources for cluster redundancy level values greater than 1, which means
you must increase max memory for the same number of locks value.
Sybase recommends that you set cluster redundancy level to 1 if the failure of
multiple instances is expected to be uncommon.
60
Valid values
Status
1 127
Dynamic
Display level
Required role
Comprehensive
System administrator
Configuration group
cluster vote timeout controls the maximum amount of time an instance waits for
other instances to vote during the voting period. An instance waits only for
those instances which it believes are running.
Tuning cluster vote timeout to a lower value can reduce failover time, but
increases the risk that an instance that is running is excluded from the new
cluster view. Tuning cluster vote timeout to a larger value reduces the risk that
an running instance is excluded from the new cluster view, but may increase
failover time.
Range of values
99
Configuration parameters
Summary information
Status
Display level
Dynamic
Comprehensive
Required role
Configuration group
System administrator
User Environment
column defult cache size determines the size of the cache that Adaptive Server
must keep in memory to provide defaults for nonmaterialized columns.
4096
0 2147483647
Status
Display level
Dynamic
10
Required role
Configuration group
System administrator
SQL Server Administration
0
0 2147483647
Status
Display level
Dynamic
Comprehensive
Required role
Configuration group
System administrator
Physical Memory
100
CHAPTER 5
configuration file
Summary information
Default value
Range of values
0 (off)
One of: 0, verify, read, write, or restore
Status
Display level
Dynamic
Comprehensive
Required role
Configuration group
System administrator
General Information
configuration file specifies the location of the configuration file currently in use.
See Using sp_configure with a configuration file on page 68 for a complete
description of configuration files.
cost of a logical io
Summary information
Default value
Range of values
2
0 254
Status
Display level
Dynamic
Comprehensive
Required role
Configuration group
System administrator
Query Tuning
cost of a physical io
Summary information
Default value
25
Range of values
Status
0 254
Dynamic
Display level
Required role
Comprehensive
System administrator
Configuration group
Query Tuning
101
Configuration parameters
1000
1 65534
Status
Display level
Dynamic
Comprehensive
Required role
Configuration group
System administrator
Query Tuning
estimated_pio = 25
estimated_lio = 2
estimated_cpu = 1000
If your Adaptive Server has sufficient memory, then all tables exist in memory,
and a value of 0 for cost of a physical io is appropriate.
If your CPU is fast enough so the value for cost of a cpu unit is not a issue, use
this formula to determine the cost of CPU, which combines 2 LIO and 25 PIO
(the default values):
CPU X 100/configuration_value
102
200
12147483647
CHAPTER 5
Summary information
Status
Display level
Dynamic
Comprehensive
Required role
Configuration group
System administrator
SQL Server Administration
cpu accounting flush interval specifies the amount of time, in machine clock
ticks (non-Adaptive Server clock ticks), that Adaptive Server waits before
flushing CPU usage statistics for each user from sysprocesses to syslogins, a
procedure used in charge-back accounting.
When a user logs in to Adaptive Server, the server begins accumulating figures
for CPU usage for that user process in sysprocesses. When a user logs off
Adaptive Server, or when the value of cpu accounting flush interval is exceeded,
the accumulated CPU usage statistics are flushed from sysprocesses to
syslogins. These statistics continue accumulating in syslogins until you clear
the totals. Display the current totals from syslogins using sp_reportstats.
The value to which you set cpu accounting flush interval depends on the type of
reporting you intend to do. If you run reports on a monthly basis, set cpu
accounting flush interval to a relatively high value. With infrequent reporting, it
is less critical that the data in syslogins be updated frequently.
However, if you perform periodic ad hoc selects on the totcpu column in
syslogins to determine CPU usage by process, set cpu accounting flush interval
to a lower value to increase the likelihood of the data in syslogins being up-todate when you execute your selects.
Setting cpu accounting flush interval to a low value may cause the lock manager
to mistakenly identify processes as potential deadlock victims. When the lock
manager detects a deadlock, it checks the amount of CPU time accumulated by
each competing processes. The process with the lesser amount is chosen as the
deadlock victim and is terminated by the lock manager. Additionally, when cpu
accounting flush interval is set to a low value, the task handlers that store CPU
usage information for processes are initialized more frequently, thus making
processes appear as if they have accumulated less CPU time than they actually
have. Because of this, the lock manager may select a process as the deadlock
victim when, in fact, that process has more accumulated CPU time than the
competing process.
If you do not intend to report on CPU usage at all, set cpu accounting flush
interval to its maximum value. This reduces the number of times syslogins is
updated, and reduces the number of times its pages must be written to disk.
103
Configuration parameters
500
02147483647
Status
Display level
Dynamic
Comprehensive
Required role
Configuration group
System administrator
SQL Server Administration
cpu grace time, together with time slice, specifies the maximum amount of time
that a user process can run without yielding the CPU before Adaptive Server
preempts it and terminates it with a timeslice error. The units for cpu grace time
are time ticks, as defined by sql server clock tick length. See sql server clock
tick length on page 256.
1
08
Status
Display level
Dynamic
Intermediate
Required role
Configuration group
current audit table establishes the table where Adaptive Server writes audit
rows. A system security officer can change the current audit table, using:
104
CHAPTER 5
where n is an integer that determines the new current audit table, as follows:
0 tells Adaptive Server to set the current audit table to the next table. For
example, if your installation has three audit tables, sysaudits_01,
sysaudits_02, and sysaudits_03, Adaptive Server sets the current audit
table to:
"with truncate" specifies that Adaptive Server should truncate the new table if it
is not already empty. sp_configure fails if this option is not specified and the
To execute sp_configure to change the current audit table, you must have the
sso_role active. You can write a threshold procedure to change the current audit
table automatically.
500
Range of values
Status
02147483
Dynamic
Display level
Required role
Comprehensive
System administrator
Configuration group
Lock Manager
105
Configuration parameters
106
Default value
Range of values
0
01
Status
Display level
Dynamic
Comprehensive
Required role
Configuration groups
System administrator
Memory Use, Monitoring
CHAPTER 5
enabled, Adaptive Server collects the text for each deadlock. Use
monDeadLock to retrieve these deadlock messages.
0
0 2147483647
Status
Display level
Dynamic
Comprehensive
Required role
System administrator
Configuration group
Monitoring
Adaptive Server stores per engine. The total number of messages in the
monSQLText table is the value of sql text pipe max messages times the number
of engines running.
deadlock retries
Summary information
Default value
Range of values
Status
02147483647
Dynamic
Display level
Required role
Intermediate
System administrator
Configuration groups
Transaction A locks page 1007 and needs to acquire a lock on page 1009
to update the page pointers for a page split.
Transaction B is also inserting an index row that causes a page split, holds
a lock on page 1009, and needs to acquire a lock on page 1007.
107
Configuration parameters
Transaction A:
Splitting index
page 1007; holds
lock on 1007;
needs to acquire a
lock on 1009 to
update its
previous-page
pointer
Page 1007
Bennet
1132
Greane
1133
Grizley
1127
Page 1007
Bennet
1132
Greane
1133
Hunter
1127
Irons
1218
Page 1009
Karsen
1315
Lemmon 1220
Perkins
1257
Quigley 1254
Page 1033
Hunter
1127
Irons
1218
Page 1009
Karsen
1315
Lemmon 1220
Mouton
1244
Transaction B:
Splitting index
page 1009; holds
lock on 1009;
needs to acquire
a lock on 1007 to
update its
next-page pointer
Page 1044
Perkins
1257
Quigley
1254
sp_sysmon reports on deadlocks and retries. See the Performance and Tuning
108
CHAPTER 5
1
0255
Status
Display level
Static
Intermediate
Required role
Configuration group
System administrator
Languages
default character set id specifies the number of the default character set used by
the server. The default is set at installation, and can be changed later with the
Sybase installation utilities. See Chapter 10, Configuring Character Sets, Sort
Orders, and Languages.
3MB
2a 10000
a. Minimum determined by servers logical page size.
Status
Dynamic
Display level
Required role
Intermediate
System administrator
Configuration group
default database size sets the default number of megabytes allocated to a new
user database if create database is issued without any size parameters. A
database size given in a create database statement takes precedence over the
value set by this configuration parameter.
If most of the new databases on your Adaptive Server require more than one
logical page size, you may want to increase the default.
Note If you alter the model database, you must also increase the default
database size, because the create database command copies model to create a
109
Configuration parameters
5
0100
Status
Display level
Dynamic
Intermediate
Required role
Configuration group
System administrator
SQL Server Administration
that value takes precedence over the configuration parameter setting. See the
Performance and Tuning Series: Locking and Concurrency Control.
110
Default value
Range of values
0
0100
Status
Display level
Dynamic
Intermediate
Required role
Configuration group
System administrator
SQL Server Administration
CHAPTER 5
default fill factor percent determines how full Adaptive Server makes each index
page when it is creating a new index on existing data, unless the fill factor is
specified in the create index statement. The fillfactor percentage is relevant only
when the index is created. As data changes, pages are not maintained at any
particular level of fullness.
default fill factor percent affects:
There is seldom a reason to change default fill factor percent, especially since
you can override it in the create index command. See create index in the
Reference Manual: Commands.
default language id
Summary information
Default value
Range of values
Status
032767
Dynamic
Display level
Required role
Intermediate
System administrator
Configuration group
Languages
default language id is the number of the language that is used to display system
messages unless a user has chosen another language from those available on
the server. us_english always has an ID of NULL. Additional languages are
assigned unique numbers as they are added.
2048
Range of values
Status
512 65024
Static
Display level
Required role
Intermediate
System administrator
111
Configuration parameters
Summary information
Configuration groups
default network packet size configures the default packet size for all Adaptive
Server users. You can set default network packet size to any multiple of 512
bytes; values that are not even multiples of 512 are rounded down.
Memory for all users who log in with the default packet size is allocated from
the Adaptive Server memory pool, as set with total logical memory. This
memory is allocated for network packets when Adaptive Server is started.
Each Adaptive Server user connection uses:
Each of these buffers requires default network packet size bytes. The total
amount of memory allocated for network packets is:
(number of user connections + number of worker processes) * 3 * default network
packet size
For example, if you set default network packet size to 1024 bytes, and you have
50 user connections and 20 worker processes, the amount of network memory
required is:
(50 + 20) * 3 * 1024 = 215040 bytes
If you increase default network packet size, you must also increase max network
packet size to at least the same size. If the value of max network packet size is
greater than the value of default network packet size, increase the value of
additional network memory. See additional network memory on page 82.
Use sp_sysmon to see how changing the default network packet size parameter
affects network I/O management and task switching. For example, try
increasing default network packet size and then checking sp_sysmon output to
see how this affects bcp for large batches. See the Performance and Tuning
Series: Monitoring Adaptive Server with sp_sysmon.
Requesting a larger packet size at login
Clients automatically use the Adaptive Server default packet size. Use the -A
flag to Adaptive Server client programs to request a large packet size. For
example:
112
CHAPTER 5
isql -A2048
default sortorder id
Summary information
Default value
Range of values
50
0255
Status
Display level
Static
Comprehensive
Required role
Configuration group
System administrator
Languages
default sortorder id is the number of the sort order that is installed as the default
on the server. To change the default sort order, see Chapter 10, Configuring
Character Sets, Sort Orders, and Languages.
binary
Not currently used
Status
Display level
Static
Comprehensive
Required role
Configuration group
System administrator
Unicode
default unicode sortorder is a string parameter that uniquely defines the default
Unicode sort order installed on the server. To change the Unicode default sort
order, see Chapter 10, Configuring Character Sets, Sort Orders, and
Languages.
binary
Range of values
Status
Display level
Comprehensive
113
Configuration parameters
Summary information
Required role
Configuration group
System administrator
Unicode
default XML sortorder is a string parameter that defines the sort order used by
the XML engine. A string parameter is used rather than a numeric parameter to
guarantee a unique ID. See Chapter 6, XML Support for I18N in XML
Services in Adaptive Server Enterprise.
0 (disabled)
0 to 1
Status
Required role
dynamic
System administrator
Configuration group
Query tuning
114
Default value
Valid values
0 (enabled)
0 (enabled), 1 (disabled)
Status
Display level
Static
Comprehensive
Required role
Configuration group
System administrator
Languages
CHAPTER 5
Valid values
Status
0 (off), 1 (on)
Static
Display level
Required role
Comprehensive
System administrator
Configuration group
Disk I/O
disable disk mirroring enables or disables disk mirroring for Adaptive Server.
This is a global variable; Adaptive Server does not perform any disk mirroring
after this configuration parameter is set to 1 and Adaptive Server is restarted.
Setting disable disk mirroring to 0 enables disk mirroring.
Note You must disable disk mirroring if your Adaptive Server is configured
for failover.
0 (on)
Range of values
Status
0 (on), 1 (off)
Dynamic
115
Configuration parameters
Summary information
Display level
Required role
Comprehensive
System Administrator
Configuration group
256
Range of values
Status
02147483647
Dynamic
Display level
Required role
Comprehensive
System administrator
Configuration group
disk i/o structures specifies the initial number of disk I/O control blocks
Adaptive Server allocates at start-up.
User processes require a disk I/O control block before Adaptive Server can
initiate an I/O request for the process. The memory for disk I/O control blocks
is preallocated when Adaptive Server starts. To minimize the chance of
running out of disk I/O structures, you should configure disk i/o structures to as
high a value as your operating system allows. See your operating system
documentation for information on concurrent disk I/Os.
Use sp_sysmon to determine whether to allocate more disk I/O structures. See
the Performance and Tuning Series: Monitoring Adaptive Server with
sp_sysmon. You can set the max async i/os per server configuration parameter
to the same value as disk i/o structures. See max async i/os per server on page
167.
116
Summary information
Default value
4096
Valid values
Status
2048 2147483647
Static
CHAPTER 5
Summary information
Display level
Required role
Comprehensive
System administrator
Configuration group
DMA object pool size specifies the number of DMA (direct memory access)
0 (minutes)
Valid values
Status
0 2147483647 (minutes)
Dynamic
Display level
Required role
10
System administrator
Configuration group
DTM Administration
dtm detach timeout period sets the amount of time, in minutes, that a distributed
300 (seconds)
Valid values
Status
1 2147483647 (seconds)
Dynamic
Display level
Required role
10
System administrator
Configuration group
DTM Administration
117
Configuration parameters
dtm lock timeout period sets the maximum amount of time, in seconds, that a
dxact1 ASE1
ASTC
rpc1
rpc2
ASE2
ASTC
Adaptive Server cannot detect interserver deadlocks. Instead, it relies on dtm
lock timeout period. In Figure 5-2, after dtm lock timeout period has expired, the
transaction created for rpc2 is aborted. This causes Adaptive Server 2 to
report a failure in its work, and dxact1 is ultimately aborted as well.
The value of dtm lock timeout period applies only to distributed transactions.
Local transactions may use a lock timeout period with the server-wide lock wait
period parameter.
Note Adaptive Server does not use dtm lock timeout period to detect deadlocks
on system tables.
118
CHAPTER 5
dump on conditions
Summary information
Default value
Range of values
0 (off)
0 (off), 1 (on)
Status
Display level
Dynamic
Intermediate
Required role
Configuration group
System administrator
Group Diagnostics
Note The dump on conditions parameter is included for use only by Sybase
1 (on)
0 (off), 1 (on)
Status
Display level
Dynamic
Basic
Required role
Configuration groups
System administrator
Memory Use, Physical Memory
119
Configuration parameters
If dynamic allocation on demand is set to 0, all the memory required for any
dynamic configuration changes is allocated immediately. That is, when you
change the number of user connections from 100 to 200, the memory required
for the extra 100 user connections is immediately allocated.
enable backupserver HA
Summary information
Default value
Valid values
1
1 (enabled), 0 (disabled)
Status
Display level
Dynamic
Comprehensive
Required role
System administrator
Configuration group
enable cis
Summary information
Default value
1 (on)
Valid values
Status
0 (off), 1 (on)
Static
Display level
Required role
Comprehensive
System administrator
Configuration group
enable compression
120
Summary information
Default value
0 (off)
Valid values
Status
0 (off), 1 (on)
Static
Display level
Comprehensive
CHAPTER 5
Summary information
Required role
Configuration group
System administrator
SQL Server Administration
enable cis enables or disables data compression. See the Compression Users
Guide.
0 (off)
Valid values
0 (off), 1(on)
Status
Display level
Dynamic
10
Required role
Configuration groups
System administrator
SQL Server Administration
Adaptive Server sends no messages to the console (the messages are still sent
to the errorlog). Once enabled, enable console logging allows Adaptive Server
to send messages to the console and error log at all times.
enable DTM
Summary information
Default value
Valid values
0 (off)
0 (off), 1(on)
Status
Display level
Static
10
Required role
Configuration groups
System administrator
DTM Administration, SQL Server Administration
121
Configuration parameters
management (DTM) feature. When DTM is enabled, you can use Adaptive
Server as a resource manager in X/Open XA and MSDTC systems. You must
restart the server for this parameter to take effect. See the XA Interface
Integration Guide for CICS, Encina, and TUXEDO for more information about
using Adaptive Server in an X/Open XA environment. See Using Adaptive
Server Distributed Transaction Management Features for information about
transactions in MSDTC environments, and for information about Adaptive
Server native transaction coordination services.
0 (off)
Range of values
Status
0 (off), 1(on)
Dynamic
Display level
Required role
Comprehensive
System administrator
Configuration group
Security Related
You cannot set enable encrypted columns unless you have purchased, installed,
and registered the ASE_ENCRYPTION license on your server. Any attempt to
set it without such licensing results in Msg. 10834:
Configuration parameter 'enable encrypted columns'
cannot be enabled without license 'ASE_ENCRYPTION'
Note Using encrypted columns increases the logical memory used by 8198
kilobytes.
122
Summary information
Default value
0 (off)
Range of values
Status
0 (off), 1(on)
Static
Display level
Comprehensive
CHAPTER 5
Summary information
Required role
Configuration group
System administrator
Java Services
enable enterprise java beans enables and disables EJB Server in the Adaptive
Server database. You cannot use EJB Server until the Adaptive Server is
enabled for EJB Server.
1 (on)
Valid values
0 (off), 1 (on)
Status
Display level
Static
Comprehensive
Required role
Configuration group
System administrator
Component Integration Services
enable file access enables access through proxy tables to the external file
system. Requires a license for ASE_XFS.
1
0 (off), 1 (on)
Status
Display level
Static
Comprehensive
Required role
Configuration group
System administrator
Component Integration Services
123
Configuration parameters
Summary information
Range of values
Status
0 (off), 1 (on)
Dynamic
Display level
Required role
Intermediate
System administrator
Configuration group
enable functionality group enables or disables the changes available for these
Quoted identifiers
Unicode noncharacters
The default value for the parameters in this group depends on the value to
which enable functionality group is set. A value of DEFAULT for the individual
configuration parameters in this groupother than enable functionality group
means they are set to the same value as enable functionality group. That is, if you
set enable functionality group to 1, a value of DEFAULT for any other
configuration parameter in the group is 1.
Aside from the value for enable functionality group, you can ignore values of
DEFAULT in the output from sp_configure and sp_helpconfig for individual
configuration parameters in the Application Functionality group.
124
Summary information
Default value
0 (off)
Valid values
Status
0 (off), 1(on)
Dynamic
CHAPTER 5
Summary information
Display level
Required role
Comprehensive
System administrator
Configuration group
Application Functionality
enable inline default sharing enables Adaptive Server to share inline defaults.
That is, once this configuration is enabled, Adaptive Server looks for existing
shareable inline defaults having the same value in the database belonging to the
same user. If it finds an existing shareable default, Adaptive Server binds this
object to the column instead of creating a new default. However, if Adaptive
Server does not find an existing shareable inline default, it creates a new
default
See Defining Defaults and Rules for Data in the Transact-SQL Users Guide.
enable HA
Summary information
Default value
0 (off)
Range of values
Status
02
Static
Display level
Required role
Comprehensive
System administrator
Configuration group
125
Configuration parameters
Adaptive Server uses Sybase Failover to interact with the high availability
subsystem. You must set enable HA to 1 before you run the installhasvss script
(insthasv on Windows), which installs the system procedures for Sybase
Failover.
Note The license information and the run value for enable HA are independent
of each other. Whether or not you have a license for Sybase Failover, the run
value and the config value are set to 1 when you restart Adaptive Server. Until
you have a license, you cannot run Sybase Failover. If you have not installed a
valid license, Adaptive Server logs an error message and does not activate the
feature. See the installation guide for your platform for information about
installing license keys.
enable housekeeper GC
Summary information
Default value
Range of values
1 (on)
05
Status
Display level
Dynamic
Intermediate
Required role
Configuration group
System administrator
SQL Server Administration
The housekeeper garbage collection task performs space reclamation on dataonly-locked tables. When a user task deletes a row from a data-only-locked
table, a task is queued to the housekeeper to check the data and index pages for
committed deletes.
The housekeeper garbage collection task is controlled by enable housekeeper
GC. See Chapter 3, Using Engines and CPUs in the Performance and Tuning
Series: Basics.
These are valid values for enable housekeeper GC:
126
CHAPTER 5
0 disables the housekeeper garbage collection task, but enables the delete
commands lazy garbage collection. You must use reorg reclaim_space to
deallocate empty pages. This is the cheapest option with the lowest
performance impact, but it may cause performance problems if many
empty pages accumulate. Sybase recommends that you do not use this
value.
Valid values
Status
1 (enabled), 0 (disabled)
Static
Display level
Required role
Comprehensive
System administrator
Configuration group
Disk I/O
127
Configuration parameters
Set to 0
Set to 1
Note enable hp posix async i/o improves performance when you allocate
database devices on file systems, but may decrease performance on database
devices that are allocated on raw devices.
0
1 (enabled), 0 (disabled)
Status
Display level
Static
Comprehensive
Required role
Configuration group
System administrator
Shared Disk Cluster
Setting enable i/o fencing to 1 enables I/O fencing for each database device that
supports the SCSI-3 Persistent Group Reservation (PGR) standard.
enable java
Summary information
128
Default value
Range of values
0 (disabled)
0 (disabled), 1 (enabled)
Status
Display level
Static
Comprehensive
Required role
Configuration group
System administrator
Java Services
CHAPTER 5
enable java enables and disables Java in the Adaptive Server database. You
cannot install Java classes or perform any Java operations until the server is
enabled for Java.
0 (off)
0 (off), 1 (on)
Status
Display level
Dynamic
Comprehensive
Required role
System administrator
Configuration group
enable job scheduler determines whether Job Scheduler starts when Adaptive
Server starts.
0 (off)
Valid values
Status
Display level
Required role
Comprehensive
System security officer
Configuration group
Security Related
When enable ldap user auth is 1, Adaptive Server searches the LDAP server to
authenticate each user. If the LDAP authentication fails, Adaptive Server
searches syslogins to authenticate the user. Use level 1 when you are migrating
users from Adaptive Server authentication to LDAP authentication.
129
Configuration parameters
0
1 (enabled), 0 (disabled)
Status
Display level
Dynamic
Intermediate
Required role
Configuration group
System administrator
Query Tuning
parameterization.
1
0 (enabled), 1 (disabled)
Status
Display level
Dynamic
Comprehensive
Required role
Configuration group
System administrator
Security Related
Range of values
130
Status
Display level
Comprehensive
CHAPTER 5
Summary information
Required role
Configuration group
System administrator
Query Tuning
enable merge join enables or disables merge join at the server level.
The default value for merge join depends on current value of the optimization
goal configuration parameter:
Value for optimization goal
allrows_mix
allrows_dss
allrows_oltp
0 (off)
0 (off), 1 (on)
Status
Display level
Dynamic
Intermediate
Required role
Configuration group
System administrator
SQL Server Administration
enable metrics capture enables Adaptive Server to capture metrics at the server
level. Metrics for ad hoc statements are captured in the system catalogs;
metrics for statements in a stored procedure are saved in the procedure cache.
enable monitoring
Summary information
Default value
0 (off)
Range of values
Status
0 (off), 1(on)
Dynamic
Display level
Required role
Comprehensive
System administrator
Configuration group
Monitoring
131
Configuration parameters
Note Any data that populates the monitoring tables without enabling enable
monitoring should not be considered valid.
0 (off)
0 (off) allows only syslogins authentication.
1 (on) allows both PAM and syslogins authentication.
Status
Display level
Required role
Intermediate
System security officer
Configuration group
Security Related
enable pam user auth controls the ability to authenticate users using pluggable
authentication modules (PAM).
When enable pam user auth is set to 1, Adaptive Server uses the PAM provider
to authenticate each user. If the PAM authentication fails, Adaptive Server
searches syslogins to authenticate the user. Use level 1 when you are migrating
users from Adaptive Server authentication to PAM authentication.
enable pci
132
Summary information
Default value
0 (off)
Valid values
Status
Display level
Required role
Intermediate
System Administrator
Configuration group
User Environment
CHAPTER 5
enable pci enables or disables the Java PCI Bridge for Adaptive Server.
Note Do not use setting 2 (on with operating system override) unless
0 (off)
0 (off), 1(on)
Status
Display level
Dynamic
Comprehensive
Required role
Configuration group
System administrator
Application Functionality
noncharacters.
SeeAllowing Unicode noncharacters on page 372.
1 (on)
Range of values
Status
0 (off), 1 (on)
Dynamic
Display level
Required role
Intermediate
System administrator
Configuration group
Query Tuning
enable query tuning mem limit enables the query tuning memory limit.
1 (on)
133
Configuration parameters
Summary information
Range of values
Status
0 (off), 1 (on)
Intermediate
Display level
Required role
Intermediate
System administrator
Configuration group
Query Tuning
enable query tuning time limit enables the query tuning time limit.
1 (on)
Range of values
Status
0 (off), 1 (on)
Dynamic
Display level
Required role
Comprehensive
System administrator
Configuration group
enable real time messaging enables the real time messaging services.
1 (on)
Range of values
Status
0 (off), 1 (on)
Dynamic
Display level
Required role
Basic
System administrator
Configuration groups
enable rep agent threads enables the RepAgent thread within Adaptive Server.
Other steps are also required to enable replication. For more information, see
the Replication Server documentation.
134
CHAPTER 5
0 (off)
0 (off), 1 (on)
Status
Display level
Dynamic
Comprehensive
Required role
Configuration group
enable row level access control enables row level access control. You must have
the security services license key enabled before you can configure enable row
level access control.
0
1 (enabled), 0 (disabled)
Status
Display level
Dynamic
Comprehensive
Required role
Configuration group
System administrator
SQL Server Administration
0 (off)
Valid values
Status
0 (off), 1 (on)
Dynamic
Display level
Required role
Comprehensive
System administrator
Configuration group
Query Tuning
135
Configuration parameters
1 (on)
Valid values
Status
0 (off), 1 (on)
Static
Display level
Required role
Comprehensive
System administrator
Configuration group
Enables and disables the Adaptive Server SQL debugger, which allows you to
step through your T-SQL code.
enable ssl
Summary information
Default value
0 (off)
Valid values
Status
0 (off), 1 (on)
Static
Display level
Required role
Comprehensive
System security officer
Configuration group
Security Related
136
0 (off)
CHAPTER 5
Summary information
Valid values
Status
0 (off), 1 (on)
Dynamic
Display level
Required role
Comprehensive
System administration
Configuration group
Monitoring
1 (on)
Range of values
Status
0 (off), 1 (on)
Dynamic
Display level
Required role
Comprehensive
System administrator
Configuration group
Unicode
Range of values
Status
Display level
Dynamic
Comprehensive
137
Configuration parameters
Summary information
Required role
Configuration groups
System administrator
Languages, Unicode
enable unicode conversion activates character conversion using Unilib for the
char, varchar, and text datatypes.
1 (on)
Range of values
0 (off), 1 (on)
Status
Display level
Dynamic
Comprehensive
Required role
Configuration group
System administrator
Unicode
enable webservices
Summary information
138
Default value
Range of values
0
1 (enabled), 0 (disabled)
Status
Dynamic
CHAPTER 5
Summary information
Display level
Required role
Intermediate
System administrator
Configuration group
Enables Webservices.
1 (on)
0 (off), 1(on)
Status
Static
Display level
Required role
10
System administrator
Configuration group
DTM Administration
If this parameter is set to 0 (off), Adaptive Server does not coordinate the work
of remote servers. Transactions can still execute RPCs and update data using
CIS, but Adaptive Server cannot ensure that remote transactions are rolled
back with the original transaction or that remote work is committed along with
an original transaction, if remote servers experience a system failure. This
corresponds to the behavior of Adaptive Server versions earlier than version
12.x.
enable xml
Summary information
Default value
Range of values
Status
1 (enabled), 0 (disabled)
Dynamic
139
Configuration parameters
Summary information
Display level
Required role
Intermediate
System administrator
Configuration group
0
0 2147483647
Status
Dynamic
Display level
Required role
Configuration group
Physical Memory
engine memory log size is for diagnostic use only and has no relevance in a
production environment. It should be left at the default setting unless otherwise
requested by Sybase Tech Support.
Range of values
Status
01
Dynamic
Display level
Required role
Comprehensive
System administrator
Configuration group
Monitoring
errorlog pipe active controls whether Adaptive Server collects error log
messages. If both errorlog pipe active and errorlog pipe max messages are
enabled, Adaptive Server collects all the messages sent to the error log. Use
monErrorLog to retrieve these error log messages.
140
CHAPTER 5
0
02147483647
Status
Display level
Dynamic
Comprehensive
Required role
Configuration groups
System administrator
Memory Use, Monitoring
errorlog pipe max messages determines the number of error log messages
Adaptive Server stores per engine. The total number of messages in the
monSQLText table is the value of sql text pipe max messages times the number
of engines running.
8
015
Status
Display level
Dynamic
Comprehensive
Required role
Configuration group
System administrator
Extended Stored Procedure
esp execution priority sets the priority of the XP Server thread for ESP
execution. Over long periods of time ESPs can be CPU-intensive. Also, since
XP Server resides on the same machine as Adaptive Server, XP Server can
impact Adaptive Server performance.
See the Open Server Server-Library/C Reference Manual for information
about scheduling Open Server threads.
141
Configuration parameters
Platform dependent:
196608 Linux AMD-64, IBM PLinux, HP IA64,
Sun x86 64
139264 SunSparc64
65536 Sun Sparc32, Windows 32, IBM AIX 64,
Linux IA 32, Windows 64
Range of values
67584 HP 64
Platform default2147483647
Status
Display level
Static
Comprehensive
Required role
Configuration group
System administrator
Extended Stored Procedure
esp execution stacksize sets the size of the stack, in bytes, to be allocated for
ESP execution.
Use this parameter if you have your own ESP functions that require a larger
stack size than the default, 34816.
0 (off)
0 (off), 1 (on)
Status
Display level
Dynamic
Comprehensive
Required role
Configuration group
System administrator
Extended Stored Procedure
esp unload dll specifies whether DLLs that support ESPs should be
automatically unloaded from XP Server memory after the ESP call has
completed.
If esp unload dll is set to 0, DLLs are not automatically unloaded. If it is set to
1, they are automatically unloaded.
If esp unload dll is set to 0, you can still unload individual DLLs explicitly at
runtime, using sp_freedll.
142
CHAPTER 5
100
1 2147483647
Status
Display level
Static
Comprehensive
Required role
Configuration groups
System administrator
Memory Use, SQL Server Administration
event buffers per engine specifies the number of event buffers available for each
engine.
Events are used by Adaptive Server Monitor for observing Adaptive Server
performance; if you are not using Adaptive Server Monitor, set this parameter
to 1.
The value to which you set event buffers per engine depends on the number of
engines in your configuration, the level of activity on your Adaptive Server,
and the types of applications you are running.
Setting event buffers per engine to a low value may result in the loss of event
information. The default value is likely to be too low for most sites. Values of
2000 and greater may be more reasonable for general monitoring. However,
experiment to determine the appropriate value for your site.
In general, setting event buffers per engine to a high value may reduce the
amount of performance degradation that Adaptive Server Monitor causes
Adaptive Server.
Each event buffer uses 100 bytes of memory. To determine the total amount of
memory used by a particular value for event buffers per engine, multiply the
value by the number of Adaptive Server engines in your configuration.
LocalSystem
Name of an Windows machine on the network
configured to record Adaptive Server messages
LocalSystem
NULL
Status
Dynamic
143
Configuration parameters
Summary information
Display level
Required role
Comprehensive
System administrator
Configuration group
Error Log
event log computer name specifies the name of the Windows PC that logs
Adaptive Server messages in its Windows Event Log. This feature is available
on Windows servers only.
A value of LocalSystem or NULL specifies the default local system.
You can also use the Server Config utility to set the event log computer name
parameter by specifying the Event Log Computer Name under Event Logging.
Setting the event log computer name parameter with sp_configure or specifying
the Event Log Computer Name under Event Logging overwrites the effects of
the command line -G option, if it was specified. If Adaptive Server was started
with the -G option, you can change the destination remote machine by setting
event log computer name.
For more information about logging Adaptive Server messages to a remote
site, see the Configuration Guide for Windows.
Valid values
Status
0 (off), 1 (on)
Dynamic
Display level
Required role
Comprehensive
System administrator
Configuration group
Error Log
event logging enables and disables the logging of Adaptive Server messages in
the Windows Event Log.
144
CHAPTER 5
0
0 2147483647
Status
Display level
Calculated
Basic
Required role
Configuration group
System administrator
Memory Use
Adaptive Server executable and overhead. This a calculated value that is not
user-configurable.
0
0 31457280
Status
Display level
Static
Intermediate
Required role
Configuration group
System administrator
Cache Manager
Range of values
Status
01
Static
Display level
Required role
Comprehensive
System security officer
Configuration group
Security related
145
Configuration parameters
Adaptive Server uses the FIPS 140-2 certified Certicom security provider for
login encryption. If this configuration is not enabled, Adaptive Server uses the
OpenSSL security provider to perform login password encryption.
10
0100
Status
Display level
Dynamic
Intermediate
Required role
System administrator
Configuration group
Cache Manager
global async prefetch limit specifies the percentage of a buffer pool that can hold
the pages brought in by asynchronous prefetch that have not yet been read. This
parameter sets the limit for all pools in all caches for which the limit has not
been set explicitly with sp_poolconfig.
If the limit for a pool is exceeded, asynchronous prefetch is temporarily
disabled until the percentage of unread pages falls below the limit. See Chapter
6, Tuning Asynchronous Prefetch in the Performance and Tuning Series:
Basics.
Range of values
Status
1 64, as powers of 2
Static
Display level
Required role
Intermediate
System administrator
Configuration group
Cache Manager
global cache partition number sets the default number of cache partitions for all
data caches. The number of partitions for a particular cache can be set using
sp_cacheconfig; the local value takes precedence over the global value.
146
CHAPTER 5
4K
Valid values
Status
0 2147483647 bytes
Dynamic
Display level
Required role
Comprehensive
System administrator
Configuration groups
heap memory per user configures the amount of heap memory per user. A heap
memory pool is an internal memory created at start-up that tasks use to
dynamically allocate memory as needed. This memory pool is important if you
are running tasks that use wide columns, which require a lot of memory from
the stack. The heap memory allocates a temporary buffer that enables these
wide column tasks to finish. The heap memory the task uses is returned to the
heap memory pool when the task is finished.
The size of the memory pool depends on the number of user connections.
Sybase recommends that you set heap memory per user to three times the size
of your logical page.
20
Range of values
Status
1 100
Dynamic
Display level
Required role
Intermediate
System administrator
147
Configuration parameters
Summary information
Configuration group
histogram tuning factor controls the number of steps Adaptive Server analyzes
per histogram for update statistics, update index statistics, update all statistics,
and create index. A value of 1 disables the parameter.
Note For Adaptive Server versions 15.0.2 ESD #2 and later, if you set
histogram tuning factor to the default value of 20 and a large number of steps are
requested for the histogram, the actual step count used for the histogram is
limited to the value that reduces the procedure cache usage:
min (max (400, requested_steps),
histogram_tuning_factor X requested_steps)
Adaptive Server analyzes the histogram and compresses it into the resulting
histogram according to the following parameters:
The consecutive range steps are collapsed into the resulting step, so the
total weight of the collapsed step is no bigger than one-thirtieth of the
value.
148
Has range steps generated in a way similar for a 30-step update statistics,
and high frequency ranges are isolated as if the histogram were created
with 600 steps.
The total number of steps in the resulting histogram may differ between 30
and 600 values.
For equally distributed data, the value should be very close to 30.
More frequent values in the table means more steps in the histogram.
If a column has few different values, all those values may appear as highfrequency cells.
CHAPTER 5
You can achieve the same result by increasing the number of histogram steps to
600, but this uses more resources in the buffer and procedure cache
histogram tuning factor minimizes the resources histograms consume, and
increases resource usage only when it is in the best interest for optimization,
for example, when there is uneven distribution of data in a column, or highly
duplicated values within a column. In this situation, up to 600 histogram steps
are used. However, in most cases, histogram tuning factor uses the default value
(30 in the example above).
Range of values
Status
0100
Dynamic
Display level
Required role
Intermediate
System administrator
Configuration group
housekeeper free write percent specifies the maximum percentage by which the
149
Configuration parameters
The default value allows the housekeeper wash task to increase disk I/O by a
maximum of 1 percent. This results in improved performance and recovery
speed on most systems.
To disable the housekeeper wash task, set the value of housekeeper free write
percent to 0.
Set this value to 0 only if disk contention on your system is high, and it cannot
tolerate the extra I/O generated by the housekeeper wash task.
If you disable the housekeeper tasks, keep statistics current. Commands that
write statistics to disk are:
update statistics
dbcc checkdb (for all tables in a database) or dbcc checktable (for a single
table)
sp_flushstats
Run one of these commands on any tables that have been updated since the last
time statistics were written to disk, at the following times:
150
CHAPTER 5
1000
12147483647
Status
Display level
Dynamic
Comprehensive
Required role
Configuration group
System administrator
SQL Server Administration
i/o accounting flush interval specifies the amount of time, in machine clock ticks,
that Adaptive Server waits before flushing I/O statistics for each user from
sysprocesses to syslogins. This is used for charge-back accounting.
When a user logs in to Adaptive Server, the server begins accumulating I/O
statistics for that user process in sysprocesses. When the value of i/o accounting
statistics interval is exceeded, or a user logs off Adaptive Server, the
accumulated I/O statistics for that user are flushed from sysprocesses to
syslogins. These statistics continue accumulating in syslogins until you clear
the totals by using sp_clearstats. You can display the current totals from
syslogins by using sp_reportstats.
The value to which you set i/o accounting flush interval depends on the type of
reporting you intend to do. If you run reports on a monthly basis, set i/o
accounting flush interval to a relatively high value. With infrequent reporting, it
is less critical that the data in syslogins be updated frequently.
If you perform periodic ad hoc selects on the totio column syslogins to
determine I/O volume by process, set i/o accounting flush interval to a lower
value. Doing so increases the likelihood of the data in syslogins being current
when you execute your selects.
If you do not report on I/O statistics at all, set i/o accounting flush interval to its
maximum value. This reduces the number of times syslogins is updated and the
number of times its pages must be written to disk.
100
12147483647
Status
Dynamic
151
Configuration parameters
Summary information
Display level
Required role
Comprehensive
System administrator
Configuration group
i/o batch size sets the number of writes issued in a batch before the task goes to
sleep. Once this batch is completed, the task is woken up, and the next batch of
writes are issued, ensuring that the I/O subsystem is not flooded with many
simultaneous writes. Setting i/o batch size to the appropriate value can improve
the performance of operations like checkpoint, dump database, select into, and
so on.
10
Range of values
Status
1 2147483647
Dynamic
Display level
Required role
Comprehensive
System administrator
Configuration group
Note i/o polling process count functions only when you configure Adaptive
Server for process kernel mode; it is nonfunctional for threaded kernel mode.
i/o polling process count specifies the maximum number of processes that
Adaptive Server can run before the scheduler checks for disk and network I/O
completions. Tuning i/o polling process count affects both the response time and
throughput of Adaptive Server.
Adaptive Server checks for disk or network I/O completions:
If the number of tasks run since the last time Adaptive Server checked for
I/O completions equals the value for i/o polling process count, and
As a general rule, increasing the value of i/o polling process count increases
throughput for applications that generate a lot of disk and network I/O.
Conversely, decreasing the value improves process response time in these
applications, possibly at the risk of lowering throughput.
152
CHAPTER 5
If your applications create both I/O and CPU-bound tasks, tuning i/o polling
process count to a low value (1 2) ensures that I/O-bound tasks get access to
CPU cycles.
For OLTP applications (or any I/O-bound application with user connections
and short transactions), tuning i/o polling process count to a value in the range
of 20 30 may increase throughput, but may also increase response time.
When tuning i/o polling process count, consider these other parameters:
sql server closk tick length, which specifies the duration of the Adaptive
Server clock tick in microseconds. See sql server clock tick length on
page 256.
time slice, which specifies the number of clock ticks the the Adaptive
Server scheduler allows a user process to run. See time slice on page
271.
cpu grace time, which specifies the maximum amount of time, in clock
ticks, a user process can run without yielding the CPU before Adaptive
Server preempts it and terminates it with a timeslice error. See cpu grace
time on page 104.
Use sp_sysmon to determine the effect of changing i/o polling process count.
See the Performance and Tuning Series: Monitoring Adaptive Server with
sp_sysmon.
5000
Range of values
Status
19999999
Static
Display level
Required role
Intermediate
System administrator
Configuration group
IDENTITY columns are of type numeric and scale zero whose values are
generated by Adaptive Server. Column values can range from a low of 1 to a
high determined by the column precision.
153
Configuration parameters
For each table with an IDENTITY column, Adaptive Server divides the set of
possible column values into blocks of consecutive numbers, and makes one
block at a time available in memory. Each time you insert a row into a table,
Adaptive Server assigns the IDENTITY column the next available value from
the block. When all the numbers in a block have been used, the next block
becomes available.
This method of choosing IDENTITY column values improves server
performance. When Adaptive Server assigns a new column value, it reads the
current maximum value from memory and adds 1. Disk access becomes
necessary only after all values within the block have been used. Because all
remaining numbers in a block are discarded in the event of server failure (or
shutdown with nowait), this method can lead to gaps in IDENTITY column
values.
Use identity burning set factor to change the percentage of potential column
values that is made available in each block. This number should be high
enough for good performance, but not so high that gaps in column values are
unacceptably large. The default value, 5000, releases .05 percent of the
potential IDENTITY column values for use at one time.
To get the correct value for sp_configure, express the percentage in decimal
form, and then multiply it by 10 7 (10,000,000). For example, to release 15
percent (.15) of the potential IDENTITY column values at a time, specify a
value of .15 times 107 (or 1,500,000) in sp_configure.
Range of values
Status
12147483647
Dynamic
Display level
Required role
Intermediate
System administrator
Configuration group
identity grab size allows each Adaptive Server process to reserve a block of
IDENTITY column values for inserts into tables that have an IDENTITY
column.
154
CHAPTER 5
This is useful if you are performing inserts, and you want all the inserted data
to have contiguous IDENTITY numbers. For instance, if you are entering
payroll data, and you want all records associated with a particular department
to be located within the same block of rows, set identity grab size to the number
of records for that department.
identity grab size applies to all users on Adaptive Server. Large identity grab size
values result in large gaps in the IDENTITY column when many users insert
data into tables with IDENTITY columns.
Sybase recommends that you set identity grab size to a value large enough to
accommodate the largest group of records you want to insert into contiguous
rows.
Range of values
Status
12147483647
Dynamic
Display level
Required role
Comprehensive
System administrator
Configuration group
identity reservation size sets a limit for the number of identity values.
60
Valid values
Status
0 32767
Dynamic
Display level
Required role
Comprehensive
System administrator
Configuration group
idle migration timeout specifies the amount of time after which an idle
155
Configuration parameters
Setting idle migration timeout to a high value slows down a graceful shutdown
because the instance must wait the specified period of time for all idle
connections that issued a migration request without the client having initiated
migration.
1 (in minutes)
1 600
Status
Display level
Dynamic
Comprehensive
Required role
System administrator
Configuration group
job scheduler interval sets the interval when the Job Scheduler checks which
156
Summary information
Default value
Range of values
Status
1 640
Dynamic
Display level
Required role
Comprehensive
System administrator
Configuration group
CHAPTER 5
job scheduler tasks sets the maximum number of jobs that can run
simultaneously through Job Scheduler.
Note If you increase the value of job scheduler tasks to a higher value, you
must increase the value for number of user connections by at least twice the
value you incremented job scheduler tasks before starting the Job Scheduler.
However, if the Adaptive Server running the scheduled jobs is the same
Adaptive Server that is hosting the Job Scheduler, you must increase the value
for number of user connections by three times the value you incremented job
scheduler tasks before starting the Job Scheduler.
Increasing the number of user connections may require that you increase the
value for max memory.
80
1 32768
Status
Display level
Dynamic
Comprehensive
Required role
Configuration group
System administrator
SQL Server Administration
js job output width determines the line width the output uses for jobs stored in the
js_output table.
kernel mode
Summary information
Default value
threaded
Range of values
Status
Static
Display level
Required role
Basic
System administrator
Configuration group
threaded or process
157
Configuration parameters
kernel mode determines the mode the Adaptive Server kernel uses, threaded or
process. In threaded mode, Adaptive Server uses operating system threads to
support Adaptive Server engines and specialized tasks. In this mode, Adaptive
Server is a single process running on the operating system. In process mode,
Adaptive Server uses individual processes to support Adaptive Server engines.
In this mode, each engine is a distinct process running on the operating system.
The process mode is the same kernel used by Adaptive Server versions earlier
than 15.7.
Note Adaptive Server supports only threaded kernel mode on the Windows
platform.
The values for kernel mode are character data, so you must use 0 as a
placeholder for the second sp_configure parameter, which must be numeric,
and specify threaded or process as the third parameter. See Unit specification
using sp_configure on page 64.
Sybase assumes you use threaded mode in your production server, and includes
process mode for backward compatibilty. Process mode may not support
features for Adaptive Server 15.7 and later.
See Chapter 5, Managing Multiprocessor Servers, in the System
Administration Guide: Volume 2.
158
Default value
Solaris 6184
Range of values
Status
Display level
Dynamic
Basic
Required role
Configuration group
System administrator
Phsyical Memory
CHAPTER 5
kernel resource memory determines the size, in 2K pages, of the kernel resource
memory pool from which all thread pools and other kernel resources are
allocated memory. The amount of memory available for kernel resource
memory depends on the value of max memory. If max memory has an
insufficient amount of memory to allocate to kernel resource memory, Adaptive
Server issues an error message that includes the value to which you must raise
max memory.
license information
Summary information
Default value
25
Valid values
Status
0231
Dynamic
Display level
Required role
Comprehensive
System administrator
Configuration group
If license information is set to 0, Adaptive Server does not monitor license use.
If license information is set to a number greater than 0, the housekeeper chores
task monitors the number of licenses used during the idle cycles in Adaptive
Server. Set license information to the number of licenses specified in your
license agreement.
If the number of licenses used is greater than the number to which license
information is set, Adaptive Server writes this message to the error log:
159
Configuration parameters
At the end of each 24-hour period, the maximum number of licenses used
during that time is added to the syblicenseslog table. The 24-hour period
restarts if Adaptive Server is restarted.
See Chapter 3, Managing Adaptive Server Logins and Database Users, in the
Security Administration Guide.
100
12147483647
Status
Display level
Static
Comprehensive
Required role
Configuration group
System administrator
Lock Manager
For Adaptive Servers running with multiple engines, the address lock spinlock
ratio sets the number of rows in the internal address locks hash table that are
protected by one spinlock.
Adaptive Server manages the acquiring and releasing of address locks using an
internal hash table with 1031 rows (known as hash buckets). This table can use
one or more spinlocks to serialize access between processes running on
different engines.
The default value for address lock spinlock ratio defines 11 spinlocks for the
address locks hash table. The first 10 spinlocks protect 100 rows each, and the
eleventh spinlock protects the remaining 31 rows. If you specify a value of
1031 or greater for address lock spinlock ratio, Adaptive Server uses only 1
spinlock for the entire table.
160
Default value
Range of values
2048
12147483647
Status
Display level
Static
Comprehensive
CHAPTER 5
Summary information
Required role
Configuration groups
System administrator
Lock Manager, Memory Use
lock hashtable size specifies the number of hash buckets in the lock hash table.
This table manages all row, page, and table locks, and all lock requests. Each
time a task acquires a lock, the lock is assigned to a hash bucket, and each lock
request for that lock checks the same hash bucket. Setting this value too low
results in large numbers of locks in each hash bucket and slows the searches.
On Adaptive Servers with multiple engines, setting this value too low can also
lead to increased spinlock contention. Do not set the value to less than the
default value, 2048.
lock hashtable size must be a power of 2. If the value you specify is not a power
of 2, sp_configure rounds the value to the next highest power of 2 and prints an
informational message.
The optimal hash table size is a function of the number of distinct objects
(pages, tables, and rows) that can be locked concurrently. The optimal hash
table size is at least 20 percent of the number of distinct objects that need to be
locked concurrently. See the Performance and Tuning Series: Locking and
Concurrency Control.
However, if you have a large number of users and have had to increase the
number of locks parameter to avoid running out of locks, use sp_sysmon to
check the average hash chain length at peak periods. If the average length of
the hash chains exceeds 4 or 5, consider increasing the value of lock hashtable
size from its current setting to the next power of 2.
The hash chain length may be high during large insert batches, such as bulk
copy operations. This is expected behavior, and does not require you to reset
lock hashtable size.
lock scheme
Summary information
Default value
Range of values
allpages
allpages, datapages, datarows
Status
Display level
Dynamic
Comprehensive
Required role
Configuration group
System administrator
Lock Manager
161
Configuration parameters
lock scheme sets the default locking scheme to be used by create table and
select into commands when a lock scheme is not specified in the command.
The values for lock scheme are character data, so you must use 0 as a
placeholder for the second parameter, which must be numeric, and specify
allpages, datapages, or datarows as the third parameter:
sp_configure "lock scheme", 0, datapages
0 (off)
0 (off), 1 (on)
Status
Display level
Static
Comprehensive
Required role
Configuration group
System administrator
Physical Memory
lock shared memory disallows swapping of Adaptive Server pages to disk and
allows the operating system kernel to avoid the servers internal page locking
code. This can reduce disk reads, which are expensive.
Not all platforms support shared memory locking. Even if your platform does,
lock shared memory may fail due to incorrectly set permissions, insufficient
physical memory, or for other reasons. See operating system documentation for
your platform for information on shared memory locking.
162
Default value
Range of values
85
12147483647
Status
Display level
Static
Comprehensive
Required role
Configuration groups
System administrator
Lock Manager, Memory Use
CHAPTER 5
Adaptive Server manages the acquiring and releasing of locks using an internal
hash table with a configurable number of hash buckets. On SMP systems, this
hash table can use one or more spinlocks to serialize access between processes
running on different engines. To set the number of hash buckets, use lock
hashtable size.
For Adaptive Servers running with multiple engines, lock spinlock ratio sets a
ratio that determines the number of lock hash buckets that are protected by one
spinlock. If you increase lock hashtable size, the number of spinlocks
increases, so the number of hash buckets protected by one spinlock remains the
same.
The Adaptive Server default value for lock spinlock ratio is 85. With lock
hashtable size set to the default value of 2048, the default spinlock ratio defines
26 spinlocks for the lock hash table. See Chapter 5, Managing Mulitprocessor
Servers, in System Administration Guide: Volume 2.
sp_sysmon reports on the average length of the hash chains in the lock hash
table. See the Performance and Tuning Series: Monitoring Adaptive Server
with sp_sysmon.
20
Range of values
Status
12147483647
Static
Display level
Required role
Comprehensive
System administrator
Configuration group
Lock Manager
For Adaptive Servers running with multiple engines, table lock spinlock ratio
sets the number of rows in the internal table locks hash table that are protected
by one spinlock.
Adaptive Server manages the acquiring and releasing of table locks using an
internal hash table with 101 rows (known as hash buckets). This table can use
one or more spinlocks to serialize access between processes running on
different engines.
163
Configuration parameters
The Adaptive Server default value for table lock spinlock ratio is 20, which
defines 6 spinlocks for the table locks hash table. The first 5 spinlocks protect
20 rows each; the sixth spinlock protects the last row. If you specify a value of
101 or greater for table lock spinlock ratio, Adaptive Server uses only 1 spinlock
for the entire table.
1 (off)
0 (on), 1 (off)
Status
Dynamic
Display level
Required role
Comprehensive
System administrator
Configuration group
Monitoring
lock timeout pipe active controls whether Adaptive Server collects lock timeout
messages. If lock timeout pipe active and lock timeout pipe max messages are
enabled, Adaptive Server collects the data for each lock timeout that occurs.
Retrieve the lock timeout messages from the monLockTimeout monitor table.
Range of values
Status
0 - 2147483648
Dynamic
Display level
Required role
Comprehensive
System administrator
Configuration group
Monitoring
lock timeout pipe max messages controls the maximum number of rows per
engine in the lock timeout pipe, which determines the maximum number of
rows that can be returned by the monLockTimeout monitoring table.
164
CHAPTER 5
2147483647
0 2147483647
Status
Display level
Dynamic
Comprehensive
Required role
Configuration group
System administrator
Lock Manager
lock wait period limits the number of seconds that tasks wait to acquire a lock
on a table, data page, or data row. If the task does not acquire the lock within
the specified time period, Adaptive Server returns error message 12205 to the
user and rolls back the transaction.
The lock wait option of the set command sets a session-level number of seconds
that a task waits for a lock. It overrides the server-level setting for the session.
lock wait period, used with the session-level setting set lock wait nnn, is
applicable only to user-defined tables. These settings have no influence on
system tables.
At the default value, all processes wait indefinitely for locks. To restore the
default value, reset the value to 2147483647 or enter:
sp_configure "lock wait period", 0, "default"
0 (off)
0 (off), 1 (on)
Status
Display level
Dynamic
Comprehensive
Required role
Configuration group
System administrator
Error Log
log audit logon failure specifies whether to log unsuccessful Adaptive Server
logins to the Adaptive Server error log and, on Windows servers, to the
Windows Event Log, if event logging is enabled.
165
Configuration parameters
0 (off)
0 (off), 1 (on)
Status
Display level
Dynamic
Comprehensive
Required role
Configuration group
System administrator
Error Log
log audit logon success specifies whether to log successful Adaptive Server
logins to the Adaptive Server error log and, on Windows servers, to the
Windows Event Log, if event logging is enabled.
Platform dependent
1 platform-dependent value
Status
Display level
Static
Comprehensive
Required role
Configuration group
System administrator
O/S Resources
max async i/os per engine specifies the maximum number of outstanding
asynchronous disk I/O requests for a single engine at one time.
On the Linux platform, max async i/os per engine controls the number of
asynchronous IOs reserved from the operating system.
In threaded mode, Adaptive Server reserves the value for max async i/os per
engine for the engine server. In process mode, Adaptive Server reserves the
value for max async i/os per engine for each engine. For example, if you set max
async i/os per engine to 4096 and there are 4 engines, in threaded mode
Adaptive Server reserves 4096 I/Os, but in process mode Adaptive Server
reserves 16384 I/Os.
Your system may benefit from using a number greater than the default value.
166
CHAPTER 5
You can use sp_sysmon to help tune max async i/os per engine. sp_sysmons
disk i/o section contains information about the maximum number of
outstanding IOs for each engine during the sample period and the number of
I/Os that were delayed because of engine or operating system limits. Generally,
any I/Os delayed by engine limits indicate that you should increase the value
of max async i/os per engine.
Whether Adaptive Server can perform asynchronous IO on a device depends
on whether or not this device support kernel asynchronous I/O (KAIO). The
Linux kernel requires that you implement kernel asynchronous I/O support at
the file system level. Most major file systems provide support for kernel
asynchronous I/O, including ext3, xfs, jfs, and raw devices. The tmpfs file
system does not support kernel asynchronous I/O. If the device does not
support kernel asynchronous I/O, Adaptive Server cannot perform
asyncronous IO on that device, and instead reverts to standard synchronous IO
for all reads and writes to that device. Adaptive Server prints a message similar
to the following in the error log indicating that the device has switched to
synchronous IO:
00:00000:00001:2006/12/15 11:47:17.98 kernel Virtual device
'/dev/shm/tempdb.dat' does not support kernel asynchronous i/o. Synchronous i/o
will be used for this device.
Platform dependent
Range of values
Status
Display level
Required role
Comprehensive
System administrator
Configuration group
O/S Resources
max async i/os per server specifies the maximum number of asynchronous disk
I/O requests that can be outstanding for Adaptive Server at one time. This limit
is not affected by the number of online engines per Adaptive Server. max async
i/os per engine limits the number of outstanding I/Os per engine.
167
Configuration parameters
Most operating systems limit the number of asynchronous disk I/Os that can be
processed at any one time; some operating systems limit the number per
operating system process, some limit the number per system, and some do
both. If an application exceeds these limits, the operating system returns an
error message. Because operating system calls are relatively expensive, it is
inefficient for Adaptive Server to attempt to perform asynchronous I/Os that
get rejected by the operating system.
To avoid this, Adaptive Server maintains a count of the outstanding
asynchronous I/Os per engine and per server; if an engine issues an
asynchronous I/O that would exceed either max async i/os per engine or max
async i/os per server, Adaptive Server delays the I/O until enough outstanding
I/Os have completed to fall below the exceeded limit.
For example, assume an operating system limit of 200 asynchronous I/Os per
system and 75 per process and an Adaptive Server with three online engines.
The engines currently have a total of 200 asynchronous I/Os pending,
distributed according to the following table:
Engine
Number of
I/Os pending
60
Engine 0 delays any further asynchronous I/Os until the total for the server is under the
operating system per-system limit and then continues issuing asynchronous I/Os.
75
65
Engine 1 delays any further asynchronous I/Os until the per-engine total is under the
operating system per-process limit and then continues issuing asynchronous I/Os.
Engine 2 delays any further asynchronous I/Os until the total for server is under the
operating system per-system limit and then continues issuing asynchronous I/Os.
Outcome
All I/Os (both asynchronous and synchronous) require a disk I/O structure, so
the total number of outstanding disk I/Os is limited by the value of disk i/o
structures. It is slightly more efficient for Adaptive Server to delay the I/O
because it cannot get a disk I/O structure than because the I/O request exceeds
max i/os per server. Set max async i/os per server equal to the value of disk i/o
structures. See disk i/o structures on page 116.
If the limits for asynchronous I/O can be tuned on your operating system, make
sure they are set high enough for Adaptive Server. There is no penalty for
setting them as high as needed.
Use sp_sysmon to see if the per server or per engine limits are delaying I/O on
your system. If sp_sysmon shows that Adaptive Server exceeded the limit for
outstanding requests per engine or per server, raise the value of the
corresponding parameter. See the Performance and Tuning Series: Monitoring
Adaptive Server with sp_sysmon.
168
CHAPTER 5
0
02147483647
Status
Display level
Dynamic
Basic
Required role
Configuration group
System administrator
Component Integration Services
0
1 number of engines at start-up minus 1
Status
Display level
Dynamic
Comprehensive
Required role
Configuration group
System administrator
Backup/Recovery
169
Configuration parameters
max memory
Summary information
Default value
Range of values
Platform-dependent
Platform-dependent minimum 2147483647
Status
Display level
Dynamic
Basic
Required role
Configuration groups
System administrator
Memory Use, Physical Memory
max memory specifies the maximum amount of total physical memory that you
can configure Adaptive Server to allocate. max memory must be greater than
When allocate max shared memory is set to 1, Adaptive Server must have the
amount of memory available that is specified by max memory. If the memory
is not available, Adaptive Server does not start. If this occurs, reduce the
memory requirements for Adaptive Server by manually changing the value of
max memory in the servers configuration file. You can also change the value
of allocate max shared memory to 0 so that not all memory required by max
memory is required at start-up.
You may also want to reduce the values for other configuration parameters that
require large amounts of memory. Then restart Adaptive Server to use the
memory specified by the new values. If Adaptive Server fails to start because
the total of other configuration parameter values is higher than the max memory
value, see Chapter 3, Configuring Memory, in System Administration
Guide: Volume 2 for information about configuration parameters that use
memory.
170
CHAPTER 5
50
50 1000
Status
Display level
Dynamic
Intermediate
Required role
Configuration group
System administrator
User Environment
50
16 100
Status
Display level
Static
Comprehensive
Required role
Configuration group
System administrator
User environment
maximum nesting level sets the maximum nesting level for stored procedures
and triggers. Each increased nesting level requires about 160 bytes of
additional memory. For example, if you increase the nesting level from 16 to
26, Adaptive Server requires an additional 1600 bytes of memory.
512
171
Configuration parameters
Summary information
Range of values
Status
51265024
Static
Display level
Required role
Intermediate
System administrator
Configuration group
Network Communication
max network packet size specifies the maximum network packet size that can
be requested by clients communicating with Adaptive Server.
If some of your applications send or receive large amounts of data across the
network, these applications can achieve significant performance improvement
by using larger packet sizes. Two examples are large bulk copy operations and
applications that read or write large text, unitext, and image values.
Generally, you want:
default network packet size to be small for users who perform short queries,
and
max network packet size to be large enough to allow users who send or
receive large volumes of data to request larger packet sizes.
max network packet size must always be as large as, or larger than, the default
network packet size. Values that are not even multiples of 512 are rounded
down.
For client applications that explicitly request a larger network packet size to
receive, you must also configure additional network memory. See additional
network memory on page 82.
Open Client Server cannot accept a network packet size greater than 64K.
See bcp and isql in the Utility Guide for information on using larger packet sizes
from these programs. Open Client Client-Library documentation includes
information on using variable packet sizes.
Choosing packet sizes
For best performance, choose a server packet size that works efficiently with
the underlying packet size on your network. The goals are:
172
CHAPTER 5
For example, if your network packet size carries 1500 bytes of data, setting the
Adaptive Server packet size to 1024 (512*2) will probably achieve better
performance than setting it to 1536 (512*3). Figure 5-3 shows how four
different packet size configurations would perform in such a scenario.
Figure 5-3: Factors in determining packet size
Data
Unused
After you determine the available data space of the underlying packets on your
network, perform your own benchmark tests to determine the optimum size for
your configuration.
173
Configuration parameters
Use sp_sysmon to see how changing max network packet size affects network
I/O management and task switching. For example, try increasing max network
packet size and then checking sp_sysmon output to see how this affects bcp for
large batches. See the Performance and Tuning Series: Monitoring Adaptive
Server with sp_sysmon.
5
02147483647
Status
Static
Display level
Required role
Comprehensive
System administrator
Configuration groups
Each master port has one network listener. Generally, there is no need to have
multiple master ports, unless your Adaptive Server must communicate over
more than one network type. Some platforms support both socket and TLI
(Transport Layer Interface) network interfaces. See the Configuration Guide
for your platform for information on supported network types.
Range of values
174
Status
Display level
Static
Intermediate
Required role
Configuration groups
System administrator
Memory Use, Processors
CHAPTER 5
max online engines places an upper limit of the number of engine threads that
can be brought online. It does not take into account the number of CPUs
available at start-up, and allows users to add CPUs at a later date. See Chapter
5, Managing Mulitprocessor Servers, in System Administration Guide:
Volume 2 for a detailed discussion of how to set this parameter for your SMP
environment.
At start-up, Adaptive Server starts with a single engine thread and completes
its initialization, including recovery of all databases. Its final task is to allocate
additional server engines. Each engine accesses common data structures in
shared memory.
When tuning the max engines online parameter:
Never have more engine threads online than there are CPUs.
max engines online must be large enough to allow Adaptive Server to bring
all the engine thread pools online simultaneously.
You can achieve better throughput by running fewer engine threads with
high CPU use, rather than by running more engine threads with low CPU
use.
See Chapter 3, Using Engines and CPUs in the Performance and Tuning
Series: Basics .
Range of values
Status
0 127
Static
Display level
Required role
Comprehensive
System administrator
175
Configuration parameters
Summary information
Configuration group
Processors
(Process mode only) max online Q engines specifies the maximum number of
Q engines you can have online, and is required for MQ (see the Active
Messaging documentation).
The maximum number of Q engines depends on the value of max online
engines:
max online Q engines cannot be greater than max online engines minus
number of engines at startup. That is, if the value for max online engines is
57, and the value for number of engines at startup is 28, the value for max
online Q engines cannot be greater than 29.
Setting max online Q engines reserves the high range of max online engines
for Q engines. Once you set max online Q engines, Adaptive Server
engines can no longer use the engines in the range that is reserved for Q
engines. For example, if you set max online engines to 10 and set max
online Q engines to 4:
176
Summary information
Default value
Range of values
Status
1255
Dynamic
Display level
Required role
Basic
System administrator
Configuration group
Query Tuning
CHAPTER 5
Adaptive Server forces serial query execution and the optimizer may
select plans with a higher parallel degree than if it is disabled.
Changing max parallel degree causes all query plans in the procedure cache to
be invalidated, and new plans are compiled the next time you execute a stored
procedure or trigger.
See Chapter 9, Parallel Sorting in the Performance and Tuning Series: Query
Processing and Abstract Plans.
Range of values
Status
0 30
Static
Display level
Required role
Comprehensive
System administrator
Configuration group
User Environment
Sets the maximum number of PCI slots Adaptive Server allows. The values
are:
177
Configuration parameters
slots.
For more information about PCI slots, see Java in Adaptive Server Enterprise.
1
1 255
Status
Display level
Static
Comprehensive
Required role
Configuration group
System administrator
Query Tuning
178
Default value
Range of values
1
1 value of max parallel degree
Status
Display level
Dynamic
Comprehensive
Required role
Configuration group
System administrator
Query Tuning
CHAPTER 5
10
Range of values
Status
1 100
Dynamic
Display level
Required role
Comprehensive
System administrator
Configuration group
Query Tuning
Range of values
Status
1255
Dynamic
Display level
Required role
Basic
System administrator
Configuration group
Query Tuning
179
Configuration parameters
max scan parallel degree applies per table or index; that is, if max scan parallel
degree is 3, and one table in a join query is scanned using a hash-based table
scan and the second can best be accessed by a hash-based index scan, the query
can use 9 worker processes (as long as max scan parallel degree is set to 9 or
higher.
The optimizer uses max scan parallel degree as a guideline when it selects the
number of processes to use for parallel, nonpartition-based scan operations. It
does not apply to parallel sort. Because there is no partitioning to spread the
data across devices, parallel processes can be accessing the same device during
the scan. This can cause additional disk contention and head movement, which
may degrade performance. To prevent multiple disk accesses from becoming a
problem, use max scan parallel degree to reduce the maximum number of
processes that can access the table in parallel.
If this number is too low, the performance gain for a given query is not as
significant as possible; if the number is too large, the server may compile plans
that use enough processes to make disk access less efficient. A general rule is
to set this parameter to no more than 2 or 3, because it takes only 2 to 3 worker
processes to fully utilize the I/O of a given physical device.
Set the value of max scan parallel degree to less than or equal to the current
value of max parallel degree. Adaptive Server returns an error if you specify a
number larger than the max parallel degree value.
If you set max scan parallel degree to 1, Adaptive Server does not perform hashbased scans.
Changing max scan parallel degree causes all query plans in the procedure
cache to be invalidated, and new plans are compiled the next time you execute
a stored procedure or trigger.
180
Summary information
Default value
Range of values
Status
02147483647
Static
Display level
Required role
Comprehensive
System administrator
Configuration groups
CHAPTER 5
max SQL text monitored specifies the amount of memory allocated per user
connection for saving SQL text to memory shared by Adaptive Server Monitor.
If you do not allocate enough memory for the batch statements, the text you
want to view may be truncated. Sybase recommends that you use an initial
value of 1024 bytes of memory per user connection.
The total memory allocated from shared memory for the SQL text is the
product of max SQL text monitored multiplied by the currently configured
number of user connections.
10
Range of values
Status
1 255
Dynamic
Display level
Required role
Comprehensive
System administrator
Configuration group
max transfer history controls how many transfer history entries Adaptive Server
retains in the spt_TableTransfer table in each database. For each table tracked,
spt_TableTransfer retains:
time you initiate a transfer for that table. The tables successful transfer entries
are cleared if the transfer succeeds. If the transfer is unsuccessful, its failed
transfer entries are cleared.
For example, if a table has 12 successful and 9 unsuccessful history entries in
spt_configure, and you change max transfer history to 5, the next successful
transfer of that table places 5 successful entries in spt_configure, but
spt_configure retains the previous 9 failed entries.
181
Configuration parameters
10
10100
Status
Display level
Static
Intermediate
Required role
Configuration group
System administrator
Group Diagnostics
maximum dump conditions sets the maximum number of conditions you can
2048
500 65535
Status
Display level
Dynamic
Comprehensive
Required role
Configuration group
System administrator
Query Tuning
maximum buffers per lava opeator sets an upper limit for the number of buffers
used by Lava operators that perform sorting or hashing (which are expensive
in terms of processing). Lava operators use buffers from the sessions tempdb
data cache pool as a work area for processing rows.
Lava operators often recurse through their input streams. Sorting requires
subsequent merge passes until there are enough buffers available to merge all
of the remaining runs. Hashing requires subsequent passes to build hash tables
on any spilled sets until all of the remaining data can fit into an in-memory hash
table. Some queries require less I/O if you increase max buffers per lava
operator. This is particularly true for queries that use the HASH DISTINCT,
HASH VECTOR AGGREGATE, and HASH UNION operators.
182
CHAPTER 5
Be careful when you increase the default value of maximum buffers per lava
operator for servers with many concurrent users: Adaptive Server may allocate
more buffers solely for expensive operators, reducing the number of buffers
available for caching users tables and other sessions worktables. Use
sp_sysmon to analyze tempdb's data caching effectiveness.
maximum buffers per lava operator works with max resource granularity to limit
the number of buffers used. The limit is set to the minimum of:
See number of sort buffers on page 216 for information about setting the
amount of memory allocated for sort buffers.
Range of values
Status
-1 32767
Dynamic
Display level
Required role
10
System security officer
Configuration group
Security Related
maximum failed logins allows you to set the server-wide maximum number of
failed login attempts for logins and roles.
A value of -1 indicates that the failed login count in the syslogins column
logincount is updated whenever an authentication failure occurs, but that the
account is not locked. Compare with a 0 (zero) value, which avoids
incrementing the column for every failed authentication and avoids locking the
account due to authentication failures.
See the Reference Manual: Procedures for information about using
sp_modifylogin to change the maximum failed logins for a specific role. See the
Reference Manual: Commands for information about using alter role to change
the maxiumum failed logins.
183
Configuration parameters
32768
02147483647
Status
Display level
Dynamic
Comprehensive
Required role
Configuration group
System administrator
SQL Server Administration
maximum job output sets limit, in bytes, on the maximum output a single job can
produce. If a job produces more output than specified in maximum job output,
all the data returned above the value you enter is discarded.
Status
Static
Display level
Required role
Comprehensive
System administrator
Configuration group
Cache Manager
184
CHAPTER 5
1024
10242147483647
Status
Display level
Dynamic
Basic
Required role
Configuration group
System administrator
Memory Use
memory per worker process specifies the amount of memory, in bytes, used by
worker processes. Each worker process requires memory for messaging during
query processing. This memory is allocated from a shared memory pool; the
size of this pool is memory per worker process multiplied by number of worker
processes. For most query processing, the default size is more than adequate.
If you use dbcc checkstorage, and have set number of worker processes to 1, you
may need to increase memory per worker process to 1792 bytes.
messaging memory
Summary information
Default value
Range of values
400
60 2147483647
Status
Display level
Dynamic
Intermediate
Required role
Configuration group
System administrator
Memory Use, Physical Memory
Range of values
Status
0 2147483647
Dynamic
185
Configuration parameters
Summary information
Display level
Required role
Comprehensive
System administrator
Configuration group
Query Tuning
metrics elap max configures maximum elapsed time and thresholds for QP
metrics
Range of values
Status
0 2147483647
dynamic
Display level
Required role
Comprehensive
System administrator
Configuration group
Query Tuning
metrics exec max configures maximum execution time and thresholds for QP
metrics.
Range of values
Status
0 2147483647
Dynamic
Display level
Required role
Comprehensive
System administrator
Configuration group
Query Tuning
metrics lio max configures maximum logical I/O and thresholds for QP metrics.
186
Summary information
Default value
Range of values
0 2147483647
CHAPTER 5
Summary information
Status
Display level
Dynamic
Comprehensive
Required role
Configuration group
System administrator
metrics pio max configures maximum physical I/O and thresholds for QP
metrics.
200
20 - 2147483647
Status
Display level
dynamic
Comprehensive
Required role
Configuration group
System administrator
Query Tuning
min pages for parallel scan controls the number of tables and indexes that
6
0 30
Status
Display level
Dynamic
10
Required role
Configuration group
187
Configuration parameters
password values or per-login or per-role password values. The per-login or perrole minimum password length value overrides the server-wide value. Setting
minimum password length affects only the passwords you create after you have
set the value; existing password lengths are not changed.
Use minimum password length to specify a server-wide value for minimum
password length for both logins and roles. For example, to set the minimum
password length for all logins and roles to 4 characters, enter:
sp_configure "minimum password length", 4
To set minimum password length for a specific role at creation, use create role.
To create the new role intern_role with the password temp244 and set the
minimum password length for intern_role to 0, enter:
create role intern_role with passwd "temp244", minimum password length 0
The original password is seven characters, but the password can be changed to
one of any length because the minimum password length is set to 0.
Use sp_modifylogin to set or change minimum password length for an existing
login. sp_modifylogin only effects user roles, not system roles. For example, to
change minimum password length for the login joe to 8 characters, enter:
sp_modifylogin "joe", @option="minimum password length", @value="8"
Note The value parameter is a character datatype; therefore, quotes are
To remove the overrides for minimum password length for all logins, enter:
sp_modifylogin "all overrides", @option="minimum password length", @value="-1"
Use alter role to set or change the minimum password length for an existing role.
For example, to set the minimum password length for physician_role, an
existing role, to 5 characters, enter:
188
CHAPTER 5
mnc_full_index_filter
Summary information
Default value
Range of values
2
02
0 disable.
1 enable.
Status
Display level
Required roles
Comprehensive
System administrator
Configuration group
Query Tuning
0 (off)
0 (off), 1 (on)
Status
Dynamic
189
Configuration parameters
Summary information
Display level
Required role
Intermediate
System security officer
Configuration group
Security Related
msg confidentiality reqd requires that all messages into and out of Adaptive
Server be encrypted. The use security services parameter must be 1 for
messages to be encrypted.
0 (off)
Range of values
Status
0 (off), 1 (on)
Dynamic
Display level
Required role
Intermediate
System security officer
Configuration group
Security Related
msg integrity reqd requires that all messages be checked for data integrity. use
security services must be 1 for message integrity checks to occur. If msg
integrity reqd is set to 1, Adaptive Server allows the client connection to
succeed unless the client is using one of the following security services:
message integrity, replay detection, origin checks, or out-of-seq checks.
Range of values
Status
02
Dynamic
Display level
Required role
Intermediate
System security officer
Configuration group
Security Related
net password encryption reqd restricts login authentication to use only RSA
encryption algorithm or the Sybase proprietary algorithm. Table 5-3 describes
valid values for net password encryption reqd.
190
CHAPTER 5
Table 5-3: Values and descriptions for net password encryption reqd
Value
0
1
Description
Allows the client to choose the encryption algorithm used for login passwords on the network, including
no password encryption.
Restricts clients to use either RSA or Sybase proprietary encryption algorithms to encrypt login passwords
on the network. This provides an incrementally restrictive setting that allows clients who have previously
connect to reconnect with the Sybase proprietary algorithm and new clients to connect with the stronger
RSA algorithm. A client that attempts to connect without using password encryption fails.
Restricts clients to use only the RSA encryption algorithms to encrypt login passwords on the network.
This provides strong RSA encryption of passwords. Clients that attempt to connect without using the RSA
encryption fail.
number of alarms
Summary information
Default value
Range of values
40
40 2147483647
Status
Display level
Dynamic
Comprehensive
Required role
Configuration groups
System administrator
Memory Use, SQL Server Administration
Adaptive Server.
The Transact-SQL command waitfor defines a specific time, time interval, or
event for the execution of a statement block, stored procedure, or transaction.
Adaptive Server uses alarms to correctly execute waitfor commands. Other
internal processes require alarms.
When Adaptive Server needs more alarms than are currently allocated, this
message is written to the error log:
uasetalarm: no more alarms available
191
Configuration parameters
The number of bytes of memory required for each alarm structure is small. If
you raise the number of alarms value significantly, adjust max memory
accordingly.
200
02147483647
Status
Display level
Dynamic
Comprehensive
Required role
System administrator
Configuration groups
number of aux scan descriptors sets the number of auxiliary scan descriptors
available in a pool shared by all users on a server.
Each user connection and each worker process has 48 scan descriptors
exclusively allocated to it. Of these, 16 are reserved for user tables, 12 are
reserved for worktables, and 20 are reserved for system tables (with 4 of these
set aside for rollback conditions). A descriptor is needed for each table
referenced, directly or indirectly, by a query. For user tables, a table reference
includes:
All tables referenced in a view named in the query (the view itself is not
counted)
All tables that need to be checked for referential integrity (these are used
only for inserts, updates, and deletes)
If a table is referenced more than once (for example, in a self-join, in more than
one view, or in more than one subquery) the table is counted each time. If the
query includes a union, each select statement in the union query is a separate
scan. If a query runs in parallel, the coordinating process and each worker
process needs a scan descriptor for each table reference.
192
CHAPTER 5
When the number of user tables referenced by a query scan exceeds 16, or the
number of worktables exceeds 12, scan descriptors from the shared pool are
allocated. Data-only-locked tables also require a system table descriptor for
each data-only-locked table accessed with a table scan (but not those accessed
with an index scan). If more than 16 data-only-locked tables are scanned using
table scans in a query, auxiliary scan descriptors are allocated for them.
If a scan needs auxiliary scan descriptors after it has used its allotted number,
and there are no descriptors available in the shared pool, Adaptive Server
displays an error message and rolls back the user transaction.
If none of your queries need additional scan descriptors, you may still want to
leave number of aux scan descriptors set to the default value in case your system
requirements grow. Set it to 0 only if you are sure that users on your system will
never run queries on more than 16 tables and that your tables will always have
few or no referential integrity constraints. See Monitoring scan descriptor
usage on page 193.
If your queries need more scan descriptors, use one of these methods to remedy
the problem:
Rewrite the query, or break it into steps using temporary tables. For dataonly-locked tables, consider adding indexes if there are many table scans.
Redesign the tables schema so that it uses fewer scan descriptors, if it uses
a large number of referential integrity constraints. You can find how many
scan descriptors a query would use by enabling set showplan, noexec on
before running the query.
This example shows scan descriptor use with 500 descriptors configured:
sp_monitorconfig "aux scan descriptors"
Usage information at date and time: Apr 22 2002
2:49PM.
193
Configuration parameters
Name
Num_free
Reuse_cnt
Instance_Name
------------------------------------------ -------------------number of aux
260
0
NULL
Num_active
Pct_act
Max_Used
----------
-------
-----------
240
48.00
427
Only 240 auxiliary scan descriptors are being used, leaving 260 free. However,
the maximum number of scan descriptors used at any one time since the last
time Adaptive Server was started is 427, leaving about 20 percent for growth
in use and exceptionally heavy use periods. Re-used does not apply to scan
descriptors.
Estimating and configuring auxiliary scan descriptors
Determine the number of table references for any query that references
more than 16 user tables, or for those that have a large number of
referential constraints, by running the query with set showplan and set
noexec enabled. If auxiliary scan descriptors are required, showplan
reports the number needed:
Auxiliary scan descriptors required: 17
The reported number includes all auxiliary scan descriptors that are
required for the query, including those for all worker processes. If your
queries involve only referential constraints, you can also use
sp_helpconstraint, which displays a count of the number of referential
constraints per table.
2
For each query that uses auxiliary scan descriptors, estimate the number of
users who would run the query simultaneously and multiply. If 10 users are
expected to run a query that requires 8 auxiliary descriptors, a total of 80
will be needed at any one time.
Add the per-query results to calculate the number of needed auxiliary scan
descriptors.
194
Summary information
Default value
Range of values
1 32768
CHAPTER 5
Summary information
Status
Display level
Dynamic
Basic
Required role
Configuration group
System administrator
User Environment
number of ccbs
Summary information
Default value
Range of values
0
0 100
Status
Display level
Static
Required role
Configuration group
Diagnostics
1
1 8
Status
Display level
Dynamic
Comprehensive
Required role
Configuration group
System administrator
Backup/Recovery
195
Configuration parameters
number of devices
Summary information
Default value
Range of values
10
12,147,483,647
Status
Dynamic
Display level
Required role
Basic
System administrator
Configuration groups
number of devices controls the number of database devices Adaptive Server can
use. It does not include devices used for database or transaction log dumps.
When you execute disk init, you can also assign the virtual device number (the
vdevno), although this value is optional. If you do not assign the vdevno,
Adaptive Server assigns the next available virtual device number.
If you do assign the virtual device number, each device number must be unique
among the device numbers used by Adaptive Server. The number 0 is reserved
for the master device. You can enter any unused device number that falls in the
valid range of values.
To determine which numbers are currently in use, enter:
select vdevno from master..sysdevices
where status & 2 = 2
196
CHAPTER 5
HPIA 64, HPPA 64, AIX 64, Windows Set by Adaptive Server.
Note Changing the number of file descriptors requires you restart Adaptive
If you then set the number of file descriptors to 2048 with the command
ulimit -n 2048 and restart the server, Adaptive Server reports this message
in the error log when you increase the value for the number of devices:
kernel Using 2048 file descriptors.
197
Configuration parameters
Summary information
Range of values
UNIX: 1 64
Windows: 1
Status
Display level
Dynamic
Basic
Required role
Configuration groups
System administrator
Disk I/O, Processors
number of disk tasks controls the number of tasks dedicated to polling and
completing disk I/Os.
500
100 2147483647
Status
Display level
Dynamic
10
Required role
Configuration groups
System administrator
DTM Administration, Memory Use
number of dtx participants sets the total number of remote transactions that the
198
CHAPTER 5
Max_Used
----------210
If the num_free value is zero or very low, new distributed transactions may be
unable to start due to a lack of DTX participants. Consider increasing the
number of dtx participants value.
A low Max_used value may indicate that unused DTX participants are
consuming memory that could be used by other server functions. Consider
reducing the value of number of dtx participants.
Disabled
Range of values
Status
Display level
Required role
Intermediate
System administrator
Configuration group
Group Diagnostics
number of dump threads controls the number of threads that Adaptive Server
spawns to perform a memory dump. Using the appropriate value for number of
dump threads can reduce the amount of time the engines are halted during the
memory dump.
Use a value of 8 if the machine has enough free memory for the file system
cache to hold the entire memory dump.
199
Configuration parameters
If you do not know whether the machine has enough free memory, the
value for number of dump threads depends on many factors, including the
speed of the I/O system, the speed of the disks, the controllers cache,
whether the dump file lives in a logical volume manager created on several
disks, and so on.
If you halt the engines during the memory dump, using a value other than
1 may reduce the amount of time the engines spend stopped while
dumping the memory.
Range of values
Status
Display level
Required role
Basic
System administrator
Configuration groups
Note When configured for threaded mode, Adaptive Server ignores the
number of engines at startup configuration parameter. In threaded mode,
Adaptive Server uses the size of the defined thread pools to determine the
number of online engines at startup. If the configuration file contains no thread
pool configuration information (for example, while you are upgrading from an
earlier version), Adaptive Server uses the existing value for number of engines
at startup to determine the size the default engine pool.
200
CHAPTER 5
20
Range of values
Status
3 2147483647
Dynamic
Display level
Required role
Comprehensive
System administrator
Configuration group
Query Tuning
Range of values
Status
065535
Dynamic
Display level
Required role
Comprehensive
System administrator
Configuration group
Cache Manager
number of index trips specifies the number of times an aged index page traverses
the most recently used/least recently used (MRU/LRU) chain before it is
considered for swapping out. As you increase the value of number of index trips,
index pages stay in cache for longer periods of time.
201
Configuration parameters
Before changing the value of number of index trips to a number other than 0,
make sure the application has sufficient cache to store all index, OAM, and
data pages. Consult Sybase Technical Support before changing the value of
number of index trips.
0
0 32767
Status
Display level
Dynamic
Comprehensive
Required role
Configuration groups
System administrator
Java Services, Memory Use
number of java sockets enables the Java VM and the java.net classes Sybase
supports.
202
CHAPTER 5
Summary information
Valid values
Status
1256
Dynamic
Display level
Required role
Comprehensive
System administrator
Configuration groups
number of large i/o buffers sets the number of allocation unit-sized buffers
reserved for performing large I/O for certain Adaptive Server utilities. These
large I/O buffers are used primarily by the load database command, which uses
one buffer to load the database, regardless of the number of stripes it specifies.
load database then uses as many as 32 buffers to clear the pages for the
database it is loading. These buffers are not used by load transaction. To
perform more than six load database commands concurrently, configure one
large I/O buffer for each load database command.
create database and alter database use these buffers for large I/O while clearing
database pages. Each instance of create database or load database can use as
buffers is one allocation (256 pages), not one extent (8 pages). The server thus
requires more memory allocation for large buffers. For example, a disk buffer
that required memory for 8 pages in earlier versions now requires memory for
256 pages.
number of locks
Summary information
Default value
Range of values
5000
10002147483647
Status
Display level
Dynamic
Basic
Required role
Configuration groups
System administrator
Lock Manager, Memory Use
number of locks sets the total number of available locks for all users on
Adaptive Server.
203
Configuration parameters
The total number of locks needed by Adaptive Server depends on the number
of concurrent and parallel processes, and the types of actions performed by the
transactions. To see how many locks are in use at a particular time, use sp_lock.
For serial operation, Sybase suggests that you start by assigning 20 locks for
each active, concurrent connection.
Parallel execution requires more locks than serial execution. For example, if
you find that queries use an average of five worker processes, try increasing by
one-third the number of locks configured for serial operation.
If the system runs out of locks, Adaptive Server displays a server-level error
message. If users report lock errors, you may need to increase number of locks;
but remember that locks use memory. See Chapter 3, Configuring Memory,
in the System Administration Guide Volume 2.
Note Datarows locking may require that you change the value for number of
locks. See the Performance and Tuning Series: Locking and Concurrency
Control.
number of mailboxes
Summary information
Default value
Range of values
30
302147483647
Status
Display level
Dynamic
Comprehensive
Required role
Configuration groups
System administrator
Memory Use, SQL Server Administration
number of messages
Summary information
Default value
204
64
CHAPTER 5
Summary information
Range of values
Status
02147483647
Dynamic
Display level
Required role
Comprehensive
System administrator
Configuration groups
Adaptive Server. Messages, which are used with mailboxes, are used internally
by Adaptive Server for communication and synchronization between kernel
service processes. Messages are also used to coordinate between a family of
processes in parallel processing. Do not modify this parameter unless
instructed to do so by Sybase Technical Support.
Range of values
UNIX: 1 64
Status
Display level
Dynamic
Basic
Required role
Configuration groups
System administrator
Disk I/O, Processors
Windows: 1
number of network tasks controls the number of tasks dedicated to polling and
0
065535
Status
Display level
Dynamic
Comprehensive
Required role
System administrator
205
Configuration parameters
number of oam trips specifies the number of times an object allocation map
(OAM) page traverses the MRU/LRU chain before it is considered for
swapping out. The higher the value of number of oam trips, the longer aged
OAM pages stay in cache.
Each table, and each index on a table, has an OAM page, which holds
information on pages allocated to the table or index and is checked when a new
page is needed for the index or table. (See page utilization percent on page
227. ) A single OAM page can hold allocation mapping for between 2,000 and
63,750 data or index pages.
The OAM pages point to the allocation page for each allocation unit where the
object uses space. The allocation pages, in turn, track the information about
extent and page usage within the allocation unit.
In some environments and benchmarks that involve significant allocations of
space (that is, massive bulk copy operations), keeping OAM pages in cache
longer improves performance. Setting number of oam trips to a higher value
keeps OAM pages in cache.
Note If the cache is relatively small and used by a large number of objects, do
not set number of oam trips too high. This may result in the cache being flooded
with OAM pages that do not age out, and user threads may begin to time out.
Before changing the value of number of oam trips to a number other than 0,
make sure the application has sufficient cache to store all index, OAM, and
data pages. Consult Sybase Technical Support before changing the value of
number of oam trips.
12
6 2147483647
Status
Display level
Dynamic
Basic
Required role
Configuration groups
System administrator
Memory Use, Meta-Data Caches, SQL Server
Administration
number of open databases sets the maximum number of databases that can be
open simultaneously on Adaptive Server.
206
CHAPTER 5
When you calculate a value, include the system databases master, model,
sybsystemprocs, and tempdb. If you have installed auditing, include the
sybsecurity database. Also, count the sample databases pubs2 and pubs3, the
syntax database sybsyntax, and the dbcc database dbccdb if they are installed.
If you are planning to make a substantial change, such as loading a large
database from another server, use sp_helpconfig to calculate an estimated
metadata cache size by using sp_helpconfig. sp_helpconfig displays the amount
of memory required for a given number of metadata descriptors, as well as the
number of descriptors that can be accommodated by a given amount of
memory. A database metadata descriptor represents the state of the database
while it is in use or cached between uses.
If Adaptive Server displays a message saying that you have exceeded the
allowable number of open databases, adjust the value.
1
The best time to run sp_countmetadata is when there is little activity on the
server. Running sp_countmetadata during a peak time can cause
contention with other processes.
Suppose Adaptive Server reports the following information:
There are 50 databases, requiring 1719 Kbytes of
memory. The 'open databases' configuration parameter
is currently set to 500.
This new configuration number is only a starting point; base the ideal size
on the number of active metadata database cache descriptors, not the total
number of databases.
3
Max_Used
-----------
207
Configuration parameters
number of open
0
50
20
.00
26
NULL
If there is a lot of activity on the server, for example, if databases are being
added or dropped, periodically run sp_monitorconfig. Reset the cache size
as the number of active descriptors changes.
500
1002147483647
Status
Display level
Dynamic
Basic
Required role
Configuration groups
System administrator
Memory Use, Meta-Data Caches
number of open indexes sets the maximum number of indexes that can be used
208
CHAPTER 5
The best time to run sp_countmetadata is when there is little activity in the
server. Running sp_countmetadata during a peak time can cause
contention with other processes.
Suppose Adaptive Server reports the following information:
There are 698 user indexes in all database(s),
requiring 286.289 Kbytes of memory. The 'open
indexes' configuration parameter is currently set to
500.
This new configuration is only a starting point; base the ideal size on the
number of active index metadata cache descriptors, not the total number
of indexes.
3
Max_Used
----------590
209
Configuration parameters
If there is a lot of activity on the server, for example, if tables are being
added or dropped, periodically run sp_monitorconfig. Reset the cache size
as the number of active descriptors changes.
500
1002147483647
Status
Display level
Dynamic
Basic
Required role
Configuration groups
System administrator
Memory Use, Meta-Data Caches, SQL Server
Administration
number of open objects sets the maximum number of objects that can be open
The best time to run sp_countmetadata is when there is little activity in the
server. Running sp_countmetadata during a peak time can cause
contention with other processes.
Suppose Adaptive Server reports this information:
There are 696 user objects in all database(s),
requiring 1166 Kbytes of memory. The 'open objects'
210
CHAPTER 5
Configure the number of open objects to 1397, plus 10 percent (140), for a
total of 1537:
sp_configure "number of open objects", 1537
If there is a lot of activity on the server, for example, if tables are being added
or dropped, periodically run sp_monitorconfig. Reset the cache size as the
number of active descriptors changes. See sp_monitorconfig in the Reference
Manual: Procedures.
500
Range of values
Status
100 2147483647
Dynamic
Display level
Required role
Basic
System administrator
211
Configuration parameters
Summary information
Configuration groups
Specifies the number of partitions that Adaptive Server can access at one time.
Optimizing the
number of open
partitions parameter
for your system
The best time to run sp_countmetadata is when there is little activity in the
server. Running sp_countmetadata during a peak time can cause
contention with other processes.
Suppose Adaptive Server reports the following information:
There are 42 user partitions in all database(s),
requiring 109 Kbytes of memory. The 'open
partitions' configuration parameter is currently set
to 110.
3:15PM.
Num_active
Pct_act
Max_Used
----------
-------
-----------
57
51.8
83
Configure the number of open partitions to 83, plus 10 percent (8), for a
total of 91:
sp_configure "number of open partitions", 91
212
CHAPTER 5
If there is a lot of activity on the server, for example, if tables are being added
or dropped, periodically run sp_monitorconfig. Reset the cache size as the
number of active descriptors changes. See sp_monitorconfig in the Reference
Manual: Procedures.
2
132
Status
Display level
Dynamic
Comprehensive
Required role
System administrator
Configuration group
Setting number of pre-allocated extents means that bcp allocates the specified
number of extents each time it requires more space, and writes a single log
record for the event.
An object may be allocated more pages than actually needed, so the value of
number of pre-allocated extents should be low if you are using bcp for small
batches. If you are using bcp for large batches, increase the value of number of
pre-allocated extents to reduce the amount of overhead required to allocate
pages and to reduce the number of log records.
213
Configuration parameters
reorg rebuild
When you run these command on tables larger than 240 pages, Adaptive Server
reserves an entire allocation unit (32 extents), which greatly improves
performance, particularly when you run them concurrently on multiple nodes.
The value of number of pre-allocated extents continues to be observed for the
above commands for tables with fewer than 240 pages, and for all commands
(such as select into, bcp, alter table partition) for tables of all sizes.
214
Summary information
Default value
Range of values
Status
0 127
Static
Display level
Comprehensive
CHAPTER 5
Summary information
Required role
Configuration group
System administrator
Processors
are online when the server starts, is required for MQ. You may need to increase
max online engines to accommodate the number of max online Q engines.
20
Range of values
532767
Status
Display level
Static
Intermediate
Required role
Configuration groups
System administrator
Memory Use, Network Communication
20
032767
Status
Display level
Static
Intermediate
Required role
Configuration groups
System administrator
Memory Use, Network Communication
number of remote logins controls the number of active user connections from
Adaptive Server to remote servers. Each simultaneous connection to XP Server
for ESP execution uses up to one remote login each. Set this parameter to the
same (or a lower) value as number of remote connections. See Chapter 7,
Managing Remote Servers.
215
Configuration parameters
10
032767
Status
Display level
Static
Intermediate
Required role
Configuration groups
System administrator
Memory Use, Network Communication
number of remote sites determines the maximum number of remote sites that
500
032767
Status
Display level
Dynamic
Comprehensive
Required role
Configuration group
System administrator
SQL Server Administration
number of sort buffers specifies the amount of memory allocated for buffers
used to hold pages read from input tables and perform index merges during
sorts. number of sort buffers is used only for parallel sorting.
Adaptive Server allocates sort buffers from the cache to which the table is
bound. If the cache is not bound to a table, Adaptive Server allocates the sort
buffers from the cache to which the database is bound. If the cache is not bound
to a table or a database, Adaptive Server allocates sort buffers from the default
data cache.
Parallel sorts are used when you:
216
CHAPTER 5
Create indexes
25
Range of values
Status
52147483647
Dynamic
Display level
Required role
Basic
System administrator
Configuration groups
number of user connections sets the maximum number of user connections that
can simultaneously be connected to Adaptive Server. It does not refer to the
maximum number of processes; that number depends not only on the value of
this parameter but also on other system activity.
217
Configuration parameters
The maximum allowable number of file descriptors per process is operatingsystem-dependent; see the configuration documentation for your platform.
The number of file descriptors available for Adaptive Server connections is
stored in the global variable @@max_connections. You can report the
maximum number of file descriptors your system can use with:
select @@max_connections
The return value represents the maximum number of file descriptors allowed
by the system for your processes, minus overhead. Overhead increases with the
number of engines. For more information on how multiprocessing affects the
number file descriptors available for Adaptive Server connections, see Chapter
5, Managing Mulitprocessor Servers, in System Administration Guide:
Volume 2.
In addition, you must reserve a number of connections for the following items,
which you also set with configuration parameters:
Site handlers
Network listeners
There are not enough user connections available; you are being connected
using a temporary administrative connection which will time out after '15'
minutes. Increase the value of th 'number of user connections' parameter
Adaptive Server also prints a message similar to the following to the error log
when the final connection to Adaptive Server terminates due to a timeout:
218
CHAPTER 5
There is no formula to determine how many connections to allow for each user.
You must estimate this number, based on the system and user requirements.
You must also take into account that on a system with many users, connections
needed only occasionally or transiently can generally be shared among users.
The following processes require user connections:
Adaptive Server uses the value of number of user connections to establish the
number of shared-memory connections for EJB Server. Thus, if number of user
connections is 30, Adaptive Server establishes 10 shared-memory connections
for EJB Server. Shared-memory connections are not a subset of user
connections, and are not subtracted from the number of user connections.
To increase the number of user connections for shared memory, you must:
1
219
Configuration parameters
With Adaptive Server version 12.5.3 ESD #2, no sockets are automatically
reserved for EJB. However, you can enable trace flag 1642 to revert to the
functionality of earlier version, reserving one-third of the sockets for EJB.
Enable traceflag 1642 to set up the EJB server. For this version of Adaptive
Server, you can ignore this message, "hbc_ninit: No sockets
available for HBC", in the error log if the EJB server is not configured.
In Adaptive Server version 12.5.3 and later, if the EJB server is enabled and
HBC sockets are not available, "hbc_ninit: No sockets available
for HBC" is reported. If traceflag 1642 is not enabled, set the flag, and restart
Adaptive Server. If the EJB server is not enabled, then no message is reported
and Adaptive Server automatically disables the sockets reserved for EJB
server.
Range of values
Status
02147483647
Dynamic
Display level
Required role
Basic
System administrator
Configuration groups
processes that Adaptive Server can use at any one time for all simultaneously
running parallel queries.
Adaptive Server issues a warning message at start-up if there is insufficient
memory to create the specified number of worker processes. memory per
worker process controls the memory allocated to each worker process.
If you have not configured number of worker processes for a sufficient number
of threads from the worker thread pool, Adaptive Server adjusts query plans at
runtime to use fewer worker threads. If Adaptive Server cannot adjust the
queries at runtime, the queries recompile serially. However, alter table and
execute immediate commands are aborted if they do not have sufficient worker
threads.
220
CHAPTER 5
0
Site-specific
Status
Display level
Read-only
Comprehensive
Required role
Configuration group
System administrator
O/S Resources
0 (off)
0 (off), 1 (on)
Status
Display level
Dynamic
Comprehensive
Required role
Configuration group
System administrator
Monitoring
100
Range of values
12147483647
221
Configuration parameters
Summary information
Status
Display level
Dynamic
Basic
Required role
Configuration groups
System administrator
Memory Use, Meta-Data Cache
open index hash spinlock ratio sets the number of index metadata descriptor
hash tables that are protected by one spinlock. This parameter is used only in
multiprocessing systems only.
All the index descriptors belonging to a table are accessible through a hash
table. When you run a query on the table, Adaptive Server uses hash tables to
look up the necessary index information in its sysindexes rows. A hash table is
an internal mechanism used by Adaptive Server to retrieve information
quickly.
Usually, you do not need to change this parameter. In rare instances, however,
you may need to reset it if Adaptive Server demonstrates contention from hash
spinlocks. See the Performance and Tuning Series: Monitoring Adaptive
Server with sp_sysmon.
For more information about configuring spinlock ratios, see Chapter 5,
Managing Multiprocessor Servers, in the System Administration Guide:
Volume 2.
100
1214748364
Status
Display level
Dynamic
Comprehensive
Required role
Configuration groups
System administrator
Memory Use, Meta-Data Cache
open index spinlock ratio specifies the number of index metadata descriptors
222
CHAPTER 5
The value specified for this parameter defines the ratio of index descriptors per
spinlock.
If one spinlock is shared by too many index descriptors, it can cause spinlock
contention. Use sp_sysmon to get a report on spinlock contention. See the
Performance and Tuning Series: Monitoring Adaptive Server with sp_sysmon.
If sp_sysmon output indicates an index descriptor spinlock contention of more
than 3 percent, try decreasing the value of open index spinlock ratio.
See Chapter 5, Managing Mulitprocessor Servers, in System Administration
Guide: Volume 2.
100
Range of values
Status
12147483647
Dynamic
Display level
Required role
Comprehensive
System administrator
Configuration group
Meta-Data Cache
open object spinlock ratio specifies the number of object descriptors that are
223
Configuration parameters
optimization goal
Summary information
Default value
Range of values
allrows_mix
Status
Display level
Dynamic
Comprehensive
Required role
Configuration group
System administrator
Query Tuning
allrows_oltp, allrows_dss
Optimization goals are a convenient way to match user query demands with the
best optimization techniques, ensuring optimal use of the optimizers time and
resources. Adaptive Server allows users to configure for two optimization
goals, which you can specify at three tiers: server level, session level, and
query level.
The server-level optimization goal is overridden at the session level, which is
overridden at the query level.
These optimization goals allow you to choose an optimization strategy that best
fits your query environment:
medium-to-high complexity.
10
0 1000
Status
Display level
Dynamic
Comprehensive
Required role
Configuration group
System administrator
Query Tuning
estimated execution time of the query, that Adaptive Server can spend
optimizing a query.
A value of 0 indicates there is no optimization timeout.
224
CHAPTER 5
optimizer level
Summary information
Default value
Range of values
ase_default
Status
Display level
Required role
System administrator
Configuration group
Query Tuning
optimizer level determines the level of optimization the query processor uses.
See Chapter 7, Controlling Optimization, in the Performance and Tuning
Series: Query Processing and Abstract Plans for information about
optimization levels.
The values for optimizer level are character data, so you must use 0 as a
placeholder for the second parameter, which must be numeric.
200
22147483647
Status
Display level
Dynamic
Intermediate
Required role
Configuration groups
System administrator
Lock Manager, SQL Server Administration
page lock promotion HWM (high-water mark), with page lock promotion LWM
(low-water mark) and page lock promotion PCT (percentage), specifies the
225
Configuration parameters
When the number of page locks acquired during a scan session exceeds page
lock promotion HWM, Adaptive Server attempts to acquire a table lock. page
lock promotion HWM value cannot be higher than number of locks.
For more detailed information on scan sessions and setting up page lock
promotion limits, see Chapter 2, Locking Configuration and Tuning, in the
Performance and Tuning Series: Locking and Concurrency Control.
The default value for page lock promotion HWM is appropriate for most
applications. To avoid table locking, you may want to increase the value. For
example, if you know that there are regular updates to 500 pages of an allpageslocked or datapages-locked table containing thousands of pages, increase
concurrency for the tables by setting page lock promotion HWM to 500.
You can also configure lock promotion of page-locked tables and views at the
object level. See sp_setrowlockpromote in the Reference Manual: Procedures.
Use sp_sysmon to see how changing page lock promotion HWM affects the
number of lock promotions. sp_sysmon reports the ratio of exclusive page to
exclusive table lock promotions and the ratio of shared page to shared table
lock promotions. See the Performance and Tuning Series: Monitoring
Adaptive Server with sp_sysmon.
200
Range of values
Status
Display level
Required role
Intermediate
System administrator
Configuration groups
page lock promotion LWM (low-water mark), with page lock promotion HWM
(high-water mark) and the page lock promotion PCT, specify the number of page
locks permitted during a single scan session of a page locked table or an index
before Adaptive Server attempts to promote from page locks to a table lock.
The page lock promotion LWM sets the number of page locks below which
Adaptive Server does not attempt to issue a table lock on an object. page lock
promotion LWM must be less than or equal to page lock promotion HWM.
226
CHAPTER 5
The default value for page lock promotion LWM is sufficient for most
applications. If Adaptive Server runs out of locks (except for an isolated
incident), increase number of locks.
See the Performance and Tuning Series: Locking and Concurrency Control.
You can also configure page lock promotion at the object level. See
sp_setpglockpromote in the Reference Manual: Procedures.
100
1100
Status
Dynamic
Display level
Required role
Intermediate
System administrator
Configuration groups
If the number of locks held on an object is between page lock promotion LWM
(low-water mark) and page lock promotion HWM (high-water mark). page lock
promotion PCT sets the percentage of page locks (based on the table size) above
which Adaptive Server attempts to acquire a table lock.
See Chapter 2, Locking Configuration and Tuning, in the Performance and
Tuning Series: Locking and Concurrency Control.
The default value for page lock promotion PCT is appropriate for most
applications.
You can also configure lock promotion at the object level for page locked
objects. See sp_setpglockpromote in the Reference Manual: Procedures.
95
Range of values
Status
1100
Dynamic
Display level
Required role
Comprehensive
System administrator
Configuration group
Disk I/O
227
Configuration parameters
If you set page utilization percent to 100, Adaptive Server scans through all
OAM pages to find unused pages allocated to the object before allocating a
new extent. When this parameter is set lower than 100, Adaptive Server
compares the page utilization percent setting to the ratio of used and unused
pages allocated to the table, as follows:
100 * used pages/(used pages + unused pages)
If page utilization percent is lower than the ratio, Adaptive Server allocates a
new extent instead of searching for the unused pages.
For example, when inserting data into a 10GB table that has 120 OAM pages
and only 1 unused data page:
A page utilization percent of 100 tells Adaptive Server to scan through all
120 OAM pages to locate an unused data page.
A low page utilization percent value results in more unused pages. A high page
utilization percent value slows page allocations in very large tables, as Adaptive
Server performs an OAM scan to locate each unused page before allocating a
new extent. This increases logical and physical I/O.
If page allocations (especially in the case of large inserts) seem to be slow,
lower the value of page utilization percent, but reset it after inserting the data. A
lower setting affects all tables on the server and results in unused pages in all
tables.
Fast bulk copy ignores the page utilization percent setting and always allocates
new extents until there are no more extents available in the database.
partition groups
Summary information
Default value
Range of values
228
1024
12147483647
CHAPTER 5
Summary information
Status
Display level
Dynamic
Comprehensive
Required role
Configuration groups
System administrator
Memory Use, Meta-Data Cache
partition groups specifies the maximum number of partition groups that can be
allocated by Adaptive Server. Partition groups are internal structures used by
Adaptive Server to control access to individual partitions of a table. Partition
groups are used while upgrading or during a load database upgrade to
unpartition Adaptive Server 12.5.x and earlier partitions.
The default value allows a maximum 1024 open partition groups and a
maximum of 2147483647 open partitions. The actual number of partitions may
be slightly less, due to the grouping of partitions.
10
12147483647
Status
Display level
Dynamic
Comprehensive
Required role
Configuration groups
System administrator
Memory Use, Meta-Data Cache
For Adaptive Servers running with multiple engines, partition spinlock ratio sets
the number of rows in the partition descriptors that are protected by one
spinlock.
Adaptive Server manages access to table partitions using partition descriptors.
Each partition descriptor stores information about a partition (for example, the
last page of the partition) that processes must use when accessing that partition.
Configure partition descriptors using number of open partitions.
The default value of partition spinlock ratio sets 1 spinlock for every 10 partition
caches. Decreasing the value of partition spinlock ratio may have little impact on
the performance of Adaptive Server. The default setting is correct for most
servers.
See Chapter 5, Managing Mulitprocessor Servers, in System Administration
Guide: Volume 2.
229
Configuration parameters
64MB
0 2147483647
Status
Display level
Dynamic
Intermediate
Required role
Configuration group
System Administrator
User Environment
pci memory size sets the size of the pluggable component interface (PCI)
memory pool. All pluggable component adapter (PCA) and JVM plug-ins
running under the PCI Bridge share a single dedicated PCI memory pool. If
you set pci memory size to less than the default, Adaptive Server uses the
default size.
This memory pool is fully dedicated to the PCI bridge and any running
pluggable component. Like all other memory pools, Adaptive Server controls
this memory pool. However, unlike other memory pools, the PCI memory pool
is allocated when you initialize the PCI Bridge and does not grow after that
time.
0 (off)
0 (off), 1 (on)
Status
Display level
Dynamic
Comprehensive
Required role
Configuration group
System administrator
Monitoring
per object statistic active controls whether Adaptive Server collects statistics for
each object.
230
Summary information
Default value
20
Valid values
0 100
CHAPTER 5
Summary information
Status
Display level
Dynamic
Intermediate
Required role
Configuration group
System administrator
SQL Server Administration
percent database for history specifies the percentage of the total space available
in sybmgmtdb that is reserved for the js_history table. Increase percent database
for history if there are more jobs running, or to store historical records about
executed jobs for future queries.
30
0 100
Status
Display level
Dynamic
Intermediate
Required role
Configuration group
System administrator
SQL Server Administration
percent database for output specifies the percentage of the total space available
in sybmgmtdb that is reserved for job output. Increase the default value if there
are more jobs running or jobs that produce lot of output that must be stored for
querying.
30
0 100
Status
Display level
Dynamic
Intermediate
Required role
Configuration group
System administrator
SQL Server Administration
231
Configuration parameters
50
0 100
Status
Display level
Dynamic
Intermediate
Required role
System administrator
Configuration group
0 (off)
Range of values
Status
0 (off), 1 (on)
Dynamic
Display level
Required role
Comprehensive
System administrator
Configuration group
Monitoring
performance monitoring option enables the license for the BMC DBXray
graphical performance monitoring and diagnostic tool .
232
Summary information
Default value
64
Range of values
12147483647
CHAPTER 5
Summary information
Status
Display level
Dynamic
Comprehensive
Required role
Configuration groups
System administrator
Memory Use, User Environment
permission cache entries determines the number of cache protectors per task,
increasing the amount of memory for each user connection and worker process.
0
01
Status
Display level
Dynamic
Comprehensive
Required role
Configuration group
System administrator
Monitoring
233
Configuration parameters
plan text pipe active determines whether Adaptive Server collects query plan
text. If both plan text pipe active and plan text pipe max messages are enabled,
Adaptive Server collects the plan text for each query. You can use
monSysPlanText to retrieve the query plan text for all user tasks.
0
02147483647
Status
Display level
Dynamic
Comprehensive
Required role
System administrator
Configuration groups
plan text pipe max messages determines the number of query plan text
messages Adaptive Server stores per engine. The total number of messages in
the monSQLText table is the value of sql text pipe max messages multiplied by
the number of engines running.
0 (off)
Valid values
Status
Display level
Required role
Intermediate
System administrator
Configuration groups
234
CHAPTER 5
0 (off)
Valid values
Status
0 (off), 1 (on)
Dynamic
Display level
Required role
Intermediate
System administrator
Configuration group
Backup/Recovery
7000
Range of values
Status
7000 2147483647
Dynamic
Display level
Required role
Basic
System administrator
235
Configuration parameters
Summary information
Configuration groups
Specifies the size of the procedure cache, in 2K pages. Adaptive Server uses
the procedure cache while running stored procedures. If the server finds a copy
of a procedure already in the cache, it does not need to read it from the disk.
Adaptive Server also uses space in the procedure cache to compile queries
while creating stored procedures.
Since the optimum value for procedure cache size differs from application to
application, resetting it may improve Adaptive Server performance. For
example, if you run many different procedures or ad hoc queries, your
application uses the procedure cache more heavily, so you may want to
increase this value.
Warning! If procedure cache size is too small, Adaptive Server performance
degrades.
If you are upgrading, procedure cache size is set to the size of the original
procedure cache at the time of upgrade.
1(enabled)
Range of values
Status
01
dynamic
Display level
Required role
System administrator
Configuration groups
Query tuning
236
CHAPTER 5
0 (off)
0 (off), 1 (on)
Status
Display level
Dynamic
Comprehensive
Required role
Configuration groups
System administrator
Memory Use, Monitoring
process wait events controls whether Adaptive Server collect statistics for each
wait event for every task. You can get wait information for a specific task using
monProcessWaits.
See Chapter 17, Using Stored Procedures, in the Transact-SQL Users Guide.
20
Status
Display level
dynamic
Comprehensive
Required role
Configuration group
System administrator
Valid values
Status
1 60
Dynamic
Display level
Required role
Comprehensive
System administrator
Configuration group
237
Configuration parameters
heartbeat overhead but speeds the detection of a lost disk link, resulting in a
quicker termination of an instance for which you have set I/O fencing or that
has lost its SAN link. Setting quorum heartbeat interval to a high number
reduces heartbeat overhead, but delays the detection of a lost disk link.
2
0 32767
Status
Dynamic
Display level
Required role
Comprehensive
System administrator
Configuration group
0 (off)
0 (off), 1(on)
Status
Display level
Static
Comprehensive
Required role
Configuration group
System administrator
Application Functionality
for:
Tables
Views
Column names
Index names
238
CHAPTER 5
0 (off)
0 (off), 1(on)
Status
Display level
Dynamic
Comprehensive
Required role
Configuration group
System administrator
Lock Manager
5
132767
Status
Display level
Dynamic
Basic
Required role
Configuration group
System administrator
Backup/Recovery
recovery interval in minutes sets the maximum number of minutes per database
239
Configuration parameters
Adaptive Server estimates that 6000 rows in the transaction log require 1
minute of recovery time. However, different types of log records can take more
or less time to recover. If you set recovery interval in minutes to 3, the checkpoint
process writes changed pages to disk only when syslogs contains more than
18,000 rows since the last checkpoint.
Note The recovery interval has no effect on long-running, minimally logged
transactions (such as create index) that are active when Adaptive Server fails.
It may take as much time to reverse these transactions as it took to run them.
To avoid lengthy delays, dump each database after index maintenance
operations.
Adaptive Server uses the recovery interval in minutes setting and the amount of
activity on each database to decide when to checkpoint each database. When
Adaptive Server checkpoints a database, it writes all dirty pages (data pages
in cache that have been modified) to disk. This may create a brief period of high
I/O, called a checkpoint spike. The checkpoint also performs other
maintenance tasks, including truncating the transaction log for each database
for which the truncate log on chkpt option has been set. About once per minute,
the sleeping checkpoint process wakes up, checks the truncate log on chkpt
setting, and checks the recovery interval to determine if a checkpoint is needed.
Figure 5-4 shows the logic used by Adaptive Server during this process.
240
CHAPTER 5
Sleep
Checkpoint
process
wakes up
and polls
each database
Is truncate log
on chkpt set?
Yes
Checkpoint
performed
No
No
Time to
checkpoint?
Logs
truncated
Yes
Checkpoint
performed
You may want to change the recovery interval if your application and its use
change. For example, you may want to shorten the recovery interval when
there is an increase in update activity on Adaptive Server. Shortening the
recovery interval causes more frequent checkpoints, with smaller, more
frequent checkpoint spikes, and slows the system slightly. However, setting the
recovery interval too high may cause the recovery time to be unacceptably
long. You can reduce the spikes caused by checkpointing by reconfiguring the
housekeeper freewrite percent parameter. See housekeeper free write percent
on page 149. For more information on the performance implications of
recovery interval in minutes, see Chapter 5, Memory Use and Performance, in
the Performance and Tuning Series: Basics.
Use sp_sysmon to determine how a particular recovery interval affects the
system. See the Performance and Tuning Series: Monitoring Adaptive Server
with sp_sysmon.
241
Configuration parameters
3
3255
Status
Display level
Static
Intermediate
Required role
Configuration groups
System administrator
Memory Use, Network Communication
remote server pre-read packets determines the number of packets that are preread by a site handler during connections with remote servers.
0
0 (off), 1 (on)
Status
Display level
Dynamic
Basic
Required role
Configuration group
242
CHAPTER 5
Decrypt permission is not needed for alter table decrypt. because the table
owner has implicit decrypt permission on encrypted columns.
The SSO can grant decrypt permission using the with grant option
parameter. This allows the SSO to decide who can grant decrypt
permission in the system. For example, if the SSO wants user1 to be able
to grant decrypt permission on user3.user3_tab, the SSO issues:
grant decrypt on user3.user3_tab to user1
with grant option
Table ownership does not give a user implicit decrypt permission. That is,
if you create a table with encrypted columns, you do not have decrypt
permission on them unless it is explicitly granted to you.
Aliased users assume the permissions of the user to whom they are aliased.
Similarly, a user with sa_role, who is implicitly aliased to the DBO in any
database, inherits any decrypt permissions that have been explicitly
granted to the DBO.
Decrypt permission is required for alter table decrypt statement because the
table owner does not have implicit decrypt permission on the table.
243
Configuration parameters
If you change restricted decrypt permission from 1 to 0, the rows that reflect
explicit grants remain in the sysprotects system table. However, these rows
have no effect on implicitly granted decrypt permissions because Adaptive
Server does not check sysprotects to make sure decrypt permission can be
implicitly granted. sp_helprotect displays misleading information for only
those users who were granted or revoked explicit decrypt permission before
you reconfigure the system, and who now have implicit decrypt permission.
Sybase recommends that, to keep the system consistent, you revoke any
explicit decrypt permissions granted to users before you switch between
enabling or disabling restricted decrypt permission to keep the system
consistent.
See the Encrypted Columns Users Guide for more information about decrypt
permissions.
200
Range of values
Status
22147483647
Dynamic
Display level
Required role
Intermediate
System administrator
Configuration groups
row lock promotion HWM (high-water mark), with row lock promotion LWM (lowwater mark) and row lock promotion PCT specifies the maximum number of row
locks permitted during a single scan session of a table or an index before
Adaptive Server attempts to escalate from row locks to a table lock.
When the number of locks acquired during a scan session exceeds row lock
promotion HWM, Adaptive Server attempts to acquire a table lock. The lock
promotion HWM value cannot be higher than the number of locks value.
244
CHAPTER 5
200
Range of values
Status
Display level
Required role
Intermediate
System administrator
Configuration groups
row lock promotion LWM (low-water mark), with the row lock promotion HWM
(high-water mark) and row lock promotion PCT specifies the number of row
The default value for row lock promotion LWM is sufficient for most
applications. If Adaptive Server runs out of locks (except for an isolated
incident), increase number of locks.
See the Performance and Tuning Series: Locking and Concurrency Control.
You can also configure lock promotion at the object level. See
sp_setpglockpromote in the Reference Manual: Procedures.
245
Configuration parameters
100
1100
Status
Display level
Dynamic
Intermediate
Required role
Configuration groups
System administrator
Lock Manager, SQL Server Administration
If the number of locks held on an object is between row lock promotion LWM
(low-water mark) and row lock promotion HWM (high-water mark), row lock
promotion PCT sets the percentage of row locks (based on the number of rows
in the table) above which Adaptive Server attempts to acquire a table lock.
The default value for row lock promotion PCT is appropriate for most
applications.
For more information on setting up lock promotion limits, see Chapter 2,
Locking Configuration and Tuning, in Performance and Tuning Series:
Locking and Concurrency Control.
You can also configure row lock promotion at the per-object level. See
sp_sterowlockpromote in the Reference Manual: Procedures.
600
600 4026531839
Status
Display level
Dynamic
Intermediate
Required role
Configuration groups
System administrator
SQL Server Administration
rtm thread idle wait period defines the time, in seconds, a native thread used by
Adaptive Server waits when it has no work to do. When the time set for a native
thread is reached, the thread automatically fades out.
246
CHAPTER 5
Status
Display level
Dynamic
Comprehensive
Required role
Configuration group
System administrator
SQL Server Administration
Note runnable process search count functions only when you configure
Adaptive Server for process kernel mode; it is nonfunctional for threaded
kernel mode. Use alter thread pool pool_name with idle timeout = n instead.
runnable process search count specifies the number of times an engine loops
while looking for a runnable task before relinquishing the CPU to the operating
system.
Adaptive Server engines check the run queue for runnable tasks whenever a
task completes or exceeds its allotted time on the engine. At times, there are no
tasks in the run queues. An engine can either relinquish the CPU to the
operating system or continue to check for a task to run. Setting runnable
process search count higher causes the engine to loop more times, thus holding
the CPU for a longer time. Setting the runnable process search count lower
causes the engine to release the CPU sooner.
If your machine is a uniprocessor that depends on helper threads to perform
I/O, you may see some performance benefit from setting runnable process
search to perform network I/O, disk I/O, or other operating system tasks. If a
client, such as a bulk-copy operation, is running on the same machine as a
single CPU server that uses helper threads, you may need to allow both the
server and the client access to the CPU.
Note If you are having performance problems, try setting runnable process
search count to 3.
For Adaptive Servers running on uniprocessor machines that do not use helper
threads, and for multiprocessor machines, the default value should provide
good performance.
247
Configuration parameters
With a runnable process search count value of 3, the Cluster Edition can better
share the system CPU with other processes running on the same machine.
However, if you set runnable process search count to 3 and Adaptive Server is
running as a standalone process, users may experience delays in server
response times. In this case, reset runnable process search count to 2000.
Use sp_sysmon to determine how the runnable process search count parameter
affects the Adaptive Server use of CPU cycles, engine yields to the operating
system, and blocking network checks. See the Performance and Tuning Series:
Monitoring Adaptive Server with sp_sysmon.
runnable process search count versus idle timeout
runnable process search count and alter thread pool ...idle timeout both indicate
how Adaptive Server looks for work:
alter thread pool ...idle timeout specifies the period of time Adaptive Server
spends looking for work, and is tuned according to individual thread pools.
idle timeout is more consistent across processors with varying speeds.
sampling percent
Summary information
Default value
Range of values
Status
0 100 percent
Dynamic
Display level
Required role
Comprehensive
System or database administrator
Configuration group
Query Tuning
sampling percent is the numeric value of the sampling percentage, such as 5 for
248
CHAPTER 5
Although a sampling of the data set may not be completely accurate, usually
the histograms and density values are reasonable within an acceptable range.
When you are deciding whether or not to use sampling, consider the size of the
data set, the time constraints you are working with, and if the histogram
produced is as accurate as needed.
The percentage to use when sampling depends on your needs. Test various
percentages until you receive a result that reflects the most accurate
information on a particular data set.
Statistics are stored in the system tables systabstats and sysstatistics.
Range of values
Status
Display level
Dynamic
Intermediate
Required role
Configuration group
secure default login specifies a default login for all users who are
preauthenticated but who do not have a login in master..syslogins.
where:
249
Configuration parameters
0 (off)
0 (off), 1(on)
Status
Display level
Dynamic
Comprehensive
Required role
Configuration group
System administrator
Application Functionality
select for update enables Adaptive Server to exclusively lock rows for
subsequent updates within the same transaction, and for updatable cursors,
preventing other concurrent tasks from updating these rows and from blocking
the subsequent update
See Queries: Selecting Data from a Table in the Transact-SQL Users Guide.
select on syscomments.text
Summary information
Default value
Range of values
0 (off)
0 (off), 1 (on)
Status
Display level
Dynamic
Comprehensive
Required role
Configuration group
administrator.
250
Summary information
Default value
1 (on)
Range of values
Status
0 (off), 1 (on)
Dynamic
CHAPTER 5
Summary information
Display level
Required role
Comprehensive
System administrator
Configuration group
Network Communication
600
Valid values
Status
0 32767
Dynamic
Display level
Required role
Comprehensive
System administrator
Configuration group
session migration timeout specifies the amount of time available for a client to
complete a migration by connecting to the target instance. If the client does not
migrate to the target instance in the time alloted, Adaptive Server fails the
connection.
Range of values
Status
Display level
Required role
Comprehensive
System administrator
Configuration group
User Environment
251
Configuration parameters
session tempdb log cache size specifies the size for each session tempdb log
cache. Adaptive Server uses the tempdb log cache to buffer the user transaction
log records for the session involving tempdb objects. The size for session
tempdb log cache is determined by the Adaptive Server page size. Configuring
a reasonable size for session tempdb log cache size can help prevent context
switches due to a session having to flush the tempdb user log cache.
Adaptive Server includes two log caches for each user connection: the session
tempdb log cache, and the user log cache, which is determined by the user log
cache size parameter.
Range of values
Status
Platform-specific
Static
Display level
Required role
Comprehensive
System administrator
Configuration group
Physical Memory
shared memory starting address determines the virtual address where Adaptive
252
Summary information
Default value
10
Range of values
Status
138
Dynamic
Display level
Required role
Intermediate
System administrator
CHAPTER 5
Summary information
Configuration group
size of auto identity column sets the precision of IDENTITY columns that are
automatically created with the sp_dboption auto identity and unique
auto_identity index options.
Minimum values
Status
Display level
Required role
Comprehensive
System administrator
Configuration groups
size of global fixed heap specifies the memory space for internal data structures
253
Configuration parameters
Minimum values
Dynamic
Basic
Required role
Configuration groups
System administrator
Java Services, Memory Use
size of process object fixed heap specifies the total memory space for all
Minimum values
Status
Display level
Dynamic
Basic
Required role
Configuration groups
System administrator
Java Services, Memory Use
size of shared class heap specifies the shared memory space for all Java classes
called into the Java VM. Adaptive Server maintains the shared class heap
server-wide for both user-defined and system-provided Java classes.
If you change the size of shared class heap, change the total logical memory by
the same amount.
254
CHAPTER 5
0
02147483647
Status
Display level
Dynamic
Comprehensive
Required role
Configuration groups
System administrator
Memory Use, Unicode
size of unilib cache specifies the memory used in bytes rounded up to the nearest
40
0 4000
Status
Display level
Dynamic
Comprehensive
Required role
Configuration group
System administrator
Query Tuning
sproc optimize timeout limit specifies the amount of time Adaptive Server can
0 (off)
Range of values
Status
0 (off), 1(on)
Dynamic
Display level
Required role
Comprehensive
System administrator
255
Configuration parameters
Summary information
Configuration group
Monitoring
SQL batch capture controls whether Adaptive Server collects SQL text. If both
SQL batch capture and max SQL text monitored are enabled, Adaptive Server
collects the SQL text for each batch for each user task.
1 (on)
0 (off), 1 (on)
Status
Static
Display level
Required role
Intermediate
System administrator
Configuration group
SQL Perfmon Integration enables and disables the ability to monitor Adaptive
256
Platform-specific
Range of values
Status
Display level
Static
Comprehensive
Required role
Configuration group
System administrator
SQL Server Administration
CHAPTER 5
sql server clock tick length specifies the duration of the servers clock tick, in
microseconds. Both the default value and the minimum value are platformspecific. Adaptive Server rounds values up to an even multiple of n, where n is
the platform-specific clock-tick default value. Use sp_helpconfig or
sp_configure to find the current values for sql server clock tick length.
Increasing sql server clock tick length favors CPU-bound tasks, because they
execute longer between context switches. The maximum value of 1,000,000
may be appropriate for primarily CPU-bound applications. However, any I/Obound tasks may suffer as a result. You can mitigate this somewhat by tuning
cpu grace time (see cpu grace time on page 104) and time slice (see time
slice on page 271).
Note Changing the value of sql server clock tick length can have serious effects
on Adaptive Server performance. Consult with Sybase Technical Support
before resetting this value.
0
01
Status
Display level
Dynamic
Comprehensive
Required role
Configuration group
System administrator
Monitoring
257
Configuration parameters
sql text pipe active controls whether Adaptive Server collects SQL text. If this
option is enabled and sql text pipe max messages is set, Adaptive Server
collects the SQL text for each query. Use monSysSQLText to retrieve the SQL
0
02147483647
Status
Display level
Dynamic
Comprehensive
Required role
System administrator
Configuration groups
sql text pipe max messages specifies the number of SQL text messages
Adaptive Server stores per engine. The total number of messages in the
monSQLText table is the value of sql text pipe max messages multiplied by the
number of engines running.
4096
Range of values
Status
02147483647
Static
Display level
Required role
Comprehensive
System administrator
Configuration groups
stack guard size sets the size, in bytes, of the stack guard area, which is an
overflow stack of configurable size at the end of each stack. Adaptive Server
allocates one stack for each user connection and worker process when it starts.
These stacks are located contiguously in the same area of memory, with a guard
area at the end of each stack. At the end of each stack guard area is a
guardword, which is a 4-byte structure with a known pattern. Figure 5-5
illustrates how a process can corrupt a stack guardword.
258
CHAPTER 5
Stack 2
guard area
Stack guardwords
Stack 2
Stack 1
guard area
Stack 1
Process begins
executing
Adaptive Server periodically checks to see whether the stack pointer for a user
connection has entered the stack guard area associated with that user
connections stack. If it has, Adaptive Server aborts the transaction, returns
control to the application that generated the transaction, and generates error
3626:
The transaction was aborted because it used too much
stack space. Either use sp_configure to increase the
stack size, or break the query into smaller pieces.
spid: %d, suid: %d, hostname: %.*s, application name:
%.*s
259
Configuration parameters
Adaptive Server also periodically checks the guardword pattern to see if it has
changed, thus indicating that a process has overflowed the stack boundary.
When this occurs, Adaptive Server prints these messages to the error log and
shuts down:
kernel: *** Stack overflow detected: limit: 0x%lx sp: 0x%lx
kernel: *** Stack Guardword corrupted
kernel: *** Stack corrupted, server aborting
In the first message, limit is the address of the end of the stack guard area,
and sp is the current value of the stack pointer.
In addition, Adaptive Server periodically checks the stack pointer to see
whether it is completely outside both the stack and the stack guard area for the
pointers process. If it is, Adaptive Server shuts down, even if the guardword
is not corrupted. When this happens, Adaptive Server prints the following
messages to the error log:
kernel: *** Stack overflow detected: limit: 0x%lx sp: 0x%lx
kernel: *** Stack corrupted, server aborting
The default value for stack guard size is appropriate for most applications.
However, if you experience server shutdown from either stack guardword
corruption or stack overflow, increase stack guard size by a 2K increment. Each
configured user connection and worker process has a stack guard area; thus,
when you increase stack guard size, you use up that amount of memory,
multiplied by the number of user connections and worker processes you have
configured.
Rather than increasing stack guard size to avoid stack overflow problems,
consider increasing stack size (see stack size on page 260). The stack guard
area is intended as an overflow area, not as an extension to the regular stack.
Adaptive Server allocates stack space for each task by adding the values of the
stack size and stack guard size parameters. stack guard size must be configured
in multiples of 2K. If the value you specify is not a multiple of 2K, sp_configure
stack size
Summary information
Default value
Range of values
260
Platform-specific
Platform-specific minimum2147483647
CHAPTER 5
Summary information
Status
Display level
Static
Basic
Required role
Configuration group
System administrator
User Environment
stack size specifies the size, in bytes, of the execution stacks used by each user
process on Adaptive Server. To find the stack size values for your platform, use
sp_helpconfig or sp_configure. stack size must be configured in multiples of 2K.
If the value you specify is not a multiple of 2K, sp_configure verification
routines round the value up to the next highest multiple.
261
Configuration parameters
If you are using CIS, or if Java is enabled in the database and you want to use
methods that call JDBC, Sybase recommends that you increase the default by
50 percent. If you are not using JDBC or CIS, the standard default value is
usually sufficient.
0 (off)
0 (off), 1 (on)
Status
Display level
Dynamic
Comprehensive
Required role
System administrator
Configuration group
start mail session enables and disables the automatic initiation of an Adaptive
0 (off)
Range of values
Status
0 (off), 1 (on)
Static
Display level
Required role
Configuration group
262
CHAPTER 5
start xp server during boot determines whether XP Server starts when Adaptive
Server starts.
When set to 1, XP Server starts when Adaptive Server starts. If you set start xp
server during boot to 0, XP Server does not start until you run xp_cmdshell.
startup delay
Summary information
Default value
Range of values
0 (off)
0 (off), 1 (on)
Status
Display level
Dynamic
Comprehensive
Required role
System administrator
Configuration group
Query Tuning
startup delay controls when RepAgent is started during the server start. By
default, RepAgent starts at the same time as Adaptive Server. Adaptive Server
writes a message to the error log stating the wait time.
Valid values
Status
Display level
Required role
Comprehensive
System administrator
Configuration groups
Note If you enable the statement cache, you must configure set chained on/off
263
Configuration parameters
0 (off)
0 (off), 1 (on)
Status
Display level
Dynamic
Comprehensive
Required role
Configuration group
System administrator
Monitoring
0
02147483647
Status
Display level
Dynamic
Comprehensive
Required role
Configuration groups
System administrator
Memory Use, Monitoring
messages Adaptive Server stores per engine. The total number of messages in
the monSQLText table is the value of sql text pipe max messages multiplied by
the number of engines running.
264
Summary information
Default value
0 (off)
Range of values
Status
0 (off), 1 (on)
Dynamic
Display level
Required role
Comprehensive
System administrator
Configuration group
Monitoring
CHAPTER 5
0 (off)
0 (off), 1(on)
Status
Display level
Dynamic
Comprehensive
Required role
System administrator
Configuration group
Application Functionality
SQL statements
See Memory Use and Performance in the Performance and Tuning Series:
Basics.
0 (off)
Valid values
Status
0 (off), 1(on)
Static
Display level
Required role
10
System administrator
Configuration group
DTM Administration
265
Configuration parameters
0 (off)
0 (off), 1(on)
Status
Dynamic
Display level
Required role
10
System administrator
Configuration group
Application Functionality
strict dtm enforcement prevents Adaptive Server from printing the Job
Scheduler js maxtask error messages to the errorlog.
0 (off)
Range of values
Status
0 (off), 1 (on)
Dynamic
Display level
Required role
Intermediate
System security officer
Configuration group
Security Related
suspend audit when device full determines what Adaptive Server does when an
audit device becomes completely full.
Note If you have two or more audit tables, each on a separate device other than
the master device, and you have a threshold procedure for each audit table
segment, the audit devices should never become full. Only if a threshold
procedure is not functioning properly does the full condition occur.
266
CHAPTER 5
0 truncates the next audit table and starts using it as the current audit
table when the current audit table becomes full. If you set suspend audit
when device full to 0, you ensure that the audit process is never suspended.
However, you incur the risk that older audit records are lost if they have
not been archived.
1 suspends the audit process and all user processes that cause an
auditable event. To resume normal operation, the system security officer
must log in and set up an empty table as the current audit table. During this
period, the system security officer is exempt from normal auditing. If the
system security officers actions would generate audit records under
normal operation, Adaptive Server sends an error message and
information about the event to the error log.
Valid values
Status
Display level
Required role
Comprehensive
System administrator
Configuration group
Network Communication
syb_sendmsg port number specifies the port number that Adaptive Server uses
to send messages to a UDP (User Datagram Protocol) port with sp_sendmsg or
syb_sendmsg.
If more than one engine is configured, a port is used for each engine, numbered
consecutively from the port number specified. If the port number is set to the
default value, 0 Adaptive Server assigns port numbers.
Note Sending messages to UDP ports is not supported on Windows.
A system security officer must set the allow sendmsg configuration parameter
to 1 to enable sending messages to UDP ports. To enable UDP messaging, a
system administrator must set allow sendmsg to 1. See allow sendmsg on
page 87. For more information on UDP messaging, see sp_sendmsg in the
Reference Manual: Procedures.
267
Configuration parameters
0
0 32767
Status
Display level
Dynamic
Comprehensive
Required role
Configuration group
System administrator
SQL Server Administration
Adaptive Server dynamically maintains the statistics for the number of rows
and columns modified in a table as part of any DML statement and flushes
them according to the value of sysstatistics flush interval.
Adaptive Server uses these statistics for query optimization since they are more
accurate. The datachange function determines the amount of data that is
changed at the table, column, or partition level since the last update statistics,
and initiates updating statistics on the object.
The in-memory statistics are always flushed to disk during a polite shutdown
of the server. You can configure sysstatistics flush interval to flush these inmemory statistics to disk by the house keeper task at regular intervals. Set
sysstatistics flush interval to 0 to disable this housekeeper task.
0
032767
Status
Display level
Dynamic
Intermediate
Required role
Configuration group
systemwide password expiration sets the number of days that passwords remain
in effect after they are changed. If systemwide password expiration is set to 0,
passwords do not expire.
268
CHAPTER 5
The password expires when the number of specified days passes. For example,
if you create a new login on August 1, 2007 at 10:30 a.m., with a password
expiration interval of 30 days, the password expires on August 31, 2007 at
10:30 a.m.
An accounts password is considered expired if an interval greater than
number_of_days has passed since the last time the password for that account
was changed.
When the number of days remaining before expiration is less than 25 percent
of the value of systemwide password expiration or 7 days, whichever is greater,
each time the user logs in, a message displays, giving the number of days
remaining before expiration. Users can change their passwords anytime before
expiration.
When an accounts password has expired, the user can still log in to Adaptive
Server but cannot execute any commands until he or she has used sp_password
to change his or her password. If the system security officer changes the users
password while the account is in sp_password-only mode, the account returns
to normal after the new password is assigned.
This restriction applies only to login sessions established after the password
has expired. Users who are logged in when their passwords expire are not
affected until the next time they log in.
Range of values
Status
0365
Dynamic
Display level
Required role
Intermediate
System administrator
Configuration group
Backup/Recovery
tape retention in days specifies the number of days you intend to retain each
tape after it has been used for either a database or a transaction log dump. This
parameter can keep you from accidentally overwriting a dump tape.
For example, if you have set tape retention in days to 7 days, and you attempt
to use the tape before 7 days have elapsed since the last time you dumped to
that tape, Backup Server issues a warning message.
269
Configuration parameters
You can override the warning using the with init option when executing the
dump command. Doing this causes the tape to be overwritten and all data on
the tape to be lost.
Both the dump database and dump transaction commands provide a retaindays
option, which overrides the tape retention in days value for a particular dump.
See Chapter 12, Backing Upa and Restoring User Databases, in System
Administration Guide: Volume 2.
tcp no delay
Summary information
Default value
1 (on)
Valid values
Status
0 (off), 1 (on)
Static
Display level
Required role
Comprehensive
System administrator
Configuration groups
The default value means that TCP packets are not batched.
TCP normally batches small logical packets into single, larger, physical
packets, and fills physical network frames with as much data as possible, which
improves network throughput in terminal emulation environments where users
mostly send keystrokes across the network.
However, applications that use small TDS (Tabular Data Stream) packets may
benefit from disabling TCP packet batching.
Note Disabling TCP packet batching means that packets are sent, regardless
270
Summary information
Default value
16
Valid values
Status
065535
Dynamic
Display level
Comprehensive
CHAPTER 5
Summary information
Required role
Configuration Group
System administrator
Network Communications
text prefetch size limits the number of pages of text, unitext, and image data that
can be prefetched into an existing buffer pool. Adaptive Server prefetches only
text, unitext, and image data that was created with Adaptive Server 12.x or was
upgraded using dbcc rebuild_text.
time slice
Summary information
Default value
Range of values
100
501000
Status
Display level
Dynamic
Comprehensive
Required role
Configuration group
System administrator
SQL Server Administration
time slice sets the number of milliseconds that the Adaptive Server scheduler
allows a task to run. If time slice is set too low, Adaptive Server may spend too
much time switching between tasks, which increases response time. If it is set
too high, CPU-intensive tasks may monopolize engines, which also increases
response time. The default value allows each task to run for 1/10 of a second
before relinquishing the CPU to another task.
See Chapter 3, Using Engines and CPUs in the Performance and Tuning
Series: Basics.
Use sp_sysmon to determine how time slice affects voluntary yields by
Adaptive Server engines. See the Performance and Tuning Series: Monitoring
Adaptive Server with sp_sysmon.
0
0 2147483647
Status
Display level
Calculated
Basic
271
Configuration parameters
Summary information
Required role
Configuration groups
System administrator
Cache Manager, Memory Use
total data cache size reports the amount of memory, in kilobytes, that is
currently available for data, index, and log pages. This parameter is a
calculated value that is not directly user-configurable.
The amount of memory available for the data cache can be affected by a
number of factors, including:
number of devices
A number of other parameters also affect the amount of available memory, but
to a lesser extent.
For information on how Adaptive Server allocates memory and for information
on data caches, see Configuration parameters on page 80.
272
Default value
Range of values
N/A
N/A
Status
Display level
Read-only
Intermediate
Required role
Configuration groups
System administrator
Memory Use, Physical Memory
CHAPTER 5
total logical memory displays the total logical memory for the current
N/A
N/A
Status
Read-only
Display level
Required role
Intermediate
System administrator
Configuration group
Memory Use
total physical memory for the current configuration of Adaptive Server. The
total physical memory is the amount of memory that Adaptive Server is using
at a given moment in time. Configure Adaptive Server so that the value for max
memory is larger than the value for total logical memory, and the value for total
logical memory is larger than the value for total physical memory.
4096
Range of values
Status
0 2147483647
Dynamic
Display level
Required role
Intermediate
System administrator
Configuration group
273
Configuration parameters
Adaptive Server maintains a memory pool for the transfer table command and
for tables marked for incremental transfer. This pool provides memory for
maintaining state information about current and past transfers, and for memory
used to write to and read from transfer files. transfer utility memory size
determines the size of this memory pool.
The units for this pool are in memory pages, which are blocks of 2048 bytes.
The default size is large enough to accommodate over 100 tables marked for
incremental transfer, all transferring simultaneously.
If your installation does not include tables marked for incremental transfer, and
does not use the transfer table command, you may set the size of this memory
pool to zero to reclaim this memory.
16
Valid values
Status
1 2147483647
Static
Display level
Required role
1
System administrator
Configuration groups
274
CHAPTER 5
The outer block of each server transaction. The outer block of a transaction
may be created explicitly when a client executes a new begin transaction
command. Adaptive Server may also implicitly create an outer transaction
block when clients use Transact-SQL to modify data without using begin
transaction to define the transaction.
Note Subsequent, nested transaction blocks, created with additional begin
transaction commands, do not require additional transaction descriptors.
txn to pss ratio determines the total number of transaction descriptors available
The default value, 16, ensures compatibility with versions of Adaptive Server
earlier than 12.x which also allocated 16 transaction descriptors for each user
connection. In version 12.x and later, the number of simultaneous transactions
is limited only by the number of transaction descriptors available in the server.
Note You can have as many databases in a user transaction as there are in your
Adaptive Server installation. For example, if your Adaptive Server has 25
databases, you can include 25 databases in your user transactions.
Max_Used
----------523
275
Configuration parameters
0 (off)
0 (off), 1 (on)
Status
Dynamic
Display level
Required role
Intermediate
System security officer
Configuration group
Security Related
unified login required requires that all users who log in to Adaptive Server be
authenticated by a security mechanism. The use security services parameter
must be 1 to use the unified login security service.
upgrade version
Summary information
Default value
1100
Range of values
Status
02147483647
Dynamic
Display level
Required role
Comprehensive
System administrator
Configuration group
upgrade version reports the version of the upgrade utility that upgraded your
master device. The upgrade utility checks and modifies this parameter during
an upgrade.
Warning! Do not reset upgrade version. Doing so may cause serious problems
with Adaptive Server.
276
CHAPTER 5
You can determine whether an upgrade has been done on your master device
by using upgrade version without specifying a value:
sp_configure "upgrade version"
0 (off)
0 (off), 1 (on)
Status
Display level
Static
Intermediate
Required role
Configuration group
Status
Static
Display level
Required role
Intermediate
System administrator
Configuration groups
user log cache size specifies the size, in bytes, for each users log cache. Its size
is determined by the servers logical page size. There is one user log cache for
each configured user connection and worker process. Adaptive Server uses
these caches to buffer the user transaction log records, which reduces the
contention at the end of the transaction log.
277
Configuration parameters
When a user log cache becomes full or another event occurs (such as when the
transaction completes), Adaptive Server flushes all log records from the user
log cache to the database transaction log. By first consolidating the log records
in each users log cache, rather than immediately adding each record to the
databases transaction log, Adaptive Server reduces contention of processes
writing to the log, especially for SMP systems that are configured with more
than one engine.
Note For transactions using a database with mixed data and log segments, the
user log cache is flushed to the transaction log after each log record. No
buffering takes place. If your databases do not have dedicated log segments, do
not increase the user log cache size.
Do not configure user log cache size to be larger than the maximum amount of
log information written by an applications transaction. Since Adaptive Server
flushes the user log cache when the transaction completes, any additional
memory allocated to the user log cache is wasted. If no transaction in your
server generates more than 4000 bytes of transaction log records, set user log
cache size no higher than that value. For example:
sp_configure "user log cache size", 4000
Setting user log cache size too high wastes memory. Setting it too low can
cause the user log cache to fill up and flush more than once per transaction,
increasing the contention for the transaction log. If the volume of transactions
is low, the amount of contention for the transaction log may not be significant.
Use sp_sysmon to understand how this parameter affects cache behavior. See
the Performance and Tuning Series: Monitoring Adaptive Server with
sp_sysmon.
278
Default value
Range of values
20
12147483647
Status
Display level
Dynamic
Intermediate
Required role
Configuration groups
System administrator
Memory Use, User Environment
CHAPTER 5
For Adaptive Servers running with multiple engines, user log cache spinlock
ratio specifies the ratio of user log caches per user log cache spinlock. There is
one user log cache for each configured user connection.
The default specifies 1 spinlock for each 20 user connections configured for
your server.
Use sp_sysmon to understand how this parameter affects cache behavior. See
the Performance and Tuning Series: Monitoring Adaptive Server with
sp_sysmon.
Range of values
Status
01
Dynamic
Display level
Required role
Comprehensive
System administrator
Configuration groups
wait event timing controls whether Adaptive Server collects statistics for
individual wait events. A task may have to wait for a variety of reasons (for
example, waiting for a buffer read to complete). The monSysWaits table
contains the statistics for each wait event. The monWaitEventInfo table contains
a complete list of wait events.
80
Valid values
Status
80 2147483647
Dynamic
Display level
Required role
Comprehensive
System administrator
Configuration group
pages, that the workload manager can use. See Chapter 6, Managing the
Workload, in the Cluster Users Guide.
279
Configuration parameters
60 (seconds)
1 2147483647 (seconds)
Status
Display level
Dynamic
10
Required role
Configuration group
System administrator
DTM Administration
xact coordination interval defines the length of time between attempts to resolve
transaction branches have been propagated to remote servers.
The coordinating Adaptive Server makes regular attempts to resolve the work
of remote servers participating in a distributed transaction. The coordinating
server contacts each remote server participating in the distributed transaction
in a serial manner, as shown in Figure 5-6. The coordination service may be
unable to resolve a transaction branch for a variety of reasons. For example, if
the remote server is not reachable due to network problems, the coordinating
server reattempts the connection after the time specified by xact coordination
level.
Figure 5-6: Resolving remote transaction branches
Adaptive Server
Coordination Service
OK
Adaptive Server 2
OK
Adaptive Server 3
Network problem
Adaptive Server 4
With the default value of xact coordination interval, 60, Adaptive Server
attempts to resolve remote transactions once every minute. Decreasing the
value may speed the completion of distributed transactions, but only if the
transactions are themselves resolved in less than a minute. Under normal
circumstances, there is no performance penalty to decreasing the value of xact
coordination interval.
280
CHAPTER 5
Setting xact coordination interval to a higher number can slow the completion of
distributed transactions, and cause transaction branches to hold resources
longer than they normally would. Under normal circumstances, do not increase
the value of xact coordination interval beyond its default.
xp_cmdshell context
Summary information
Default value
Valid values
1
0, 1, 2
Status
Display level
Dynamic
Comprehensive
Required role
System administrator
Configuration group
xp_cmdshell context sets the security context for the operating system
command to be executed using the xp_cmdshell system ESP. The values for the
context determines under which account the command runs:
281
Configuration parameters
282
CH A PTE R
Topic
Device allocation and object placement
Commands for managing disk resources
Page
283
284
286
287
288
Many Adaptive Server defaults are set to reasonable values for aspects of
storage management, such as database, table, and index location, and how
much space is allocated for each one. Responsibility for storage allocation
and management is often centralized, and usually, the system
administrator has ultimate control over the allocation of disk resources to
Adaptive Server and the physical placement of databases, tables, and
indexes on those resources.
Chapter
Chapter 8, Initializing Database Devices
283
After the initial disk resources have been allocated to Adaptive Server, the
system administrator, database owner, and object owners should consider how
to place databases and database objects on specific database devices. These
object placement issues determine where database objects reside on your
system and whether or not the objects share devices. Object placement tasks
are discussed throughout this manual, including the chapters shown in Table 62.
Table 6-2: Object placement topics
Task
Place databases on specific database devices
Place tables and indexes on specific database
devices
Chapter
sp_deviceattr logicalname,
optname, optvalue
sp_diskdefault "dev_name"...
disk resize
name = device_name,
size = additional_space
284
Task
See
Chapter 8, Initializing
Database Devices
Chapter 8, Initializing
Database Devices
Chapter 8, Initializing
Database Devices
Chapter 8, Initializing
Database Devices
CHAPTER 6
Command
disk mirror
name = "dev_name"
mirror = "phys_name"...
Task
See
Chapter 2, Mirroring
Database Devices, in
System
Administration
Guide: Volume 2
Table 6-4 lists the commands used in object placement. For information about
how object placement affects performance, see Chapter 1, Controlling
Physical Data Placement, in the Performance and Tuning Series: Physical
Database Tuning.
Table 6-4: Commands for placing objects on disk resources
Command
create database...on dev_name
or
alter database...on dev_name
create database...
or
alter database...
sp_addsegment seg_name,
dbname, devname
and
Task
See
Chapter 6,
Creating and
Managing User
Databases, in
System
Administration
Guide: Volume 2
Chapter 6,
Creating and
Managing User
Databases, in
System
Administration
Guide: Volume 2
Chapter 8, Creating
and Using Segments
Chapter 8, Creating
and Using Segments
Chapter 8, Creating
and Using Segments
sp_extendsegment seg_name,
dbname, devname
create table...on seg_name
or
create index...on seg_name
create table...
or
create index...
in System
Administration
Guide: Volume 2
in System
Administration
Guide: Volume 2
in System
Administration
Guide: Volume 2
285
Performance for tables or databases where speed of disk reads and writes
is crucial, properly placing database objects on physical devices yields
performance improvements. Disk mirroring slows the speed of disk
writes.
Recovery
Recovery is the key motivation for using several disk devices. You can mirror
database devices to achieve nonstop recovery. You can also ensure full
recovery by storing a databases log on a separate physical device.
Mirroring
Nonstop recovery in the event of a hard disk failure is guaranteed by mirroring
all Adaptive Server devices to a separate physical disk. See Chapter 2,
Mirroring Database Devices, in System Administration Guide: Volume 2.
286
CHAPTER 6
Performance
You can improve system performance by placing logs and database objects on
separate devices:
When log and data share devices, user log cache buffering of transaction
log records is disabled.
The master, model, and tempdb databases are installed on the master
device.
287
The master device is the default storage device for all user-created
databases.
Note After initializing new devices for default storage, remove the master
device from the default storage area with sp_diskdefault. Do not store user
databases and objects on the master device. See Designating default
If you install the audit database, sybsecurity, it is located on its own device.
288
CHAPTER 6
SYSDEVICES
Transactions
SYSUSAGES
Transactions
One row
for each
fragment
Master
database
segmap
User
database
segmap
SYSSEGMENTS
Transactions
1
N
One row for
each data or
index
partition
1
segment
One row
for each
segment
SYSPARTITIONS
Transactions
SYSINDEXES
Student Info
segment
289
The disk init command adds entries for database devices to master..sysdevices.
Dump devices, added using sp_addumpdevice, are discussed in Chapter 11,
Developing a Backup and Recovery Plan, in the System Administration
Guide: Volume 2
sysdevices stores two names for each device:
A logical name or device name, used in all subsequent storagemanagement commands, is stored in the name column of sysdevices. This
is usually a user-friendly name, perhaps indicating the planned use for the
device, for example, logdev or userdbdev.
The physical name is the actual operating system name of the device. Use
this name only in the disk init command; after that, all Adaptive Server data
storage commands use the logical name.
Volume 2.
290
CHAPTER 6
291
292
CH A PTE R
This chapter discusses the steps the system administrator and system
security officer of each Adaptive Server must execute to enable remote
procedure calls (RPCs).
Topic
Overview
Page
293
294
300
304
305
305
Overview
Users on a local Adaptive Server can execute stored procedures on a
remote Adaptive Server. Executing an RPC sends the results of the remote
process to the calling process, which usually appears on the users screen.
To enable RPCs, the system administrator and system security officer of
each Adaptive Server must execute the following steps:
293
Add the remote login name as a user of the appropriate database and
grant that login permission to execute the procedure. (If execute
permission is granted to public, the user does not need to be granted
specific permission.)
sp_addserver ROSE
create login joe
sp_addremotelogin ROSE, joe
sp_adduser joe (in the appropriate database)
grant execute on procedure_name to joe
294
CHAPTER 7
Use
sp_addserver
sp_helpserver
sp_addserver
sp_serveroption
sp_dropserver
See
Adding a remote server on page 295
Managing remote server names on page 296
Setting server connection options on page 297
Getting information about servers on page 299
Dropping remote servers on page 299
Provide a local name for the remote server. For example, if the name in the
interfaces file is MAIN_PRODUCTION, you may want to call it simply
main.
where:
lname provides the local call name for the remote server. If this name
is not the same as the remote servers name in the interfaces file, provide
that name as the third parameter, pname.
The remote server must be listed in the interfaces file on the local machine.
If it is not listed, copy the interfaces file entry from the remote server and
append it to your existing interfaces file. Keep the same port numbers.
295
local identifies the server being added as a local server. The local value is
used only after starting up, or after a restart, to identify the local server
name so that it can appear in messages printed out by Adaptive Server. null
specifies that this server is a remote server.
Note For users to successfully run RPCs from the local server, add the
local server using the local option, and restart it. The restarting is required
to set the global variable @@servername.
pname is the remote server listed in the interfaces file for the server
named lname. This optional argument permits you to establish local
aliases for any other Adaptive Server, Open Server, or Backup Server that
you may need to communicate with. If you do not specify pname, to lname
is the default.
or:
GATEWAY...sp_who
296
CHAPTER 7
srvname is the unique server name that users must supply when executing
remote procedure calls.
srvnetname is the servers network name, which must match the name in
the interfaces file.
To add or drop servers from your network, use sp_addserver to update the
servers network name in srvnetname.
For example, to remove the server MAIN from the network, and move your
remote applications to a server named TEMP, use the following statement to
change the network name, while keeping the local alias:
sp_addserver MAIN, null, TEMP
sp_addserver displays a message telling you that it is changing the network
name of an existing server entry.
297
After you set timeouts to false on both servers, when a user executes an RPC in
either direction, the site handler on each machine runs until one of the servers
is shut down. When the server is brought up again, the option remains false, and
the site handler is reestablished the next time a user executes an RPC. If users
execute RPCs frequently, it is probably efficient in terms of system resources
to set this option to false, since there is some system overhead involved in
setting up the physical connection.
The remote server returns an encryption key, which the client uses to
encrypt its plain text passwords.
The client then encrypts its own passwords, and the remote server uses the
key to authenticate them when they arrive.
298
CHAPTER 7
sp_helpserver [server]
sp_helpserver checks for both srvname and srvnetname in the
master.sysremotelogins table.
where:
droplogins allows you to drop a remote server and all of that servers
remote login information. If you do not use droplogins, you cannot drop a
You do not have to use droplogins to drop the local server; that entry does not
have remote login information associated with it.
299
All logins from one remote server can be mapped to one local name. For
example, all users sending remote procedure calls from the MAIN server
might be mapped to remusers.
All logins from one remote server can use their remote names.
The first option can be combined with the other two options, and its specific
mapping takes precedence over the other two more general mappings. The
second and third options are mutually exclusive; you can use either of them,
but not both.
Changing the
mapping option
If the local names are not listed in master..syslogins, use create login to add
them as Adaptive Server logins before you add the remote logins.
Only a system administrator can execute sp_addremotelogin. See the Reference
Manual: Procedures.
300
CHAPTER 7
If you use sp_addremotelogin to map all users from a remote server to the same
local name, use sp_remoteoption to specify the trusted option for those users.
For example, if all users from server GATEWAY that are mapped to albert
are to be trusted, specify:
sp_remoteoption GATEWAY, albert, NULL, trusted, true
If you do not specify logins as trusted, they cannot execute RPCs on the local
server unless they specify passwords for the local server when they log in to
the remote server. Users can run ct_remote_pwd to specify a password for
server-to-server connections when they use Open Client Client-Library. isql
and bcp do not permit users to specify a password for RPC connections. See
Password checking for remote users on page 304 for more information about
sp_remoteoption.
Warning! Do not map more than one remote login to a single local login, as it
reduces individual accountability on the server. Audited actions can be traced
only to the local server login, not to the individual logins on the remote server.
301
If users are logged in to the remote server using unified login, the logins must
be designated as trusted on the local server, or they must specify passwords for
the server when they log in to the remote server.
Warning! Using the trusted mode of sp_remoteoption reduces the security of
your server, as passwords from such trusted users are not verified.
Use create login to create a login for each login from the remote server.
302
CHAPTER 7
1
1
1
3
4
joe
nancy
NULL
NULL
NULL
1
2
3
4
-1
By matching the value of remoteserverid in this result and the value of srvid in
the previous result, you can find the name of the server for which the
remoteusername is valid. For example, in the first result, srvid 1 indicates the
CORPORATE server; in the second result, remoteserverid 1 indicates that same
server. Therefore, the remote user login names joe and nancy are valid on
the CORPORATE server.
The following statement shows the entries in master..syslogins:
select suid, name from syslogins
suid
name
----------------1
sa
2
vp
3
admin
4
writer
The remote user name joe (suid 1) on the remote CORPORATE server
(srvid and remoteserverid 1) is mapped to the sa login (suid 1).
303
The remote user mapping procedures and the ability to set permissions for
individual stored procedures give you control over which remote users can
access local procedures. For example, you can allow the vp login from the
CORPORATE server to execute certain local procedures and all other logins
from CORPORATE to execute the procedures for which the admin login has
permission.
Note Typically, the passwords for users on the remote server must match
For example, to set trusted mode for the user bob, enter
sp_remoteoption GATEWAY, pogo, bob, trusted,
true
304
CHAPTER 7
To change your password in untrusted mode, you must first change it on all
the remote systems you access before you can change it on your local server. If
you change your password on the local server first, when you issue the remote
procedure call to execute sp_password on the remote server, your passwords no
longer match.
The syntax for changing your password on the remote server is:
remote_server...sp_password caller_passwd, new_passwd
See Chapter 5, Managing Adaptive Server Logins and Database Users, in the
Security Administration Guide.
sp_helpremotelogin
server
--------GATEWAY
GATEWAY
remote_user_name
---------------**mapped locally**
pogo
local_user_name
----------------**use local name**
bob
options
-------untrusted
untrusted
305
Default
1
20
10
20
3
306
CH A PTE R
Topic
Database devices
Page
307
308
308
314
316
316
318
Database devices
A database device stores the objects that make up databases. The term
device does not necessarily refer to a distinct physical device: it can refer
to any piece of a disk (such as a disk partition) or a file in the file system
that is used to store databases and their objects.
Each database device or file must be prepared and made known to
Adaptive Server before it can be used for database storage. This process
is called initialization.
After a database device has been initialized, it can be:
Allocated to the default pool of devices for the create and alter
database commands
307
Note Before you run disk init, see the installation documentation for your
platform for information about choosing a database device and preparing it for
use with Adaptive Server. You may want to repartition the disks on your
computer to provide maximum performance for your Sybase databases.
disk init divides the database devices into allocation units, groups of 256
logical pages. The size of the allocation unit depends on which logical page
size your server is configured for (2, 4, 8, or 16K). In each allocation unit, the
disk init command initializes the first page as the allocation page, which
contains information about the database (if any) that resides on the allocation
unit.
Warning! After you run the disk init command, dump the master database. This
makes recovery easier and safer in case master is damaged. See Chapter 13,
Restoring the System Databases, in System Administration Guide: Volume 2.
308
CHAPTER 8
309
If you do not include a unit specifier for the size argument of disk init or
disk reinit, size is measured, by default, in number of virtual pages. Thus,
if you enter size = 15000, Adaptive Server assumes 15,000 virtual
pages. A virtual page is 2048 bytes.
You can increase, but not decrease, the size of an existing database device
using the disk resize command.
If you are planning to use the new device for the creation of a new
database, the minimum size depends on the logical page size used by the
server, described in Table 8-1:
Table 8-1: Minimum database sizes
Logical page size
2K
4K
3MB
6MB
8K
16K
12MB
24MB
You cannot have a database smaller than the model database. A model database
larger than the minimums listed above, determines the minimum database size.
Adaptive Server allocates and manages database space in allocation units,
which are groups of 256 logical pages. The smallest database you can create
(using create database) is 1MB; therefore, the size of the smallest usable
database device is the larger of 1MB or 256 logical pages (for a 2K or 4K
logical page size, this is 1MB for a 8K logical page size, this is 2MB, for a 16K
logical page size, this is 4MB.
310
CHAPTER 8
Keep this grouping of 256 pages in mind when you decide how large to make
a device to avoid wasting space. For example, if your installation uses a 16k
logical page size, specifying a device as size = '31M' leaves 3MB wasted at
the end of the device, since an allocation unit is 4MB.
If you are initializing a raw device, determine the size of the device from your
operating system, as described in the installation guide for your platform. Use
the total size available, up to the maximum for your platform. After you have
initialized the disk for use by Adaptive Server, you cannot use any space on that
raw device for any other purpose.
disk init uses size to compute the value for the high virtual page number in
sysdevices.high. The values for sysdevices.high and sysdevices.low are virtual
page numbers in 2K-byte blocks, which is the Adaptive Server unit of physical
disk management. This may not be the same as your installation's logical page
size
Note If the physical device does not contain the number of blocks specified by
the size parameter, disk init fails. If you use the optional vstart parameter, the
physical device must contain the sum of the blocks specified by both the vstart
and size parameters, or the command fails.
Instead, writes to the database device take place directly to the physical media.
311
If database device files use the dsync option, the Adaptive Server engine
that is writing to the device file waits until the write operation completes.
This may cause poor performance during update operations.
When dsync is on, write operations to database device files may be slower
compared to earlier versions of Adaptive Server (where dsync is not
supported). This is because Adaptive Server must write data to disk
instead of simply copying cached data to the UNIX file system buffer.
In cases where highest write performance is required (but data integrity
after a system failure is not required) turning dsync off yields device file
performance similar to earlier Adaptive Server versions. For example, you
may consider storing tempdb on a dedicated device file with dsync
disabled, if performance is not acceptable while using dsync.
Response time for read operations is generally better for devices stored on
UNIX operating system files as compared to devices stored on raw
partitions. Data from device files can benefit from the UNIX file system
cache as well as the Adaptive Server cache, and more reads may take place
without requiring physical disk access.
312
For the master device, dsync is always set to true and you cannot change
the setting.
When you upgrade from an Adaptive Server earlier than version 12.x,
dsync is set to true only for the master device file. Use sp_deviceattr to
change the dsync setting for any other device files.
Adaptive Server ignores the dsync setting for database devices stored on
raw partitions. Writes to devices stored on raw partitions are always
directly to the physical media.
CHAPTER 8
The directio and dsync parameters are mutually exclusive. If a device has
dsync set to true, you cannot set directio to true for the same device. To
enable directio for a device, you must first reset dsync to false.
By default, the directio option is set to false (off) for all platforms.
Note Devices used for databases for which recovery is not important (for
example, tempdb), may, by default, have dsync set to false. For these devices,
enabling directio may have an adverse performance effect, so carefully review
device use before you enable directio.
This example creates a device named user_disk that uses directio to write data
directly to disk:
disk init
name = "user_disk",
physname = "/usr/u/sybase/data/userfile1.dat",
size = 5120, directio = true
313
For example, the following enables directio disk writes for the user_disk
device:
sp_deviceattr user_disk, directio, true
If you do not specify a unit size, vstart uses 2K pages for its starting
address. For example, if you specify vstart = 13, Adaptive Server uses
13 * 2K pages as the offset for the starting address.
If you specify a unit value, vstart uses the value you enter as the starting
address. For example, if you specify vstart = "13M", Adaptive Server
sets the starting address offset at 13MB.
The default, and usually preferred value, of vstart is 0. If the specified device
does not have the sum of vstart + size blocks available, the disk init command
fails.
The optional cntrltype keyword specifies the disk controller. Its default value is
0. Reset it only if instructed to do so by your system administrator.
Note To perform disk initialization, the user who started Adaptive Server must
have the appropriate operating system permissions on the device that is being
initialized.
When used without a device name, sp_helpdevice lists all the devices available
on Adaptive Server. When used with a device name, it lists information about
that device. Here, sp_helpdevice is used to report information about the master
device:
314
CHAPTER 8
device_name
----------master
status
-----3
sp_helpdevice master
physical_name description
-------------- -----------------------------------------d_master
special, default disk, physical disk, 30 MB
cntrltype
---------0
vdevno
------0
vpn_low
------0
vpn_high
--------10239
One for the sybsystemprocs database, which you can use to store
additional databases such as pubs2 and sybsyntax, or for user databases
and logs
Meaning
Default disk (may be used by any create or alter database command that does not specify a location)
2
4
Physical disk
Logical disk (not used)
8
16
32
64
Serial writes
Device mirrored
315
Dropping devices
Bit
Meaning
128
256
Reads mirrored
Secondary mirror side only
512
2048
Mirror enabled
Used internally; set after disk unmirror, side = retain
4096
8192
16384
UNIX file device uses dsync setting (writes occur directly to physical media)
For more information about dump devices and sp_addumpdevice, See Chapter
11, Developing a Backup and Recovery Plan in the System Administration
Guide: Volume 2.
Dropping devices
To drop database and dump devices, use sp_dropdevice:
sp_dropdevice logicalname
You cannot drop a device that is in use by a database. You must drop the
database first.
sp_dropdevice removes the device name from sysdevices. sp_dropdevice does
not remove an operating system file; it only makes the file inaccessible to
Adaptive Server. Use operating system commands to delete a file after using
sp_dropdevice.
316
CHAPTER 8
After adding user devices, use the defaultoff option to remove the master device
from the pool of default space:
sp_diskdefault master, defaultoff
The following designates sprocdev, the device that holds the sybsystemprocs
database, a default device:
sp_diskdefault sprocdev, defaulton
Adaptive Server can have multiple default devices. They are used in the order
in which they appear in the sysdevices table (that is, alphabetical order). When
the first default device is filled, the second default device is used, and so on.
Note After initializing a set of database devices, you may want to assign them
to specific databases or database objects rather than adding them to the default
pool of devices. For example, you may want to make sure a table never grows
beyond the size of a particular device.
You can use the device that holds sybsystemprocs for other user databases.
Note If you are using disk mirroring or segments, exercise caution in deciding
which devices you add to the default list. In most cases, devices that are to be
mirrored, or databases that contain objects placed on segments should
specifically allocate devices, rather than being made part of default storage.
317
2K
4K
0.5MB
1MB
1MB
1MB
8K
16K
2MB
4MB
2MB
4MB
Use audit trails on disk resize to track the number of times a device is resized.
The device being resized is always online and available for users during the
resize operation.
Resizing a disk requires that:
You disable mirroring while the resize operation is in progress. You can
reestablish mirroring when the resize operation is complete.
318
description
vpn_low
vpn_high
CHAPTER 8
319
320
CH A PTE R
Topic
Using the sp_dboption procedure
Page
321
322
323
Transaction behavior
Table-colum defaults
Log behavior
The system administrator and the database owner can use database options
to configure settings for an entire database. Database options differ from
sp_configure parameters, which affect the entire server, and set options,
which affect only the current session or stored procedure.
You can change options only for user databases. You cannot change
options for the master database. To change a database option in a user
database (or to display a list of the database options), execute sp_dboption
while using the master database.
321
322
CHAPTER 9
sp_helpdb mydb
name
----mydb
db_size
------20.0 MB
device_fragments
----------------master
owner
----sa
dbid
---5
created
-----------Mar 05, 2005
size
usage
------ -----------10.0 MB data and log
device
-----------------------------master
master
master
status
------------------read only
created
-------Mar 05 2005
free kbytes
----------1792
segment
-----------------------------default
logsegment
system
323
Trace flags and switches set for a specific system process ID (spid)
with set switch on
sysoptions shows only the switches that are visible to the user. Users
cannot see switches set privately by other spids. The value for number is
Null for all option categories other than switches.
sysoptions displays this information for switches:
defaultsetting contains 0.
324
CHAPTER 9
This query displays the switches set for the current session:
select * from sysoptions
where category = 'Switch'
and currentsetting = '1'
This shows the sysoptions output after setting trace flag 3604:
spid
name
defaultsetting
scope
----------------------------------------------------------11
print_output_to_client
0
8
category
currentsetting
number
--------------- ---------------------------Switch
1
3604
325
326
CH A PTE R
1 0
Page
327
328
329
331
331
341
349
350
352
363
365
327
328
CHAPTER 10
Order processing applications in New York City, Mexico City, and Paris
(Client-Library applications)
The inventory control server and the order fulfillment server respond to
queries, and the accounting application collects financial data and generates
reports.
The system looks like this:
329
Order processing
New York City (PC)
Order fulfillment
France
English
Order processing
Mexico City (UNIX)
Inventory control
Germany
Spanish
Order processing
Paris (Mac)
Accounting gateway
Japan
Account server
Japan
French
In this example, all applications and servers use local languages and character
sets to accept input and output messages.
330
CHAPTER 10
Character set the language in which the server sends and receives data to
and from the client servers. Select the character set after carefully planning
and analyzing the language needs of all client servers.
Sort order sort order options are dependent on the language and character
set you select.
331
332
CHAPTER 10
Group 2
Group 4
Group 5
Languages
Character sets
Albanian, Catalan,
Danish, Dutch, English, Faeroese, Finnish,
French, Galician, German, Icelandic, Irish,
Italian, Norwegian, Portuguese, Spanish,
Swedish
Eastern European: Croatian, Czech, Estonian,
Hungarian, Latvian, Lithuanian, Polish,
Romanian, Slovak, Slovene (and English)
Baltic (and English)
Cyrillic: Bulgarian, Byelorussian, Macedonian,
Russian, Serbian, Ukrainian (and English)
Western European:
Group 6
Group 7
Group 8
Group 9
Group 101
Group 102
Group 103
Group 104
Group 105
Group 106
Unicode
UTF-8
a. CP 1252 is identical to ISO 8859-1 except for the 0x800x9F code points which are mapped to characters in CP 1252.
b. CP 950 is identical to Big 5.
Note The English language is supported by all character sets because the first
128 (decimal) characters of any character set include the Latin alphabet
(defined as ASCll-7). The characters beyond the first 128 differ between
character sets and are used to support the characters in different native
languages. For example, code points 0-127 of CP 932 and CP 874 both support
English and the Latin alphabet. However, code points 128-255 support
Japanese characters in CP 932 and code points 128-255 support Thai characters
in CP 874.
333
The following character sets support the European currency symbol, the
euro: CP 1252 (Western Europe); CP 1250 (Eastern Europe); CP 1251
(Cyrillic); CP 1256 (Arabic); CP 1253 (Greek); CP 1255 (Hebrew); CP 1254
(Turkish); CP 874 (Thai); iso15, roman9 and CP858. Unicode UTF-8 also
supports:
Note iso_1 and ISO 8859-1 are different names for the same character set.
To mix languages from different language groups you must use Unicode. If
your server character set is Unicode, you can support more than 650 languages
in a single server and mix languages from any language group.
Unicode
Unicode is the first character set that enables all the worlds languages to be
encoded in the same data set. Prior to the introduction of Unicode, if you
wanted to store data in, for example, Chinese, you had to choose a character set
appropriate for that languageto the exclusion of most other languages. It was
either impossible or impractical to mix character sets, and thus diverse
languages, in the same data set.
Sybase supported Unicode in the form of three datatypes: unichar, univarchar,
and unitext. These datatypes store data in the UTF-16 encoding of Unicode.
UTF-16 is an encoding wherein Unicode scalar values are represented by a
single 16-bit value (or, in rare cases, as a pair of 16-bit values). The three
encodings are equivalent insofar as either encoding can be used to represent
any Unicode character. The choice of UTF-16 datatypes, rather than a UTF-16
server default character set, promotes easy, step-wise migration for existing
database applications.
Adaptive Server supports Unicode literals in SQL queries and a wide range of
sort orders for UTF-8.
334
CHAPTER 10
Configuration parameters
The UTF-16 encoding of Unicode includes surrogate pairs, which are pairs
of 16-bit values that represent infrequently used characters. Additional
checking is built in to Adaptive Server to ensure the integrity of surrogate pairs.
You can switch this checking off by setting the configuration parameter
enable surrogate processing to 0. This yields slightly higher performance,
although the integrity of surrogate pairs is no longer guaranteed.
335
0x00650301
Functions
All functions taking char parameters have been overloaded to accept unichar as
well. Functions with more than one parameter, when called with at least one
unichar parameter, results in implicit conversion of any non-unichar parameters
to unichar.
To guarantee the integrity of surrogate pairs when enable surrogate processing
is set to 1 (the default), the string functions do not allow surrogate pairs to be
split. Positions are modified to fall at the beginning of a surrogate pair.
Several functions have been added to round out the unichar support. Included
are the functions to_unichar() and uscalar(), which are analogous to char() and
ascii(). The functions uhighsurr() and ulowsurr() allow the explicit handling of
surrogate pairs in user code.
There are restrictions when using unitext with functions. For information, see
the restriction description under the Usage section for each function.
336
CHAPTER 10
whereas:
% isql -Usa -P -Jutf8
1> select unicode_name from people where unicode_name = 'Jones'
2> go
unicode_name
-----------------------------------------------------------------Jones
(1 row affected)
This facilitates ad hoc queries. Not all terminal windows are capable of
displaying the full repertoire of Unicode characters, but simple tests involving
ASCII characters are greatly simplified.
Using unitext
The variable-length unitext datatype can hold up to 1,073,741,823 Unicode
characters (2,147,483,646 bytes). You can use unitext anywhere you use the text
datatype, with the same semantics. unitext columns are stored in UTF-16
encoding, regardless of the Adaptive Server default character set.
Java interoperability
The internal JDBC driver efficiently transfers unichar data between SQL and
Java contexts.
Going from SQL to Java, the class java.sql.ResultSet provides a number of
get methods to retrieve data from the columns of a result set. Any of these
get methods work with columns defined as unichar, unitext, or univarchar. The
method getString() is particularly efficient since no conversion needs to be
performed.
337
Limitations
Because the earlier releases of Adaptive Server did not include a
Unicode-based language parser, a restriction was imposed on the use of the
new Unicode datatypes. To use the new datatypes, the server required its
default character set to be configured as UTF-8. This restriction has been
removed in Adaptive Server release 12.5.1 and later. Unicode datatypes can be
used regardless of the servers default character set.
338
CHAPTER 10
For example, if most of your clients use CP 850, specify CP 850 on your server.
You can do this even if your server is on an HP-UX system (where its native
character set for the Group 1 languages is ROMAN8).
Note Sybase strongly recommends that you decide which character set to use
as your default before you create any databases or make any changes to the
Sybase-supplied databases.
In the example below (Figure 10-2), 175 clients all access the same Adaptive
Server. The clients are on different platforms and use different character sets.
The critical factor that allows these clients to function together is that all of the
character sets in the client/server system belong to the same language group
(see Table 10-1 on page 333). The default language for the Adaptive Server is
CP 850, which is the character set used by the largest number of clients. This
allows the server to operate most efficiently, with the least amount of character
set conversion.
339
Figure 10-2: Clients using different character sets in the same language
group
CP 850
100 Clients
ASE
CP 850
ISO 8859-1
50 Clients
Macintosh Roman
25 Clients
To help you choose the default character set for your server, the following
tables list the most commonly used character sets by platform and language.
340
CHAPTER 10
Language
U.S. English, Western Europe
Character set
CP 1252
Win NT 4.0
Win 2000
CP 1252
CP 1252
Sun Solaris
HP-UX 10,11
ISO 8859-1
ROMAN8
ISO 8859-1
Language
Japanese
Character set
CP 932 for Windows
Win NT 4.0
Japanese
Win 2000
Sun Solaris
Japanese
Japanese
HP-UX 10,11
IBM AIX 4.x
Japanese
Japanese
EUC-JIS
EUC-JIS
Language
Character set
Win 95, 98
Win NT 4.0
Chinese (simplified)
Chinese (simplified)
Win 2000
Sun Solaris
Chinese (simplified)
Chinese (simplified)
HP-UX 10,11
IBM AIX 4.x
Chinese (simplified)
Chinese (simplified)
EUC-GBS
EUC-GB
341
Each character set comes with one or more sort orders that Adaptive Server
uses to collate data. A sort order is tied to a particular language or set of
languages and to a specific character set. The same sort orders can be used for
English, French, and German because they sort the same characters identically,
for example, A, a, B, b, and so on. Or the characters are specific to one of the
languagesfor example, the accented characters, , , and , are used in
French but not in English or Germanand therefore, there is no conflict in
how those characters are sorted. The same is not true for Spanish however,
where the double letters ch and ll are sorted differently. Therefore, although the
same character sets support all four languages, there is one set of sort orders for
English, French and German, and a different set of sort orders for Spanish.
In addition, a sort order is tied to a particular character set. Therefore, there is
one set of sort orders for English, French, and German in the ISO 8859-1
character set, another set in the CP 850 character set, and so on. The sort orders
available for a particular character set are located in sort order definition files
(*.srt files) in the character set directory. For a list of character sets and their
available sort orders, see Table 10-5 on page 344.
Create indexes
342
CHAPTER 10
343
You can use the sortkey function to setup customized alternative sort orders for
your dataone for each language.These sort orders can be selected
dynamically to meet the needs of different users. The sortkey function is
separate from the default sort order, but can coexist in the same server. The
range and depth of sort orders provided by the sortkey function is better than
those provided by the default sort order mechanism. For more information, see
sortkey and compare in the Reference Manual: Building Blocks.
Table 10-5: Available sort orders
Language or script
All languages
Cyrillic: Bulgarian,
Byelorussian,
Macedonian, Russian,
Serbian, Ukrainian
Character sets
UTF-8
Sort orders
Multiple sort orders, see Table 10-7 for list
Eastern European:
Czech, Slovak
English, French,
German
English, French,
German
CP 850, CP 858
Greek
ISO 8859-7
Hungarian
ISO 8859-2
Japanese
Kazakh
Russian
87
CP 866, CP 1251, ISO 8859-5,
Koi8, Macintosh Cyrillic
50
Dictionary order, case sensitive, accent sensitive
344
CHAPTER 10
Language or script
Character sets
Sort orders
Scandinavian
CP 850
Simplified Chinese
Spanish
Thai
Turkish
ISO 8859-9
Western European
CP 1252
If your language does not appear here, there is no language-specific sort order
for your language. Select a binary sort order and then investigate whether the
sortkey function meets your needs. As this table illustrates, many languages
have more than one sort order.
345
Improved performance occurs in queries that access ASCII and gbpinyin data.
However, if the data set has a mixture of other characters, you may not see any
performance improvement.
See Chapter 9, Configuring Character Sets, Sort Orders, and Languages in
the System Administration Guide for information about configuring Adaptive
Server to use the gbpinyin and gbpinyinocs sort orders.
Selecting case-insensitive sort orders for Chinese and Japanese character sets
Use two stored procedures to select case-insensitive sort orders:
sp_helpsort
sp_helpsort
sp_configure
sp_helpsort
----------Name
ID
------------------------nocase_eucgb
52
nocase_cp936
52
nocase_gb18030
52
nocase_eucjis
52
nocase_sjis
52
nocase_deckanji
52
sp_configure
346
CHAPTER 10
ID
20
Description
Default Unicode multi-lingual ordering
thaidict
iso14651
21
22
utf8bin
binary
24
25
altnoacc
altdict
39
45
Alternate accent-insensitive
Alternate dictionary ordering
altnocsp
scandict
46
47
scannocp
bin_utf8
48
50
dict
nocase
51
52
nocasep
noaccent
53
54
espdict
espnocs
55
56
espnoac
rusnocs
57
59
cyrnocs
elldict
64
65
hundict
hunnoac
69
70
hunnocs
turknoac
71
73
ID
129
Description
Ordering that matches the binary ordering of CP932
dynix
gb3213bn
130
137
cyrdict
turdict
140
155
euckscbn
gbpinyin
161
163
347
Name
ID
Description
rusdict
sjisbin
165
179
eucjisbn
big5bin
192
194
To view this sort order list in Adaptive Server, use sp_helpsort. See the
Reference Manual: Procedures.
You can add sort orders using external files in the $SYBASE/collate/Unicode
directory. The names and collation IDs are stored in syscharsets. The names of
external Unicode sort orders do not have to be in syscharsets before you can
set the default Unicode sort order.
Note External Unicode sort orders are provided by Sybase. Do not attempt to
The same holds true for all other comparison operators, as well as the
concatenation operator +, the operator in, and the operator between.
Once again, the goal is to retain compatibility with existing database
applications.
Tables joins based on equality (equijoins) deserve special mention. These are
generally optimized by the server to take advantage of indexes that defined on
the participating columns. When a unichar column is joined with a char
column, the latter requires a conversion, and since the character sort order and
the Unicode sort order are distinct, the optimizer will ignore the index on the
char column.
348
CHAPTER 10
In Adaptive Server version 12.5.1 and later, when the servers default character
set is configured to UTF-8, you can configure the server's default sort order (for
char data) to be any of the above sort orders. Prior to this version, the binary
sort order bin_utf8 (ID=50) was the only well-behaved sort order for UTF-8.
Although not required, the sort order for char data in UTF-8 can be selected so
that it corresponds with the sort order for unichar.
There is a potential confusion regarding choice of binary sort orders for
Unicode. The sort order named binary is the most efficient one for unichar
data (UTF-16), and is thus the default. This order is based on the Unicode
scalar value, meaning that all 32-bit surrogate pairs are placed after all 16-bit
Unicode values. The sort order named utf8bin is designed to match the order
of the default (most efficient) binary order for UTF-8 char data, namely
bin_utf8. The recommended matching combinations are thus binary for
unichar and binary for UTF-8 char, or utf8bin for unichar and bin_utf8
for UTF-8 char. The former favors unichar efficiency, while the latter favors
char efficiency. Avoid using utf8bin for UTF-8 char, since it is equivalent to
bin_utf8 but less efficient.
349
Table 10-8 displays the supported system message languages and their
language groups. Each user can select only one language per session for system
messages.
Table 10-8: Supported system messages
Language group
Group 1
Group 2
Polish
Character sets
ASCII 8, CP 437, CP 850, CP 860,
CP 863, CP 1252, ISO 8859-1, ISO
8859-15, Macintosh Roman, ROMAN8
Cp 1250, CP 852, ISO 8859-2
Group 101
Group 102
Japanese
Simplified Chinese (PRC)
Group 104
Group 105
Korean
Thai
EUC-KSC, CP 949
CP 874, TIS 620
Unicode
UTF-8
English
Install Language Modules for all languages in which clients will receive
messages. These Language Modules, located in the locales subdirectory of the
Adaptive Server installation directory, are part of a group of files called
localization files. For information about localization files and the software
message directory structure, see Types of localization files on page 366.
A Spanish-version server
This examples shows how to set up a new server with all clients using the same
language. To do this:
350
CHAPTER 10
Select the server language, in this case, Spanish. By reviewing Table 10-1
on page 333, you see that Spanish is part of language group 1. Based on
your platform, select a character set from language group 1. Sybase
recommends that you select the character set used by the greatest number
of clients. Or, if you think your company might someday expand into other
countries and languages, you might consider installing Unicode (see
Selecting the character set for your server on page 331).
Install the Spanish Language Module in the server. This allows clients to
view system messages in Spanish.
Select the default sort order. By referring to Table 10-5 on page 344, you
see that Spanish has three possible sort orders, in addition to binary sort
order. Select a sort order.
Select the default character set for your server. If you install a character set
from language group 101 (Japanese), you can support both Japanese and
English data in the same server.
Select the sort order. By referring to Table 10-5 on page 344, you can see
that a binary sort order is the only sort order available for Japanese.
Therefore, both the English and Japanese clients have a default binary sort
order. Consider using the sortkey function to provide solutions for both
audiences.
Make sure that each Japanese user requests Japanese messages by default.
Since you are using a character set from language group 101, and you have
already installed the Japanese Language Module, your client in Japan sees
messages in Japanese, while clients in the U.S. can choose to see messages
in either English or Japanese.
351
Select the default server language and character set. Since your company
is based in Japan and most of your clients are located in Japan, the default
server language should be Japanese. But you also want your clients in
France, Germany, and Spain to be able to send and receive data in their
native languages. By reviewing Table 10-1 on page 333, you can see that
Japanese is part of language group 101, while French, German, and
Spanish are part of language group 1. Since the languages you need are not
part of the same language group, the only way you can have all of these
languages on the same server is to select Unicode as your default character
set.
Install the Language Modules for Japanese, French, German, and Spanish.
Select the binary sort order, since this is the only sort order available for
the Unicode character set. (You can, however, consider using the sortkey
function inside your application code to supply data sorted according to
each users preference.)
352
CHAPTER 10
When you change the default character set in Adaptive Server, you must
convert any existing data to the new default character set. Conversion is
unnecessary only if:
You are absolutely certain that data in the server uses only ASCll-7. In this
case, you can change the default without first copying your data out of the
server.
In all other cases, you must convert the existing data as follows:
1
Use bcp with the appropriate flags for data conversion to copy the data
back into the server.
See the Utility Guide for more information about using bcp to copy data.
Warning! After converting data to a different character set (particularly to
UTF-8), the data may be too large for the allocated column size. Re-create the
columns affected with a larger size.
Code conversion between the character set of the existing data and the new
default character set must be supported. If it is not, conversion errors will occur
and the data is not converted correctly. See Chapter 11, Configuring
Client/Server Character Set Conversions, for more information about
supported character set conversions.
353
Even if conversions are supported between the character sets, some errors may
occur due to minor differences between the character sets, or because some
characters do not have equivalents in other character sets. Rows containing
problematic data may not get copied back into the database, or data may
contain partial or invalid characters.
354
CHAPTER 10
A database contains character data and you want to convert the data to a
new character set. Do not load a database dump of the data into a server
that uses the new default character set. Adaptive Server assumes the
loaded data is in the new character set, and corrupts the data.
You are changing the default sort order only and not the default character
set. You cannot load a database from a dump performed prior to changing
the sort orderif you attempt to, an error message appears, and Adaptive
Server aborts the load.
You change the default character set, and either the old or the new sort
order is not binary. You cannot load a database dump that was made before
you changed the character set.
You cannot reload your data from a database dump once you have reconfigured
the default character set and sort order (unless both old and new character sets
use a binary sort order and no conversion is required between the old and new
character sets). See Changing the default character set on page 353 for more
information,
355
Unicode examples
In the following example, a fictitious database named xpubs is modified to use
univarchar columns.
Schema
Assume a database was created using the following script on a server that has
all the installation defaults, namely character set iso_1 and default sort order
ID 50, binary_iso_1.
> create database xpubs
> go
> use xpubs
> go
> create table authors (au_id int, au_lname
varchar(255), au_fname varchar(255))
> go
> create index au_idx on authors(au_lname, au_fname)
> go
Then the data was loaded into the server using a series of inserts and updates.
Converting to UTF-8
The first step towards using Unicode is to extract the data and convert it to
UTF-8 form.
% bcp xpubs..authors out authors.utf8.bcp -c -Jutf8 -Usa -P
The next step to install UTF-8 as the default character set in the server:
%
%
>
>
>
>
Restart the server to modify the default character set and re-create indexes on
the system tables. Restart the server a second time, then reload the data:
%
>
>
>
>
>
isql -Usa -P
sp_dboption xpubs, 'select into', true
go
use xpubs
go
checkpoint
356
CHAPTER 10
>
>
>
>
go
delete from authors
go
quit
The columns are modified to the new datatypes, the data is converted in place,
and the index is re-created.
Preliminary steps
Before you run the installation program to reconfigure Adaptive Server:
1
Dump all user databases and the master database. If you have made
changes to model or sybsystemprocs, dump them also.
If you are changing the Adaptive Server default character set, and your
current databases contain non ASCII-7 data, use bcp to copy the existing
data out of your databases.
357
Once you have loaded the Language Module, you can run the Adaptive Server
installation program, which allows you to:
To reconfigure the language, character set, or sort order, use the sqlloc utility,
described in Utility Guide. If you are using Windows, use the Server Config
utility, described in Chapter 3, Default Adaptive Server Configuration, in the
Configuration Guide.
If you installed additional languages but did not change the Adaptive Server
character set or sort order, you have completed the reconfiguration process.
If you changed the Adaptive Server default character set, and your current
databases contain non ASCII-7 data, copy your data back into your databases,
using bcp with the necessary flags to enable conversion.
If you changed the Adaptive Server default sort order or character set, see
Reconfiguring the character set, sort order, or message language on page
355.
358
CHAPTER 10
359
where tab_name is the name of the table you are investigating. If tab_name is
missing, sp_indsuspect creates a list of all tables in the current database that has
indexes marked suspect when the sort order changes.
This example shows that running sp_indsuspect in mydb database yields one
suspect index:
sp_indsuspect
Suspect indexes in database mydb
Own.Tab.Ind (Obj_ID, Ind_ID) =
dbo.holdings.h_name_ix(160048003, 2)
In the preceding example, dbcc reindex discovers one or more suspect indexes
in the table titles; it drops and re-creates the appropriate indexes.
If the indexes for a table are already correct, or if there are no indexes for the
table, dbcc reindex does not rebuild any indexes. It displays a message instead.
If a table is suspected of containing corrupt data, the command is aborted. If
that happens, an error message instructs the user to run dbcc checktable.
When dbcc reindex finishes successfully, all suspect marks on the tables
indexes are removed. The read-only mark on the table is also removed, and
the table can be updated. These marks are removed whether or not any indexes
have to be rebuilt.
360
CHAPTER 10
dbcc reindex does not reindex system tables. System indexes are checked and
rebuilt, if necessary, as an automatic part of recovery after Adaptive Server is
restarted following a sort order change.
The system administrator or table owner must run dbcc fix_text to calculate the
new values needed.
The syntax of dbcc fix_text is:
dbcc fix_text (table_name | table_id)
If you run out of log space, clear out your log (see Chapter 12, Backing Upa
and Restoring User Databases, in System Administration Guide: Volume 2).
Then restart dbcc fix_text, using the same table that was being upgraded when
the original dbcc fix_text halted. Each multibyte text value contains information
that indicates whether it has been upgraded, so dbcc fix_text upgrades only the
text values that were not processed in earlier passes.
361
If your database stores its log on a separate segment, you can use thresholds to
manage clearing the log. See Chapter 16, Managing Free Space with
Thresholds, in System Administration Guide: Volume 2.
If dbcc fix_text cannot acquire a needed lock on a text page, it reports the
problem and continues with the work, like this:
Unable to acquire an exclusive lock on text page 408.
This text value has not been recalculated. In order to
recalculate those TEXT pages you must release the lock
and reissue the dbcc fix_text command.
If you have changed the sort order or character set and errors occurred, see
How to Manually Change Sort Order or Default Character Set in the
Adaptive Server Enterprise Troubleshooting and Error Messages Guide.
362
No alter table commands, except partition by, are allowed. create index and
drop index are not allowed on a table with suspect partitions.
CHAPTER 10
If the partition condition needs fixing after a sort-order change, you can use
alter table with the partition by option to repartition a table that has suspect
partitions.
If the partition condition does not need fixing, you can use the reorg rebuild
table command to rebuild the table, redistributing only the data rows
among the partitions.
If the indexes as well as the partitions on a table are marked suspect, use
partition by or reorg rebuild to fix both the suspect index and suspect
partitions.
During the first online database command, after you execute load database
across two platforms with different endian types, the hash partition is
marked suspect.
A list of the full names of months and a list of abbreviations for the month
names
363
month abbreviations, and days of the week must be comma-separated lists with
no spaces or line feeds (returns). Also, they must contain the correct number of
elements (12 for month strings, 7 for day-of-the-week strings.)
Valid values for the date formats are: mdy, dmy, ymd, ydm, myd, and dym. The
dmy value indicates that the dates are in day/month/year order. This format
affects only data entry; to change output format, you must use the convert
function.
The query below, however, returns the date with the month names in Italian:
select convert(char(19),pubdate) from titles
364
CHAPTER 10
*.srt
*.xlt
Location
In each character set
subdirectory of the
charsets directory
In each character set
subdirectory of the
charsets directory
In each character set
subdirectory of the
charsets directory
365
cp850
charset.loc
*.srt
iso_1
charset.loc
*.srt
*.xlt
cp437
charset.loc
*.srt
mac
charset.loc
*.srt
roman8
charset.loc
*.srt
charset_name
charset.loc
*.srt
@@unicharsize equals 2.
366
CHAPTER 10
367
us_english
cp850
server.loc
common.loc
language2
iso_1
cp437
server.loc
common.loc
server.loc
common.loc
mac
server.loc
common.loc
roman8
char_set1
char_set2
server.loc
server.loc
server.loc
common.loc common.loc common.loc
368
CH A PTE R
11
Configuring Client/Server
Character Set Conversions
Topic
Character set conversion
Supported character set conversions
Page
369
370
374
376
377
378
379
379
369
For a list of the language groups and supported character sets, see Table 10-1
on page 333.
370
CHAPTER 11
Each client can view data only in the language supported by its character set.
Therefore, the Japanese client can view any Japanese data on the server, but it
cannot view Arabic or French data. Likewise, the French client can view
French or any other Western European language supported by its character set,
but not Japanese or Arabic.
Figure 11-3: Viewing Unicode data
French data
ASE
Japanese data
UTF-8
Arabic data
French: CP 1252
Japanese: CP 932
Arabic: CP 1256
371
Sybase recommends that you do not configure a server for ASCII-7. You can
achieve the same benefits of compatibility by restricting each client to use only
the first 128 characters of each native character set.
Unicode conversions
Unicode conversions exists for all native character sets. When converting
between two native character sets, Unicode conversion uses Unicode as an
intermediate character set. For example, to convert between the server default
character set (CP 437), and the client character set (CP 860), CP 437 is first
converted to Unicode; Unicode is then converted to CP 860.
Unicode conversions may be used either when the default character set of the
server is UTF-8, or a native character set. You must specifically configure your
server to use Unicode conversions (unless the servers default character set is
UTF-8).
Earlier versions of Adaptive Server used direct conversions, and it is the
default method for character set conversions. However, Unicode conversions
allow easier and less complex character set conversion. While Adaptive Server
direct conversions are still supported, Sybase now also uses Unicode
conversions to provide complete conversion support for all character sets and
has no plans to add new direct conversions.
372
CHAPTER 11
Parameters:
Escaped string literals (those prefixed with U&), regardless of the servers
character set
lower()
sortkey()
char_length()
ltrim()
soundex()
charindex()
patindex()
str_replace()
compare()
replicate()
stuff()
datalength()
reverse()
substring()
difference()
right()
upper()
left()
rtrim()
uscalar()
len()
Note This feature does not affect UTF-16 surrogate handling enabled with the
enable surrogate handling configuration parameter. See Setting Configuration
373
If all character sets in your client/server system are column 1 of Table 111, use the Adaptive Server direct conversions. The character sets must all
belong to the same language group.
For example, assume the server default character set is CP 850 and the clients
character sets are either ISO 8859-1 or ROMAN 8. Table 11-1 shows that direct
conversions exist between CP 850 and the client character sets. Now, suppose
you add a client using CP 1252. Since there is no direct conversion between CP
1252 and CP 850, (the default server character set), you must use Unicode
conversions to convert between CP 1252 and CP 850. When you have a
mixture of character setssome where you can use Adaptive Server direct
conversions and others where you must use Unicode conversionsyou can
specify that a combination of Adaptive Server direct conversion and Unicode
conversion be used.
374
CHAPTER 11
Column 2 Unicode
conversions only
Group 1
Group 2
Group 4
Group 5
Group 6
Group 7
Group 8
Group 9
Group 101
Group 102
Group 103
Group 104
CP 932
CP 936, EUG-GB, GB18303
Big 5, CP 950, EUC-CNS
EUCKSC, CP 949
Group 105
Group 106
Unicode
375
For Adaptive Server version 15.0 and later, the default value for enable unicode
conversions is 1.
If the server default is UTF-8, the server automatically uses Unicode
conversions only.
All of your clients are using the same character set as the server default,
and therefore, no conversion is required.
Conversion between the client character set and the server default is not
supported.
You want to store data in the server without changing the encoding.
To disable character set conversion at the server level, set the disable character
set conversion parameter to 1.
You can control character set conversion at the connection level using the set
char_convert command from within a client session. set char_convert off turns
conversion off between a particular client and the server. You may want to set
char_convert off if the client and the server use the same character set, which
makes conversion unnecessary. set char_convert on turns conversion back on.
376
CHAPTER 11
The character exists (is encoded) in the source character set, but does not
exist in the target character set. For example, the OE ligature is part of the
Macintosh character set (code point 0xCE). This character does not exist
in the ISO 8859-1 character set. If the OE ligature exists in data that is
being converted from the Macintosh to the ISO 8859-1 character set, it
causes a conversion error.
The character exists in both the source and the target character set, but in
the target character set, the character is represented by a different number
of bytes than in the source character set.
For example, 1-byte accented characters (such as , ) are 2-byte
characters in UTF-8; 2-byte Thai characters are 3-byte characters in UTF8. Avoid this limitation by configuring the enable unicode conversion
option to 1 or 2.
377
378
CHAPTER 11
The client must be using Open Client 11.1 or later. It must inform the
server that it can handle CS_LONGCHAR data at connection time, using
the Open Client ct_capability function.
The capability parameter must be set to CS_DATA_LCHAR and the value
parameter must be set to CS_TRUE, where connection is a pointer to a
CS_CONNECTION structure:
CS_INT capval = CS_TRUE
ct_capability(connection,CS_SET,CS_CAP_RESPONS,
CS_DATA_LCHAR,&capval)
If yo omit the client character sets command line flag, the platforms default
character set is used. See the Utility Guide.
379
Figure 11-4 illustrates the paths and command line options that are available in
the standalone utilities isql, bcp, and defncopy.
Figure 11-4: Where character set conversion may be needed
-a
display_charset
-J client_charset
Terminal
display
Client
File
system
-q datafile_charset
(bcp only)
Adaptive
Server
The -J or /clientcharset command line option specifies the character set used by
the client when it sends and receives character data to and from Adaptive
Server.
380
CH A PTE R
1 2
Page
381
385
393
Killing processes
Housekeeper functionality
394
398
401
403
A severity level number between 10 and 24, which indicates the type
and severity of the problem
An error message, which tells you what the problem is, and may
suggest how to fix it
See the Configuration Guide for your platform for a description of the
error log format.
For example, if you try to access a table that does not exist, you see:
select * from publisher
Msg 208, Level 16, State 1:
publisher not found. Specify owner.objectname or use
sp_help to check whether the object exists (sp_help
381
There may be more than one error message for a single query. If there is more
than one error in a batch or query, Adaptive Server usually reports only the first
one. Subsequent errors are reported the next time you execute the batch or
query.
Error messages are stored in master..sysmessages, which is updated with each
new version of Adaptive Server (and has thousands of rows). Here are the first
few rows (from an Adaptive Server that uses us_english as the default
language):
select error, severity, description
from sysmessages
where error >=101 and error <=106
and langid is null
error severity description
----- -------- -------------------------------------------------101
15 Line %d: SQL syntax error.
102
15 Incorrect syntax near '%.*s'.
103
15 The %S_MSG that starts with %.*s is too long.
Maximum length is %d.
104
15 Order-by items must appear in the select-list if
the statement contains set operators.
105
15 Unclosed quote before the character string '%.*s'.
106
16 Too many table names in the query. The maximum
allowable is %d.
(6 rows affected)
If your server supports more than one language, sysmessages stores each
message in each language. The column langid is NULL for us_english and
matches the syslanguages.langid for other languages installed on the
server.
The sqlstate column stores the SQLSTATE value for error conditions and
exceptions defined in ANSI SQL92.
Message numbers 17000 and higher are system procedure error messages
and message strings.
382
CHAPTER 12
where:
date appeared in the format yyyy/mm/dd, which allows you to sort error
messages by date.
server | kernel this entry is for use only by Sybase Technical Support.
For example:
00:0024:00000:00000:2010/04/27 10:28:07.82 kernel Thread 24 (LWP 24390) of
Threadpool syb_default_pool online as engine 0
383
description
langid
-------------------------------------- -----Line %d: SQL syntax error.
NULL
Ligne %1!: erreur de syntaxe SQL.
1
Zeile %1!: SQL Syntaxfehler.
2
(3 rows affected)
The error message text describes the problem. The descriptions often include a
line number, a reference to a type of database object (a table, column, stored
procedure, and so forth), or the name of a particular database object.
In the description field of sysmessages, a percent sign (%) followed by a
character or character string serves as a placeholder for these pieces of data,
which Adaptive Server supplies when it encounters the problem and generates
the error message. %d is a placeholder for a number; %S_MSG is a
placeholder for a type of database object; %.*sall within quotesis a
placeholder for the name of a particular database object. Table 12-1 on
page 385 lists placeholders and what they represent.
For example, the description field for message number 103 is:
The %S_MSG that starts with '%.*s' is too long. Maximum
length is %d.
For errors that you report to Technical Support, include the numbers, object
types, and object names. (See Reporting errors on page 392.)
384
CHAPTER 12
Stands for
%d, %D
%x,%X,%.*x,%lx, %04x, %08lx
Decimal number
Hexadecimal number
%s
%.*s, %*s, %*.s
Null-terminated string
String, usually the name of a particular database object
%S_type
%c
%f
%ld
Floating-point number
Long decimal
%lf
385
Adaptive Server creates an error log for you if one does not already exist.
Specify the location of the error log at start-up with the errorlogfile parameter
in the runserver file or at the command line. The Sybase installer utility
configures the runserver file with $SYBASE/$SYBASE_ASEinstall as the
location of the error log if you do not choose an alternate location. If you do
not specify the location in the runserver file or at the command line, the
location of the error log is the directory from which you start Adaptive Server.
For more information about specifying the location of the error log, see
dataserver in the Utility Guide.
Note Always start Adaptive Server from the same directory, or with the
runserver file or the error log flag, so that you can locate your error log.
Each time you start a server, messages in the error log provide information on
the success (or failure) of the start and the recovery of each database on the
server. Subsequent fatal error messages and all kernel error messages are
appended to the error log file. To reduce the size of the error log by deleting old
or unneeded messages, prune the log while Adaptive Server is shut down.
Severity levels
The severity level of a message indicates the type and severity of the problem
that Adaptive Server has encountered. For maximum integrity, when Adaptive
Server responds to error conditions, it displays messages from sysmessages,
but takes action according to an internal table. A few corresponding messages
differ in severity levels, so you may occasionally notice a difference in
expected behavior if you are developing applications or procedures that refer
to Adaptive Server messages and severity levels.
Warning! You can create your own error numbers and messages based on
Adaptive Server error numbers (for example, by adding 20,000 to the Adaptive
Server value). However, you cannot alter the Adaptive Server-supplied system
messages in the sysmessages system table.
386
CHAPTER 12
If the problem has affected an entire database, the system administrator may
have to use the database consistency checker (dbcc) to determine the extent of
the damage. The dbcc may identify some objects that have to be removed. It
can repair some damage, but you may have to reload the database.
For more information, see the following chapters in System Administration
Guide: Volume 2:
Severity levels 10 18
Error messages with severity levels 1016 are generated by problems that are
caused by user errors. These problems can be corrected by the user. Severity
levels 17 and 18 do not terminate the users session.
Error messages with severity levels 17 and higher should be reported to the
system administrator or database owner.
387
388
CHAPTER 12
For example, the user may have tried to update a view in a way that violates the
restrictions. Another error that falls into this category is unqualified column
names in a command that includes more than one table with that column name.
Adaptive Server has no way to determine which one the user intends. Check
the command syntax and working database context.
Messages that ordinarily have severities greater than 16 show severity 16 when
they are raised by dbcc checktable or dbcc checkalloc so that checks can
continue to the next object. When you are running the dbcc utility, check the
Error Messages and Troubleshooting Guide for information about error
messages between 2500 and 2599 with a severity level of 16.
Note Levels 17 and 18 are usually not reported in the error log. Users should
389
Since problems that generate such messages do not keep users from their work,
users tend not to report them. However, users should be instructed to inform
the system administrator every time an error message with this severity level
(or higher) occurs so that the system administrator can report them.
Severity levels 19 26
Fatal problems generate error messages with severity levels 19 and higher.
They break the users connection to Adaptive Server (some of the higher
severity levels shut down Adaptive Server). To continue working, the user
must restart the client program.
When a fatal error occurs, the process freezes its state before it stops, recording
information about what has happened. The process is then killed and
disappears.
When the users connection is broken, he or she may or may not be able to
reconnect and resume working. Some problems with severity levels in this
range affect only one user and one process. Others affect all the processes in
the database. In some cases, the system administrator must restart Adaptive
Server. These problems do not necessarily damage a database or its objects, but
they can. They may also result from earlier damage to a database or its objects.
Other problems are caused by hardware malfunctions.
Error messages from the kernel are directed to the error log file.
390
CHAPTER 12
391
Reporting errors
When you report an error to Sybase Technical Support, include:
392
Any numbers, database object types, or database object names that are
included in the error message.
The context in which the message was generated, that is, the command that
was running at the time. You can help by providing a hard copy of the error
log.
CHAPTER 12
1 system errors.
6 volume-handling errors.
7 option-parsing errors.
Major error categories 1 6 may result from Backup Server internal errors
or a variety of system problems. Major errors in category 7 are almost
always due to problems in the options you specified in your dump or load
command.
severity is:
393
Killing processes
Killing processes
A process is a unit of execution carried out by Adaptive Server. Each process
is assigned a unique process identification number when it starts. This number
is called a spid. These numbers are stored, along with other information about
each process, in master..sysprocesses. Processes running in a parallelprocesses environment create child processes, each of which has its own spids.
Several processes create and assign spids: starting Adaptive Server, login tasks,
checkpoints, the housekeeper tasks, and so on. You can see most of the
information by running sp_who.
Running sp_who on a single-engine server shows the sp_who process running
and all other processes that are runnable or in one of the sleep states. In multiengine servers, there can be a process running for each engine.
The kill command gets rid of an ongoing process. The most frequent reason for
killing a process is that it interferes with other users, and the person responsible
for running it is not available. The process may hold locks that block access to
database objects, or there may be many sleeping processes occupying the
available user connections. A system administrator can kill most running or
"runnable" processes, including those that are waiting for:
394
A lock
CHAPTER 12
Adaptive Server allows you to kill processes only if it can cleanly roll back any
uncompleted transactions and release all system resources that are used by the
process. For processes that are part of a family, killing any of the child
processes also kills all other processes in the family. However, it is easiest to
kill the parent process. For a family of processes, the kill command is detected
more quickly if the status of the child processes is sync sleep.
Table 12-2 shows the status values that sp_who reports and when the kill
command takes effect.
Table 12-2: Status values reported by sp_who
Status
Indicates
Waiting on a network read.
alarm sleep
Immediate.
Immediate.
lock sleep
Immediate.
sync sleep
sleeping
runnable
Immediate.
Immediate.
infected
background
log suspend
recv sleep
send sleep
running
Only system administrators can issue the kill command; permission to use it
cannot be transferred.
The syntax is:
kill spid
You can kill only one process at a time, but you can perform a series of kill
commands in a batch. For example:
1> kill 7
395
Killing processes
2> kill 8
3> kill 9
4> go
396
CHAPTER 12
In sp_who output, you cannot tell whether a is recv sleep belongs to a user
who is using Adaptive Server and may be pausing to examine the results of a
command, or whether a user has restarted a PC or other terminal, and left a
stranded process. Query the sysprocesses table to learn more about
questionable processes. For example, this query shows the host process ID and
client software used by process 8:
select hostprocess, program_name
from sysprocesses
where spid = 8
hostprocess program_name
----------- ---------------3993
isql
This query, plus the information about the user and host from the sp_who
results, provides additional information for tracking down the process from the
operating system level.
If the rollback of the spid has completed when you issue kill...statusonly or if
Adaptive Server cannot roll back the specified spid, kill...statusonly returns the
following message:
Status report cannot be obtained. KILL spid:nn is not
in progress.
397
Housekeeper functionality
For more information about locking in Adaptive Server, see the Performance
and Tuning Series: Locking and Concurrency Control.
Housekeeper functionality
The housekeeper task provides important functionalities:
sp_who
fid
spid
status
loginame
origname
hostname
blk_spid dbname tempdbname cmd
block_xloid threadpool
---- ----- ------------------------------------------- ------- --------- ------------- --------- ------------0
8
sleeping
NULL
NULL
luv2work
0
master
tempdb
HK WASH
0 syb_default_pool
0
9
sleeping
NULL
NULL
NULL
0
master
tempdb
HK GC
0 syb_default_pool
0
10
sleeping
NULL
NULL
NULL
0
master
tempdb
HK CHORES
0 syb_default_pool
names.
For more information about sp_who and sp_showpsexe, see the Reference
Manual: Procedures.
398
CHAPTER 12
Housekeeper wash
Washing buffers is an optional task that, if enabled, runs only during idle times.
You can turn off this task using the configuration parameter housekeeper free
write percent. The housekeeper wash task is the only housekeeper task for
which you use this configuration parameter.
Housekeeper chores
The housekeeper chores task th runs only at idle times, and does not use a
common configuration parameter. It manages miscellaneous chores, such as:
Handling timeout of detached transactions. You can turn off this task using
the configuration parameter dtm detach timeout period.
Checking licence usage. You can turn off this task using the configuration
parameter license information.
399
Housekeeper functionality
Use sp_setpsexe to set the priority level for the housekeeper task for the
session if Adaptive Server is configured for threaded or process mode.
This example sets the priority level for the housekeeper wash task (with a spid
of 8) to HIGH for the current session:
sp_setpsexe 8, 'priority', 'HIGH'
The valid values for the enable housekeeper GC configuration parameter are:
400
CHAPTER 12
401
The default for the shutdown command is with wait. That is, shutdown and
shutdown with wait do exactly the same thing.
In this way, shutdown minimizes the amount of work that automatic recovery
must do when you restart Adaptive Server.
The with nowait option shuts down Adaptive Server immediately. User
processes are aborted, and recovery may take longer after a shutdown with
nowait. You can help minimize recovery time by issuing a checkpoint command
before you issue a shutdown with nowait command.
The default is with wait, so any dumps or loads in progress complete before the
Backup Server process halts. After you issue a shutdown command, no new
dump or load sessions can be started on the Backup Server.
To see the names of the Backup Servers that are accessible from your Adaptive
Server, execute sp_helpserver. Use the value in the name column in the
shutdown command. You can shut down a Backup Server only if it is:
402
CHAPTER 12
hostname
---------NULL
NULL
NULL
NULL
heliotrope
blk
--0
0
0
0
0
cmd
-------------CONNECT HANDLER
DEFERRED HANDLER
SCHEDULER
SITE HANDLER
NULL
403
404
Index
Symbols
% (percent sign)
error message placeholder 384
?? (question marks)
for suspect characters 377
(quotation marks)
enclosing parameter values 10
@@client_csexpansion global variable
366
Numerics
7-bit ASCII character data, character set conversion for
371
A
abstract plan cache configuration parameter 81
abstract plan dump configuration parameter 81
abstract plan load configuration parameter 81
abstract plan replace configuration parameter 82
adding
database devices 219, 308314
date strings 363
months of the year 363
remote logins 300302
remote servers 294299
users to a database 219
additional network memory configuration parameter
82
address, server 14
aggressive garbage collection 399
priority level 400
aggressive housekeeper 399
aliases
server 296
allocation
pages 308
units 308
units See also size; space allocation
allow backward scans configuration parameter 85
allow nested triggers configuration parameter 85
allow procedure grouping configuration parameter
86
allow remote access configuration parameter 86
allow resource limits configuration parameter 87
allow sendmsg configuration parameter 87
allow sql server async i/o configuration parameter 87
allow updates configuration parameter (now called
allow updates to system tables) 12
allow updates to system tables configuration parameter
12, 88
alter database command
omitting database device and 315, 316
system tables and 290
alternate languages. See languages, alternate
application design 219
Arabic character set support 333
ASCII characters
character set conversion and 371
asynchronous I/O
limiting Server requests for 166
asynchronous prefetch
configuring 146
@@char_convert global variable 366
@@client_csid global variable 366
@@client_csname global variable 366
@@langid global variable 368
@@language global variable 368
@@max_connections global variable 218
@@maxcharlen global variable 366
@@ncharsize global variable 366
audit queue size configuration parameter 90
audit trail 28
stacktrace of error messages 385
auditing
queue, size of 90
sybsecurity database 28
405
Index
91
B
Backing up
master database 53
backtracing errors. See error logs
Backup Server
error messages 393
shutting down 402
tape retention in days configuration parameter 269
backups 3942
hints 3942
Baltic character set support 333
bcp (bulk copy utility)
character set conversion and 379, 380
sort order changes and 355
Big 5
similarities to CP 950 333
binary sort order of character sets
character set changes and database dumps 355
bytes
character 377
C
cache partitions
configuring 145, 146
cache, procedure 236
caches, data
database integrity errors and 391
calls, remote procedure 293306
timeouts 297
caps per ccb configuration parameter 92
changing
See also updating
configuration parameters 76, 305
database options 321323
system tables, dangers of 9, 12
@@char_convert global variable 366
character set conversions 369, 378379
character sets 109
406
Index
CIPC regular message pool size configuration
parameter
94
94
cis connect timeout configuration parameter 95
cis cursor rows configuration parameter 95
cis idle connectin timeout configuration parameter
96
cis packet size configuration parameter 96
cis rpc handling configuration parameter 97
configuration parameter
max native threads per engine 171
rtm thread idle wait period 246
configuration parameter, max transfer history
181
407
Index
guest users 52
master database 287
model database 287
segments 287
stored procedures 12
system procedures 12
system tables 7
tempdb database 287
user-defined error messages 386
users 53
cross-platform dump and load, handling suspect partitions
363
cs_connection command, number of user connections
and 219
current audit table configuration parameter 104
current database 387
cursors
row count, setting 95
cyrillic character set support 333
D
data caches
configuring partitions 145, 146
database integrity errors and 391
data dictionary. See system tables
database administration 15
database device
space See segments; space allocation
database devices 307
See also disk mirroring; dump devices; master device
adding 308314
default 316317
dropping 316
fragments 290
information about 315
initializing 307314
names of 288, 309
number of server-usable 196
placing objects on 287
database object owners 4
See also database owners
permissions 5
tasks of 4
database objects
408
Index
database damage and
when to use 391
DB-Library programs
387, 391
409
Index
enabling 115
recovery and 286
status in sysdevices table 315
disk reinit command
See also disk init command
disk resize 284, 318
device shrinkage 319
insufficient disk space 319
minimum size 318
mirroring 318
syntax 318
using 318
disks See database devices; devices; dump devices
Distributed Transaction Management (DTM) 28
Distributed Transaction Processing (DTP) 28
DMA object pool size configuration parameter 116
drop logins option, sp_dropserver 299
dropping
database devices 316
dump devices 316
master device from default space pool 317
remote logins 299, 300
servers 299
dsync option
disk init 316
dtm detach timeout period configuration parameter 117,
399
dtm lock timeout period configuration parameter 117
dump database command
disk init and 308
master database and 40
model database and 25
dump devices
dropping 316
information about 315
sysdevices table and 289
dump on conditions configuration parameter 119
dump, database 40
dynamic allocation on demand configuration parameter
119
dynamic configuration parameters 62
E
Eastern Europe
410
Index
enable unicode conversion configuration parameter
137
enable unicode conversions configuration parameter
375
enable unicode normalization configuration
parameter
138
139
enable xml configuration parameter
139
encoding characters 369
encryption, password 145
engine memory log size configuration parameter
140
engines
number of 175
error logs 43, 390
creation and ownership 385
format 382
location 13
purging 386
error messages 384392
altering server-provided 367, 386
character conversion 377
creating user-defined 386
for fatal errors 390392
numbering of 384
severity levels of 386392
user-defined 386
errorlog pipe active configuration parameter 140
errorlog pipe max messages configuration parameter
141
errors
See also error logs; error messages
character conversion 377
fatal 390392
logging 385
multiple 382
reporting of 392
server responses to 381392
state numbers 381
types of information logged 13
user 387, 387390
esp execution priority configuration parameter 141
esp execution stacksize configuration parameter
142
142
eucjis character set 109
European currency symbol
character sets 334
event buffers per engine configuration parameter
143
event log computer name configuration parameter
143
event logging configuration parameter 144
executable code size + overhead configuration
parameter 145
execution
ESPs and XP Server priority 141
expired passwords 269
extended cache size configuration parameter 145
extended stored procedures
configuration parameters 141282
extended UNIX character set 109
F
failures, media 392
fatal errors
backtrace from kernel 385, 390
error messages for 390392
severity levels 19 and up 390392
file descriptors 218
maximum per-process configured for your operating
system 221
files
character set translation (.xlt) 365
Closed Problem Reports (CPRs) 403
deleting 316
error log 13, 385
interfaces 14
internationalization 365
libtcl.cfg file 15
localization 366367
System Problem Reports (SPRs) 403
fillfactor
default fill factor percent configuration parameter
110
finding
database objects 387
411
Index
145
fix_text option, dbcc 361362
For load 52
formats
date, time, and money 367
locale, unsupported 363364
formulas
user requirements and 219
forwarded rows
reducing with default exp_row_size configuration
parameter 110
fragments, device space 290
french
character set support 333
G
garbage collection
aggressive test 399
lazy test 399
garbage collector
configuring aggressive 400
housekeeper utility 399
German
character set support 333
global async prefetch limit configuration parameter 146
global cache partition number configuration parameter
146
granting
access permissions 4
object creation permissions 4
Greek
character set support 333
groups
language 333
public 53
Guest users
creating 52
guest users
databases 52
sample databases and 29
H
handling suspect partitions 362
hardware
errors 392
hash buckets (lock) 163
heap memory per user configuration parameter 147
Hebrew
character set support 333
high availability
installhasvss script 125
insthasv script 125
setting enable HA 125
histogram tuning factor configuration parameter 147
housekeeper chores 399
configuration parameter license information 399
housekeeper free write percent configuration
parameter 149, 399
housekeeper garbage collector 399
housekeeper task
configuring 149
space reclamation and 126
statistics flushing 149
housekeeper utility
functionality 398
housekeeper wash, housekeeper garbage collection,
housekeeper chores 398
three tasks 398
wash 399
wash task 149
I
i/o accounting flush interval configuration parameter
151
i/o batch sizet configuration parameter 151
i/o polling process count configuration parameter
152
IBM character set
Icons 49
109
153
identity grab size configuration parameter 154
identity reservation size configuration parameter 155
idle migration timeout configuration parameter 155
IDs, user
412
Index
system procedures and 12
impersonating a user. See setuser command
index descriptors
maximum number open 208
indexes
character set changes 361
character-based 359
default fill factor percent percentage for 110
object allocation maps of 206
rebuilding 359
sort order changes 360
suspect 359, 391
information (server)
configuration parameters 66
database devices 315
database options 322323
devices 315
dump devices 315
error messages 384392
problems 385
remote server logins 305
remote servers 299
information messages (server). See error messages;
severity levels
initializing
database devices 307314
installation, server
interfaces file 15
status after 287
installhasvss script 125
installing
sample databases 29
insthasv script 125
insufficient disk space
disk resize 319
insufficient permission 388
insufficient resource errors (Level 17) 389
interfaces file 14
internal error, nonfatal 389390
international language support. See character sets;
languages
internationalization
a sample system 329
advantages 328
definition 327
directory structure for character sets 365
files 365
ISO 8859-1
similarities to CP 1252 333
iso_1 character set 109
isql utility command
character set conversion and 379, 380
number of user connections and 219
passwords and 304
status and informational messages 387
system administration and 5
J
Japanese character sets 109
sjis (Shift-JIS) 109
support 333
See also languages, alternate
Java configuration parameters 254
job scheduler interval configuration parameter 156
job scheduler tasks configuration parameter 156
js job output width configuration parameter 157
K
kanji. See Japanese character sets
kernel
error messages 385, 390
kernel mode configuration parameter 157
kernel resource memory configuration parameter
158
keys, table
on system tables 9
kill command 394398
kill command, changes 397
kill statusonly parameter 397
known problems 403
Korean
character set support 333
L
@@langid global variable
language defaults 111
368
413
Index
414
M
Macintosh character set 109, 377
mail session, starting 262
management, space. See space allocation; storage
management
mapping
device name to physical name 308
Index
remote users 300304
master database 7, 2324, 40
See also disk mirroring;system tables
backing up 40, 53
changing option settings 321
creating 287
keys for system tables in 9
sysdevices table 315
master device 22, 309, 315
See also database devices
removing from default space pool 316, 317
sp_diskdefault and 317
max async i/os per engine configuration parameter
166
max async i/os per server configuration parameter
167
max cis remote connections configuration parameter
169
max concurrently recovered db configuration
parameter 169, 196
max memory configuration parameter 170
max native threads per engine configuration
parameter 171
max nesting level configuration parameter 171
max network packet size configuration parameter
171
max number network listeners configuration
parameter 174
max online engines configuration parameter 175
max online Q engines 175
max parallel degree configuration parameter 176
max pci slots configuration parameter 177
max repartition degree configuration parameter 179
max resource granularity configuration parameter
179
max roles enabled per user configuration parameter
189
max scan parallel degree configuration parameter
179
max SQL text monitored configuration parameter
181
max transfer history, configuration parameter 181
@@max_connections global variable 218
@@maxcharlen global variable 366
maximum buffers per lava operator configuration
parameter 182
182
mci memory size configuration parameter
230
memory
See also space allocation
audit records 90
freeing from XP Server 142
number of open databases and 207
memory alignment boundary configuration parameter
184
memory per worker process configuration parameter
185
messages
error 13, 384392
fatal error 13
language setting for 328
start-up 13
system 384392
user-defined 386
messaging memory configuration parameter 185
metadata caches configuration parameters 73223
metrics elap max configuration parameter 186
metrics exec max configuration parameter 186
metrics lio max configuration parameter 186
metrics pio max configuration parameter 187
Microsoft character set 109
min pages for parallel scan 187
minimum
size, disk resize 318
minimum pages for a parallel scan configuration
parameter 187
minimum password length configuration parameter
188
miscellaneous user error 388
mistakes, user See errors; severity levels, error
mnc_full_index_filter configuration parameter 189
model database 52
model database 25
creating 287
keys for system tables in 9
size 109, 310
money
local formats 367
monitoring
spt_monitor table 11
SQL text 181
415
Index
N
name of device 308
sysdevices listing 290
names
column, in commands 389
mapping remote user 301
remote server 295
remote user 301
server 296
system extended stored procedures 12
system procedures 10
naming
servers 296
Navigating
to objects 49
@@ncharsize global variable 366
nested trigger configuration parameter (now called allow
nested triggers) 85
net password encryption option 298
net password encryption reqd configuration parameter
190
networks
connections 14
directory services 15
interfaces files 14
software 36
nonstop recovery 286
number (quantity of)
416
Index
number of worker processes configuration parameter
220
225
numbers
error message 384
sort order 113
status bit (sysdevices)
226, 245
page lock promotion PCT configuration parameter
315
O
o/s file descriptors configuration parameter 221
object lockwait timing configuration parameter 221
P
packets, network
size, configuring
172173
227
pages, data 308
dirty 240
partition groups configuration parameter 229
partition spinlock ratio configuration parameter 229
partitions
disk 309
partitions, suspect, fixing tables 363
partitions, suspect, handling 362
passwords
encryption over network 298
remote users 298, 304
per object statistics active configuration parameter
230
per opject statistics active configuration parameter
230
percent sign (%)
error message placeholder 384
performance
audit queue size 90
default fill factor percent effect on 111
disk mirroring and 286
ESPs and XP Server priority 141
space allocation and 287
speed and 287
performance monitoring option configuration
parameter 232
permission cache entries configuration parameter
233
permissions
database object owners 5
database owners 4
default 25
denying 388
disk init 314
group versus user 53
insufficient (Level 14) 388
master database 24
model database 25
object 5
overriding 53
417
Index
Q
queries
conversion errors, preventing
question marks (??)
for suspect characters 377
418
377
237
quorum heartbeat retries configuration parameter
238
quoted identifier enhancement configuration parameter
238
R
read committed with lock configuration parameter
239
read only database option
359
reads
physical 287
rebooting the server
See restarts, server
record keeping 4345
configuration 44
contacts 44
maintenance 44
system 45
recovery
configuration parameters for 239241
loading databases 355
master database 40, 308
nonstop 286
planning backups for 25
after reconfiguration 355
sort order changes and 355
space allocation and 286
recovery interval in minutes configuration parameter
239241
long-running transactions and 240
remote logins
adding 300302
configuration parameters for 86, 305
dropping 299, 300
options for 304
timing out 297
trusted or untrusted mode 302
remote procedure calls 293306
configuration parameters for 305
remote server pre-read packets configuration
parameter 242
remote servers 294299
Index
adding 294299
dropping 299
information on 299
names of 295
options for 297
reorg command
running manually 401
reorg reclaim_space command 400
reporting
errors 387, 389, 392
reports
See also information (server)
reset configuration.
See configuration parameters;reconfigure
command
resource limits
configuring 87
response time 271
restarts, server
after reconfiguration 359
reindexing after 359
from same directory 386
system tables and 359
temporary tables and 27
restricted decrypt permission configuration
parameter 242
retaindays option
dump database 270
dump transaction 270
return status
system procedures 11
roles, system
operator 3
system administrator 2
system security officer 3
rolling back processes
recovery interval and 239
server stack capacity and 261
roman8 character set 109
row lock promotion HWM configuration parameter
244
row lock promotion LWM configuration parameter
245
row lock promotion PCT configuration parameter
246
row lock promotion thresholds
S
savepoints
error (Level 13) 388
scan descriptors 192194
scripts 332
secure default login configuration parameter 249
Security and Directory Services, requirement of 145
segmap column, sysusages table
procedures that change 290
segments 291
See also database devices; space allocation
creating 287
default 287
logsegment 287
syssegments table 291
system segment 287
select for update configuration parameter 250
select into/bulkcopy/pllsort database option
model database and 25
select on syscomments.text column configuration
parameter 250
send doneinproc tokens 250
server aliases 296
server information options. See information (server)
server.loc file 367
server_name.cfg, default name of configuration file 62
servers
See also processes (server tasks); remote servers
connecting 14
419
Index
420
254
size of unilib cache configuration parameter
255
sjis (Shift-JIS) character set. See Japanese character sets
sort order
changing 355359
consistency among servers 355
default sortorder id 113
default XML sortorder 113
definition files 365
installing new 365
numbers 113
rebuilding indexes after changing 360
sp_addlanguage system procedure 363
sp_addremotelogin system procedure 300302
sp_addsegment system procedure
sysusages and 290
sp_addserver system procedure 295297
sp_adduser system procedure 25
sp_configure system procedure 66
See also individual configuration parameter names
remote logins and 305
sp_countmetadata system procedure 207, 209, 210,
212
sp_dboption system procedure 321323
sp_deviceattr system procedure 284, 312
sp_diskdefault system procedure 284, 316317
sp_dropdevice system procedure 316
sp_dropremotelogin system procedure 300
sp_dropsegment system procedure
sysusages and 290
sp_dropserver system procedure 299
sp_extendsegment system procedure
sysusages and 290
sp_helpconfig system procedure 207, 208, 210
sp_helpdb system procedure 11
database option information 323
sp_helpdevice system procedure 11, 314
sp_helpindex system procedure 11
sp_helpjoins system procedure 9
sp_helpkey system procedure 9
sp_helpremotelogin system procedure 305
sp_helpserver system procedure 299
sp_helptext system procedure 11
sp_indsuspect system procedure 359, 360
sp_modifylogin system procedure 359
Index
sp_monitorconfig system procedure
configuring number of open databases and 207
configuring number of open indexes and 209
configuring number of open objects and 211,
212
sp_remoteoption system procedure 304305
sp_serveroption system procedure 297
sp_showpsexe system command, housekeeper output
398
sp_who, housekeeper output
398
space
See also size; space allocation
running out of 389
space allocation
See also database devices; segments; storage
management
commands summary 284
recovery/performance and 286
sysusages table 290
space reclamation
enable housekeeper GC configuration parameter
126
Spanish
character set support 333
#spdevtab temporary table 11
speed (server)
system performance and 287
#spindtab temporary table 11
spinlocks
lock hash table 163
splitting
tables across two disks 287
SPR files 403
sproc optimize timeout limit configuration parameter
255
spt_committab table 11
spt_monitor table 11
spt_values table 11
SQL batch capture configuration parameter 256
sql server clock tick length configuration parameter
257
sql text pipe active configuration parameter 258
sql text pipe max messages configuration parameter
258
.srt files 365
srvname column, sysservers table 297
421
Index
422
T
Table editor 54
table owners. See database object owners
tables
See also database objects; system tables
Index
dbcc checktable and 360
integrity damage to 391
object allocation maps of 206
read-only 359
splitting across two disks 287
suspect, fixing 363
system procedure 11
temporary 26
with suspect partitions, fixing 363
without indexes 360
tape retention in days configuration parameter 269
tcp no delay configuration parameter 270
tempdb database 2627
See also databases
creating 287
size of 26
temporary tables 26
terminals
character set conversion for 379
installing new definitions 365
test servers 3435
text datatype
changing character sets and 361
multibyte character sets and 361
text prefetch size configuration parameter 271
text values, dbcc fix_text upgrade of 361
Thai
character set support 333
time
for acquiring locks 165
time slice configuration parameter 271
time values
display format 367
timeouts option, sp_serveroption 297
total data cache size configuration parameter 272
traditional Chinese
character set support 333
transaction logs
alter database and 290
create database and 290
device placement 286, 290
purging 361
trunc log on chkpt option and 240
transactions
error within 388
long-running 240
274
transferring ownership.
See database objects, ownership
translation.
See character sets
triggers
See also database objects; stored procedures
nested 85
trunc log on chkpt database option
recovery interval in minutes and 240
trusted mode
remote logins and 304
tuning
monitoring performance 76
turkish
character set support 333
two-phase commit
transactions 28
txn to pss ratio configuration parameter 274
U
unichar datatype 334
Unicode 332, 334338
character sets 333
unichar datatype 334
univarchar datatype 334
UTF-16 334
unified login required 276
univarchar datatype 334
UNIX platforms, raw disk partition 309
untrusted mode, remote logins and 304
updating
See also changing
allow updates to system tables configuration
parameter and 12
text after character set change 361
upgrade version configuration parameter 276
us_english language 111
usage
disk resize 318
use security services configuration parameter 277
423
Index
user connections
memory allocated per 217219
user databases
master database control of 23
system tables for 25
user-defined messages 386
user errors 387, 387390
user IDs
number 1, Database Owner 12
user log cache size configuration parameter 277
user log cache spinlock ratio configuration parameter
279
user mistakes. See errors; severity levels, error
user objects. See database objects
users
creating 53
deleting 54
errors by 387, 387390
guest 52
number of user connections and 219
remote 300304
single-user mode 89
users, object.See database object owners
UTF-16 334
utility commands
See also Utility Programs manual
character sets and 379
utility, housekeeper, aggressive 399
W
wait event timing configuration parameter 279
wash, housekeeper task 149
Western Europe
character set support 333
window of vulnerability 89
with nowait option, shutdown 402, 403
With override, database option 52
workload manager size configuration parameter
write operations
physical 287
279
X
X/Open XA 122
xact 280
.xlt files 365
XP Server
freeing memory from 142
priority 141
xp_cmdshell context configuration parameter 281
xp_cmdshell system extended stored procedure 12
V
variables in error messages 385
verification, user-access 298, 302
Vietnamese
character set support 333
views
See also database objects
virtual
address 314
page numbers 311
vstart option
disk init 314
424