Académique Documents
Professionnel Documents
Culture Documents
com
TZASE / ADM540
Database Administration
Sybase ASE
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
Agenda
Introduction
Installing ASE
Login, Users, Roles
Data Storage
Databases
Backup and Restore
Architectural Overview
ASE Shared Memory
Configuring ASE for SAP Business Suite
DB Monitoring and Administration
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
Introduction
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
Introduction
What is Sybase ASE (Adaptive Server Enterprise) ?
Sybase ASE (Adaptive Server Enterprise) is a Relational Database Management
System, comparable to Informix Dynamic Server, MaxDB, Microsoft SQL Server and
DB2 UDB (LUW).
It is particular popular at companies in the financial market serving custom financial
applications.
SAP Business Suite was made available on Sybase ASE after SAP bought Sybase Inc.
Sybase ASE should not get mixed up with Sybase IQ (a column based database system
used for analytical applications) or Sybase Replication Server ( a software which may
be used to replicate transactions across database servers)
A bit of history
1984
1988
1992
1994
1997
1998
2005
2010
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
Introduction
Sybase Editions
Express Edition
unsupported , 'free' edition for SME
Development Edition
unsupported , free , for developers
Enterprise Edition
optional additional features available (for extra money)
Sybase ASE is available in four editions, which are technically all the same, some features are
disabled though in the Express, the DE and the SMB Edition.
Sybase ASE Cluster Edition provides the ability to configure several ASE Servers commonly using
a shared disk . In that aspect it is comparable to Oracle RAC and DB2 Pure Scale.
Sybase ASE Cluster Edition is not yet available with SAP and will not get covered in this course.
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
Introduction
ASE Versioning
Major Release
e.g. 15.7
Minor Release
15.7.1 the .1 is the Minor release number.
IR Interim Release
kind of super ESD increases the minor release number
N-OFF
Build based on an ESD or another n-off build which contains one or few urgent bug fixes for customers who
cant wait until the next ESD gets released.
ASE Versions
A major release usually contains many new features and may bring changes to system tables, which requires
conversion of existing databases. Hence, a downgrade to a previous major version is often not easy .
A minor release does often contain new features but no changes to system tables, a downgrade to a previous
minor release of the same major release is usually possible
The term ESD refers to 'Electronic software delivery' , it is a collection of fixes for software defects. Usually
any one minor release receives several ESDs on top. These are cumulative, i.e. you can install ESD #4
directly without the need to install ESD 1,2 and 3.
An Interim Release is a kind of super ESD, it does increase the minor release number, but somewhat less
than a true minor release.
EBF refers to 'Electronic Binary Format' , the EBF number of a build uniquely identifies the build and the
software level. EBF number is unique, i.e. same software level , different platform (e.g. Windows vs. Linux )
will have different EBFs . The EBF number is displayed in the ASE version string.
N-OFF refers to an emergency build based on an ESD or another N-OFF . N-OFFs are delivered to
customers as a temporary solution for a software defect, when a customer can't wait until the next regular
ESD, which contains a fix.
You can retrieve the Information of your Sybase ASE Version within the isql command line tool by executing
select @@version or select @@sbssav. The ASE version can also be determined also in DBACOCKPIT
(Tab : ASE Status
Versions)
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
Introduction
ASE Server
master
database
system
databases
user
databases
An ASE database server 15.7 consits of a dataserver process which spawns several lightweigth
processes (POSIX or OS threads), its shared memory and a defined set of disk devices it uses to
persistently store its data.
On Windows the ASE server process is called sqlsrv.exe. It spawns multiple NT threads.
In this course when we speak of an ASE database server or an ASE server instance, we refer to
the running server process, not the UNIX or Windows host on which the ASE server runs on.
One ASE database server can (and usually does) manage multiple databases.
Multiple ASE server instances may run on a single host, however, in production environments it is
common to have a dedicated host for a database server .
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
Introduction
System Databases
model
dbccdb
sybsecurity
sybsystemd
b
sybsystemprocs
tempdb
sybmgmtdb
saptools
P01
System Databases
An ASE server comes with a couple of system databases inside the ASE server. These are used
by ASE to manage ist own metadata.
Some of the system databases are mandatory and are created when the ASE server is
instantiated, these are required for proper functioning of the system.
Mandatory system databases
master
ASE's boot sector
model
template database for all other databases
tempdb
system temporary database
sybsystemprocs
stores server wide system 'stored procedures'
sybsystemdb
used for distributed transactions and Sybase two-phase
commit protocol (not used in SAP Environment)
Additional system database (not mandatory)
sybmgmtdb
job scheduler database (mandatory for SAP instances)
dbccdb
stores data generated by 'dbcc' checktool
sybsecurity
auditing database
Neither the 'sybsecurity' nor 'dbccdb' database are created by default
The master database stores information about user databases , devices, ASE server logins and
roles. You must be in the master database to issue certain commands such as 'create database',
'alter database', 'disk init' and some other. 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 page size 16k is 104MB
ASE server in SAP environment always use 16k page size.
The databases 'saptools' and 'P01' in the picture are user databases.
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
Introduction
System tables in the master database
master
sysdatabases
sysdevices
syslogins
sysusages
sysmessage
s
sysengines
.. more tables
syslocks
sysprocesse
s
syslogins
sysservers
sysmessages
sysdatabases
sysusages
sysdevices
syscharsets
syslanguages
sysloginroles
syssrvroles
Runtime Information:
Ongoing processes
Active locks
Adaptive Server engines that are online
Current ASE server configuration
sysprocesses
syslocks
sysengines
syscurconfigs
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
Introduction
Database System Catalog
P01
sysobjects
syscolumns
sysusers
sysindexes
user_table_1
user_table_n
10
Each database has a couple of system catalog tables of ist own. System catalog tables that are
created in every database store database specific metadata and provide an SQL interface to the
database specific metadata.
Examples:
sysusers
sysobjects
sysindexes
syscolumns
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
Introduction
System stored procedures
System table data are usually viewed and managed through system stored procedures
Most administrative tasks can be accomplished using system stored procedures,
this enables remote administration when being connected to ASE with an SQL client, no local login is
necessary.
11
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
Introduction
Sybase ASE Directory Structure
Top level directory of the software
installation directory is refered to as
$SYBASE (UNIX) resp. %SYBASE%
(Windows)
ASE15_0
bin
install
sysam
scripts
$SYBASE
<DBSID>.cfg
OCS15_0
DBISQL
charsets
log
interfaces
12
Directory structure
The top directory where you install ASE (and perhaps other Sybase products is referred to as $SYBASE
(UNIX) , resp. %SYBASE% (Windows). Sybase ASE software may get installed in any location, however, in
SAP environment this is always '/sybase/<SID>' (UNIX) resp. <DRIVE>:\sybase\<SID> (Windows). The
directory and all of its contents belong to the local sybase user id with which the software was installed. This
is the user 'syb<sid>' in SAP installations.
Some subdirectories
Directory OCS-15_0 contains the Sybase open client related files. It also contains isql (command line
interactive SQL Editor) and some utilities such as bcp , a tool for bulk copying of large dataset out of or into a
table. OCS_15_0 also contains the runtime libaries for ESQL C.
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
Introduction
Sybase Environment Variables
$SYBASE / %SYBASE% on Windows
set at installation by administrator
top level installation directory Sybase products
$SYBASE_ASE
set by installation routines, identifies the subdirectory where ASE is installed
it is ASE-15_0 , (even in ASE 15.7)
$DSLISTEN
specifies the name of the default server, if it is not specified in the RUN_SERVER file
required only during server start up
not set per default
$DSQUERY
specifies the server name to use when a client tool is called w/o specifying a server name
not set per default
$SYBASE_OCS
Open client software directory
$JAVA_HOME
needed for some tools, like 'Ribo' (Ribo is a diagnostic tool to trace communication between a Sybase ASE
client and the server)
13
On UNIX the correct Sybase environment gets set when sourcing the file $SYBASE/SYBASE.sh.
Review the contents of that file in case you receive error messages that might result from incorrect
environment settings. Check that the file was indeed sourced .
On Windows a corresponding file SYBASE.bat exists, however the important environment
variables are set as system wide environment variables.
To review these, right click on the computer icon on the desktop, choose Properties. In the popup
window go to 'Advanced System Settings'. In the popup 'system Properties' click the button
'Environment variables'. (Windows is so easy and intuitive, isn't it)
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At : sapmaterials4u@gmail.com
Introduction
The Command Line SQL Editor 'isql'
bash-3.00$ isql SP01 -Usapsa -w 1024
Password:
1> select p.hostprocess, p.spid, p.status, count(l.spid) numlocks from
master..sysprocesses p JOIN master..syslocks l on p.spid=l.spidgroup
by l.spid having l.spid = p.spid order by p.hostprocess,p.spid
go
hostprocess
spid
status
numlocks
--------------- ------------------------400
51
recv sleep
127
5755
58
recv sleep
139
7770
60
recv sleep
325
(3 rows affected)
14
Sybase ASE comes with an SQL editor 'isql', which is available on UNIX and Windows
isql is able to run SQL scripts in batch mode , output can get redirected to output files.
Example:
isql SP01 -Usapsa -Ppass-DP01 -i input.sql -o output.txt
The above example calls isql, connects to a server P01', username is sapsa , password is
apparently 'pass' , the database it uses is called P01', the input is received from the file input.sql
and the output is stored in output.txt.
A usage is displayed with the 'help' option.
useful options (more options are avaialblewhich are not printed here) :
-b Disables the display of the table headers output.
-c cmdend
-D database
-I inputfile
Specifies the name of the operating system file to use for input to isql.
-o outputfile
Specifies the name of an operating system file to store the output from isql.
-P password
-S server_name Specifies the name of the Adaptive Server to which to connect to.
-U username