Read an Excerpt
PREFACE: Preface
This book discusses the issues that anyone involved with supporting SQL Server needs to be aware of. Here we cover the following topics that describe what is and is not discussed in the text:
Purpose of this Book
Who Is This Book For?
What You Need to Know to Use This Book
What You Will Learn From This Book
Conventions
Terms
Purpose
This book is intended for those persons who need to support SQL Server System 11, System 10, Version 4.9.2, and any combination thereof.
Who Is This Book For?
Clearly, the Database Administrator (DBA) is one person for whom this book is intended, but so is the manager who is trying to plan the growth of the system and the financial officer who will have to pay for staff and hardware to support the system. The experiences described here will benefit DBAs with less experience while the checklists and procedures will save the experienced DBA time.
It is assumed that the reader is familiar with the Sybase SQL Server and the commands used to control the server. The book does not provide a complete syntax for any of the server commands and, as such, is not intended as a beginning training text. The Sybase courses are very good for this purpose, and this book is an excellent companion to the course material, as it expands on, explains, and underscores the practical impacts of many things described in the course and the manuals.
What You Need to Know to Use This Book
This book is written based on experiences with the Sybase SQL Server running on Sun hardware using Solaris 2.x. The descriptions of the server and theprocedures will work with the Sybase SQL Server on other UNIX operating systems. Every attempt has been made to make the discussion relevant to any Sybase SQL Server installation. When needed, commands or procedures that are specific to Solaris are identified as such.
You probably won't use and don't need to use all of the material presented all at once. Certain sections will be immediately relevant to your current situation. When a crisis hits you can use the other sections as checklists of things to review as a way to isolate and fix the problems your system is experiencing.
What You Will Learn from This Book
The DBA who is responsible for the administration of a Sybase SQL Server will find the information directly applicable to their job. While portions of the discussions relate directly to the Solaris UNIX environment, the commands used are described in sufficient detail so that the equivalent commands for virtually any UNIX platform can be readily identified.
This book is designed for use in the real world. Procedures are laid out to be followed step by step. Sufficient detail is included to ensure the procedures can be used on a variety of systems by all members of the DBA staff from the most senior to the latest recruit. Further, these procedures make the process of training a new person much easier.
Real-world observations are included throughout the text and are denoted by the symbol. These observations are included to motivate the reader to pay attention to the subject and apply what is presented to their own systems. Viewed another way, these observations provide stark evidence of the price you may well pay if you choose to avoid the advice presented. Without these observations it is easy to dismiss the instruction as too detailed and perhaps even paranoid.
Disasters do happen and real people get fired over them.
The manuals included with the Sybase SQL Server (including the CD-based products SyBooks and AnswerBase) are excellent and cover the topic of a single server very well. This is their purpose and their duty. However, as you encounter the different versions of SQL Server and have to deal with installing and upgrading these versions, there are new problems that just aren't addressed in the manuals. This books covers these issues in detail and as such provides a bridge between the manuals with their single-versioncentric view of the world to your multiversion environment. While the manuals are invaluable for documenting and describing all the options for a given command, they won't even begin to help you understand the large database environment.
As your business grows and expands, you will need to be familiar with the System 11 family of Sybase products. Whether you upgrade your existing servers from 4.9.2 or System 10 to System 11, or install a new server at System 11, you will face the hurdles of upgrading and installing. System 11 has many new features and the upgrade process is more involved than simply installing another Emergency Bug Fix (EBF). This book covers the upgrade process in detail, and covers the important differences between the 4.9.2, System 10, and System 11 Versions of the Sybase SQL Server.
As with the many other Sybase products available, there are an endless number of permutations of hardware, operating system software, middleware, and so forth, that you may have in your environment. We make no attempt to address the issues that would arise in any given multivendor environment. We cover in great detail the issues relevant to administering a Sybase multiserver environment running UNIX. While the examples are taken from a Solaris environment, care has been taken to make these
examples useful in any UNIX environment. Wherever possible, we avoid the use of commands or tools that are available only in the Solaris environment. Further, the function of the Solaris commands used is covered in sufficient detail so that it should be easy to determine the equivalent commands or options in the UNIX environment you are using.
This book does not cover any theory of databases, nor does it compare the functionality of any competing products. We assume you have (or were hired into an environment that already has) the selected Sybase SQL Server. If you are in the process of selecting the Database Management System (DBMS) for your environment, this book will assist you in determining what you need to have in place to maintain a large, multiversion Sybase system, but it will not provide any comparisons to other DBMS vendors or their products. We assume you are at a point where you need information relevant to administering a Sybase environment, not in need of a survey of DBMS products.
Conventions
Sybase SQL Server commands are shown in the text in the following font: disk init
Sybase SQL Server command syntax is shown in the following font;
sp_helpdb database_name
sp_helpuser sa
sp_addsegment segment_name, server_device
sp_addsegment myseg0, server_device_1
Stored procedures that are supplied by Sybase as part of the SQL Server product are always referred to as
sp_
sp_helpdevice
Stored procedures that are not supplied (or supported) by Sybase that are described in Chapter 14, are referred to as
p_
p_devspace
The names of databases, segments, tables and columns are shown in the following font;
master database
system segment
syslogins table
segmap column
Operating system (OS) commands are shown in the following font;
prtvtoc
Real-world experiences that you need to think about are introduced by . When you can find further information on the CD-ROM, you'll see.
Terms
There are many terms that are used in the description of the Sybase SQL Server and its environment. Listed below are some terms that will be used throughout the book. These terms are defined here to provide a standard set of definitions for the discussions that follow.
server-Within this book a "server" is a Sybase Server, and almost all the time it refers to a SQL Server. Occasionally the term "server" may refer to a Sybase Open Server such as the Backup Server that is part of the System 11 SQL Server.
server machine-This refers to the CPU, memory, disks, and network interfaces that form the computer that actually executes the SQL Server.
server logical device (tape or disk)-This is a "device" as seen by the SQL Server. Note that SQL Server knows only about devices that are assigned to it and there isn't necessarily any direct correlation between a SQL Server device and a physical disk, for example.
server device-This is the same as a server logical device.
spindle-This is another term for a physical disk.
physical device-This refers to a physical disk or tape drive as opposed to a "logical" device, such as a partition of a physical disk that is assigned to a server device.
SQL Server user "sa"-This is the SQL Server login that has ultimate authority and is used by the DBA.
server machine SA-This is the person who installs, maintains, and repairs the hardware and operating system software that supports the SQL Server and its associated products.
database system-This is the entire collection of server machines, SQL Servers, networks, clients, backup systems, and so forth, that work together to support your business.
fail over-This is the process of moving from a primary to a standby SQL Server. Also, the process of moving from a server device to its mirror.
Versions of SQL Server
While there are many differences between SQL Server 4.9.2, System 10, and System 11, almost all the material presented here applies to all versions. With the exception of the material that is specific to installing or upgrading one of the specific versions, all the other topics are applicable to all versions. Whether you are running 4.9.2, System 10, or System 11, you need to be concerned with the issues and solutions regarding documenting a server, capacity planning, assigning segments to server devices, partitioning disks, and recovery. Further, few environments support only one version of SQL Server. The typical environment will support multiple versions at the same time with new servers being installed and some 4.9.2 or System 10 Servers being upgraded to System 11.