Sybase Technical Library - Product Manuals Home
[Search Forms] [Previous Section with Hits] [Next Section with Hits] [Clear Search] Expand Search

About This Book [Table of Contents] Chapter 2 Using the
isql Utility

Utility Guide

[-] Chapter 1 Building Servers Using dataserver

Chapter 1

Building Servers Using dataserver

Adaptive Server version 12.5 no longer uses the buildmaster binary to build the master device. Instead, Sybase has incorporated the buildmaster functionality in the dataserver binary . This chapter discusses how to use dataserver to build your server.

The dataserver binary in Windows NT is called sqlsrvr.exe. If you are using the Windows NT platform, substitute all reference to dataserver in this chapter with sqlsrvr.

For a detailed description of dataserver syntax, see dataserver. For a detailed description of sqlsrvr syntax, see sqlsrvr.

Introduction

The dataserver command allows you to create master devices and databases with logical pages of size 2K, 4K, 8K, or 16K. Larger logical pages allow you to create larger rows, which can improve your performance because Adaptive Server accesses more data each time it reads a page. For example, a 16K page can hold eight times the amount of data as a 2K page, an 8K page holds four times as much data as a 2K page, and so on, for all the sizes for logical pages.

The logical page size is a server-wide setting; you cannot have databases with varying size logical pages within the same server. All tables are appropriately sized so that the row size does not exceed the current page size of the server. That is, rows cannot span multiple pages.

Building a new master device

This section describes the process for creating a new master device using the dataserver utility. The master device is built using the build mode in dataserver. After the master device is built, the server shuts down. You must then manually start the server in the start mode. After this you can start, stop, and restart Adaptive Server whenever necessary without having to rebuild the master device

Adaptive Server uses three types of page sizes:

The following syntax creates a new master device with dataserver:

dataserver -ddevice_name
. . . 
    -b [master_device_size [k|K|m|M|g|G]
    [-z logical_page_size [k|K]
-h

Where:

-d device_name - is the full path name of the device for the master database. The master database device must be writable by the user who starts Adaptive Server. The default master database device name is d_master.

-b - indicates that dataserver is in build mode and creating a new master device, and indicates the size of the master device. If you do not provide a unit specifier (k, m, g) for the size of the device, dataserver assumes a size in virtual pages. The size of a virtual page is always 2K. For example:

-z - specifies the logical page size, which is always 2K, 4K, 8K, or 16K. That is, one logical page = N virtual pages. This parameter is optional during the build phase and is ignored during the start mode. If you do not include the -z parameter during the build mode, the master device is built with 2K logical pages.

-h - prints the syntax for the dataserver command.

See dataserver for a full list of dataserver parameters and their definitions.

Environments when using dataserver

When you start an Adaptive Server with the dataserver program, Adaptive Server derives its running environment from:

build mode

To create a new Adaptive Server, issue dataserver using the -b and -z options.

For example, to:

If the total requested space (102,400 x 2K = 200 MB) is insufficient to build all the required system databases using the specified logical page size, then an error message is reported, and the process fails.

Example

The following is a sample output of dataserver building a 200MB device with a 2K logical page size, called personnel2k:

dataserver -d /var/sybase/personnel2k.dat -b200M -z2k -sPERSONNEL2K

dataserver uses a default configuration file if you do not specify one:

00:00000:00000:2001/04/16 10:24:31.73 kernel  Warning: Using default file '/var/sybase/PERSONNEL2K.cfg' since a configuration file was not specified. Specify a configuration file name in the RUNSERVER file to avoid this message.

To specify your own configuration file, use dataserver's -c parameter. See Chapter 11, "Setting Configuration Parameters" in the Adaptive Server Enterprise System Administration Guide for more information.

Adaptive Server version 12.5 treats all installations as an upgrade, regardless of whether you have an existing version of Adaptive Server or not. For this reason, you see the following output when running dataserver:

00:00000:00001:2001/04/16 10:24:32.63 server  Database 'master' appears to be at an older revision than the present installation; SQL Server will assess it, and upgrade it as required.00:00000:00001:2001/04/16 10:24:32.66 server  Database 'master': beginning upgrade step [ID     1]: Initialize disk and create empty allocation units on master device. 00:00000:00001:2001/04/16 10:24:34.74 server  Database 'master': beginning upgrade step [ID     2]: Bootstrap basic system catalogs in database. 

dataserver continues creating the master database, including all of its tables such as systypes, sysobjects and sysusages:

00:00000:00001:2001/04/16 10:24:35.21 server  Database 'master': beginning upgrade step [ID     3]: creating index (table systypes, index ncsystypes)00:00000:00001:2001/04/16 10:24:35.36 server  Database 'master': beginning upgrade step [ID     4]: creating index (table sysobjects, index ncsysobjects)00:00000:00001:2001/04/16 10:24:35.44 server  Database 'master': beginning upgrade step [ID    20]: creating table (table sysusages)[...]

When dataserver has created the master database, it creates the model database:

[...]
00:00000:00001:2001/04/16 10:24:43.14 server  Database 'model' appears to be at an older revision than the present installation; SQL Server will assess it, and upgrade it as required.00:00000:00001:2001/04/16 10:24:43.14 server  Database 'model': beginning upgrade step [ID     1]: Initialize disk and create empty allocation units on master device. 00:00000:00001:2001/04/16 10:24:43.83 server  Database 'model': beginning upgrade step [ID     2]: Bootstrap basic system catalogs in database. 00:00000:00001:2001/04/16 10:24:43.89 server  Database 'model': beginning upgrade step [ID     3]: creating index (table systypes, index ncsystypes)00:00000:00001:2001/04/16 10:24:43.91 server  Database 'model': beginning upgrade step [ID     4]: creating index (table sysobjects, index ncsysobjects)[...]

When dataserver has created the model database, it creates the tempdb and sybsystemdb databases:

[...]
00:00000:00001:2001/04/16 10:24:45.23 server  CREATE DATABASE: allocating 1024 logical pages (2.0 megabytes) on disk 'master'.00:00000:00001:2001/04/16 10:24:46.79 server  Database sybsystemdb successfully created.
[...]

dataserver is successful when the server changes the default sort order and shuts down:

[...]
00:00000:00001:2001/04/16 10:24:47.23 server  Now loading SQL Server's new default sort order and character set[...]
00:00000:00001:2001/04/16 10:24:47.31 server  Default Sort Order successfully changed.00:00000:00001:2001/04/16 10:24:47.37 server  SQL Server shutdown after verifying System Indexes.00:00000:00001:2001/04/16 10:24:47.37 kernel  ueshutdown: exiting

Error messages

If dataserver is not successful, you are unable to boot the server on that master device, and you see the following error message:

00:00000:00001:2001/04/16 19:02:39.53 kernel  Use license file /var/sybase/SYSAM-1_0/licenses/license.dat.00:00000:00001:2001/04/16 19:02:39.54 kernel  The master device's configuration area appears to be corrupt. The server needs this data to boot, and so cannot continue. The server will shut down.

If you run dataserver with a user-specified configuration file that includes options that make it impossible to allocate a shared segment and start up a server, dataserver fails with an error message, and you are unable to boot the server on that master device:

00:00000:00001:2001/04/16 19:04:01.11 kernel  Use license file /var/sybase/SYSAM-1_0/licenses/license.dat.00:00000:00000:2001/02/09 19:04:01.25 kernel  Using config area from primary master device.00:00000:00001:2001/04/16 19:04:01.36 server  The value of the 'max total_memory' parameter (33792) defined in the configuration file is not high enough to set the other parameter values specified in the configuration file. 'max total_memory' should be greater than the logical memory '34343'.

start mode

To start an existing Adaptive Server, issue dataserver without the -b and -z options.

dataserver -d /sybase/masterdb.dat

Upgrading to a server with larger page sizes

Adaptive Servers earlier than version 12.5 used 2K logical page sizes. You cannot change an installation's page size by upgrading. That is, if your current Adaptive Server uses 2K logical pages, you can upgrade only to an Adaptive Server that uses 2K logical pages.

However, you can migrate databases with 2K logical pages from earlier versions of Adaptive Server. For information on how to use the dataxtr data migration tool, see the Adaptive Server Enterprise release bulletin for your platform.

Viewing the current server limits

To display information about Adaptive Server's limits:


About This Book [Table of Contents] Chapter 2 Using the
isql Utility