0% found this document useful (0 votes)
999 views

Sybase Fundamentals

1. The Sybase database is started by starting the Sybase SQLServer and BCKServer Windows services for the corresponding SID. 2. The Sybase database is stopped by stopping the Sybase SQLServer and BCKServer Windows services for the corresponding SID. 3. The SQLServer service controls the main database processes while the BCKServer service manages backups. Both must be running for the database to be online and available.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
999 views

Sybase Fundamentals

1. The Sybase database is started by starting the Sybase SQLServer and BCKServer Windows services for the corresponding SID. 2. The Sybase database is stopped by stopping the Sybase SQLServer and BCKServer Windows services for the corresponding SID. 3. The SQLServer service controls the main database processes while the BCKServer service manages backups. Both must be running for the database to be online and available.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 70

Sybase ASE

Fundamentals
Trainers
Keshava Munireddy
Ranadhir Bondu
1
Topics to be covered:
What is Sybase and Architecture of Sybase ASE 15.7
How Sybase DB different from other DB administration
DB login process to Sybase DB
Starting and stopping of Sybase Database
Taking DB and Log backups
Sybase Control Center operations for DB administration
Checking logs for troubleshooting
DBACOCKPIT configuration for Sybase DB
ATM & Collector configuration in DBACOCKPIT
2
Topics to be covered:
Sybase DB Database standalone/integrated installation
Sybase Licensing for standalone install
Auto Threshold Log backup setup
Device and DB Expansion policy setup for space auto expansion.
Adding Data/Log file.
Sybase DB Parameter tuning
Sybase DB Restore / Recovery
Sybase DB Patch upgrade including JDBC / ODBC drivers
Sybase DR setup
SAP Migration
3
What is Sybase ASE?
Adaptive Server Enterprise (ASE) is a relational database management system (
RDBMS) from Sybase, Inc. that runs on Linux, Windows and other Unix -based
operating systems. ASE evolved from a program originally called Sybase SQL Server,
which was first released in the year1980s.
Sybase databases are developed to accommodate business needs regardless of size.
The main focus of the database is Web based to allow portability, integration,
manageability and availability of applications as their dedication to businesses
success.
Sybase ASE / SQL Server is an industry high strength performance database. solution
used by some of the largest corporations worldwide. It is also one of the easiest
database servers to learn and to work with. It has a wide range of extremely advanced
options, probably the most advanced replication in the market, and a set of various
addon products that will even support opaque access of data from competing
products.

4
History:
Company founded in 1984, Corporation located in Emeryville, Ca.
Sybase is primarily a UNIX vendor and is recognized as one the largest providers of
database software.
Introduced the SQL server in 1987 as a client server solution that was as designed to
separate the client and server functionality

ASE is designed primarily for use on high-end servers and, according to Sybase, is
especially good at handling online transaction processing ( OLTP ) workload . ASE
Version 15, released in September 2005, includes cursor scrolling, messaging services,
automatic updating, specialized job wizards, very large server support (VLSS), native
storage, processing of XML documents, enhanced encryption
Prior to 1994, Sybase SQL Server evolved along the same lines as Microsoft SQL
Server . Then Microsoft bought a copy of the Sybase SQL server source code and began
engineering its product along a different line. A couple of years later, Sybase renamed its
product ASE (to distinguish it from the Microsoft product) and released ASE Version
11.5.
5
Editions:
SAP offers various editions of Adaptive Server Enterprise:

Enterprise Edition has no limit on scalability and can run all available options that can be
purchased separately.
Small Business Edition has limited scalability and does not have options that can be
purchased separately.
Developer Edition has limited scalability and includes many of the options that are included
in the Enterprise Edition.
Express Edition - has limited scalability and does not have options that can be purchased
separately.
The Express Edition is available on Linux x86, Linux x64 and Linux OpenPower.

6
Versions:
SQL Server 4.2 was released in 1992
Sybase SQL Server 11.0 was released in 1995
ASE 11.9.2 was released in 1998
ASE 12.0 was released in 1999
ASE 12.5 was released in 2001
ASE 15.0 was released in 2005
ASE 15.5 was released in 2010
ASE 15.7 was released in 2011
ASE 16 was released in 2014
Types:
Sybase SQL
Sybase ASE
Sybase IQ
Sybase Replication server

7
8
A single stand alone installation of ASE typically comprises one "dataserver" and one
corresponding "backup server". In multi server installation many dataservers can share one
single backup server though. A dataserver consists of system databases and user's databases.
Minimum system databases that are mandatory for normal working of dataserver are 'master', 'tempdb',
'model', 'sybsystemdb' and 'sybsystemprocs'. ASE is a single process multithreaded dataserver application,
it means when server is up and running there is one single OS process per engine.

Components:
Sybase Engine: Responsible for starting Sybase services and allocating memory based on the configured
parameter. Controller by parameter max online engines" and "number of engines at startup".
Shared Memory : Allocated by Sybase Engine for storing data, procedures and logs temporarily.
Procedure Cache: Stored procedures ex: sp_helpdevice, sp_*.
Data Cache: Storing transaction Data
Log cache: Storing transaction logs
ASE Job scheduler: Responsible for scheduling / managing all Sybase jobs
License Server: Does the License heart beat check and validity
Backup Server: Responsible for DB & Log backups
Databases : We have 7 databases created during install along with named user databases.

9
Databases and use:
Master master database holds critical system related information that includes, logins, passwords, and
dataserver configuration parameters.

Model model database 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.

Saptempdb - Saptempdb database is used for storing temporary data

Saptools - Saptools is used to maintain the tools required for DB administration

Sybmgmtdb - 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, It is
also called job scheduler database

Sybsystemdb sybsystemdb database stores information about distributed transactions. ASE provide transaction
coordination services for transactions that are propagated to remote servers using remote procedure calls (RPCs) or
Component Integration System (CIS).

Sybsystemprocs sybsystemprocs consists of system supplied stored procedures that queries system tables and
manipulates data in them.

Tempdb - 'tempdb' is used for storage of data that are required for intermediate processing of queries, and temporary
data.

10
Databases and use:
Sybase DataFiles: Physical path

\\Sybase\<SID>\sapdata_1 , 2... - Named DB


\\Sybase\<SID>\sapdiag - saptools
\\Sybase\<SID>\subsystem - master, sybsystemdb, sybsystemprocs & Sybmgmtdb
\ \sybase\<SID>\sybtemp TempDB data files
Sybase LogFiles: Physical path
\\Sybase\<SID>\saplog_1

\\sybase\<SID>\sapdiag\saptools_data_001

11
How is Sybase DB different & advantages over other DBs
Sybase ASE 15's total cost of ownership (TCO) compared to Oracle., one requires 2.5
Oracle DBAs to provide the same level of service as a single Sybase DBA.

Sybase is fairly modular and has a simple syntax. Contrast this with Oracle where, in most
cases, you require a third-party product to allow the DBA to reduce his/her workload.
Lower operational costs with a highly-efficient database management system
Maintain the performance and availability you need for extreme transaction processing
Data compression: Enables the use of less storage space for the same amount of data,
reduces cache memory consumption and improves performance with lower I/O demands
by compressing regular and large object data.

Security and directory services: Provides lightweight directory services and network-based
authentication and encryption using SSL and Kerberos.

12
How is Sybase DB different & advantages over other DBs
Partitions:Enables semantic partitioning for table row data.
Encrypted columns: Increases security parameters and allows for addition of data types.

Tivoli Storage Manager: Enables the database to back up and restore operations to IBM Tivoli
Storage Manager.
In-memory database: Provides zero-disk-footprint in-memory database support that is fully
integrated with SAP Sybase ASE for high-performance transactional applications. Relaxed
durability properties provide performance enhancements to disk-resident databases.

SAP Sybase ASE editions and optional features are unlocked by SySAM licenses. See the SAP
Sybase Software Asset Management Users Guide.
Storage and Design Difference:

13
DB login process.
Command Level : Using Isql

Sybase central
https://<hostname>:8283/scc/#-
Login with sccadmin

user and standard password

14
Starting and stopping of Sybase Database
Sybase DB is stopped/Stopped by stopping/Startting sybase DB services
Sybase SQLServer _<SID>
Sybase BCKServer _<SID>_BS

Commands to shutdown DB
Syntax

shutdown [srvname] [with {wait [="hh:mm:ss"] | nowait}]]


Shutdown : Shuts down the Adaptive Server from which the shutdown command is issued

shutdown with nowait : Shuts down the Adaptive Server immediately

shutdown cluster : Shuts down the current cluster

shutdown ase1 :Shuts down the instance ase1, but leaves the cluster running

15
Taking DB and Log backups
Commands to take DB and Log backups
DB backup : dump database <SID> to PATH\file.dmpwith compression=101
Log Backup : dump transaction <SID> to PATH\file.dmp with compression=101

16
Sybase Control Center Operations for DB administration

SAP Control Center (SCC) provides a single, comprehensive, Web administration console for
real-time performance, status, and availability monitoring of large-scale Sybase enterprise
servers. SCC combines a modular architecture, a rich client administrative console, agents,
common services, and tools for managing and controlling SAP products. It includes historical
monitoring, threshold-based alerts and notifications, alert-based script execution, and intelligent
tools for identifying performance and usage trends.
How to Launch:
https://<hostname>:8283/scc/# - We need to register our Sybase DB after install

Login with sccadmin


user and standard
password

17
Register Sybase DB

18
Administration Console and Logins
Browse Tab -> Right click logins -> New -> Enter user details through Wizard based
configuration -> Assign required roles

19
How to create Data and Log file in SCC
Step1 : Create Device names for Data and Log files for <SID> DB.
Ex: use master
go
disk init
name = "EDATA",
physname = "E:\Sybase\data\bop_data1.dat",
size = 6444000,
directio= true
go
Step 2: Create database - > Add devices for both
DB and Log

20
Add Data and Log Files
Log and Data file can be added using disk init command.
disk init name = <NAME>, physname = <PATH>", size=<size>
Ex: use master
go
disk init
name = <Device Name>",
physname = \\Sybase\data\<sid>_data2.dat",
size = 6244000, [Note: 1 GB = 64000 Pages]
directio= true
go
sp_helpdevice command is used to view details of existing devices
Alter command is used to resize/Adjust DB
alter database <sid> log on <device> = size

To Resize the Device/Data files


use master
go
disk resize name = "PID_data_001", size = "5000M"
go
alter database PID on PID_data_001 = "5000M"
21
DBACOCKPIT Central Transaction for all DBA monitoring and
Operations.

Configuration:
1. Set below Parameters
login/accept_sso2_ticket = 1
login/create_sso2_ticket = 2
2. Activate ICF services under SAP

22
3. Run the report as per the SAP note 1245200

23
Go to Transaction DBACOCKPIT
Self System will be created automatically and visible under system connections.

If you have connectivity issue and want to update sapsa Password. Can be done as
below.

24
DBACOCKPIT Dashboard

25
ATM & Collector configuration for all in DBACOCKPIT

The SAP DBA Cockpit for Sybase ASE introduces a flexible framework that allows you
to set up and control automatic table maintenance
Considering the thousands of tables and indexes a typical SAP system creates on the
database, this solution dramatically reduces manual administrative activities and thus
significantly reduces the TCO of the SAP on Sybase ASE solution
Collector Configuration

26
ATM & Collector configuration for all in DBACOCKPIT

Help Link:
http://help.sap.com/saphelp_nw73/helpdata/en/e5/af5bad9e3d459f9f35560eab1098
eb/content.htm

27
ATM configuration
Sophisticated business applications like the SAP Business Suite execute millions of DML
statements a day. In a data warehouse scenario, for example, reports are constantly being
generated to determine whether business targets are being met while the background tasks are
executed to load collected data into data cubes or to delete obsolete data. This constant
manipulation of data sets causes data fragmentation, leaves non-reusable free space behind, and,
finally, invalidates optimizer statistics, which can end up in poor query performance.
Configuration:

28
ATM configuration

Help Link:
http://help.sap.com/saphelp_nw73/helpdata/en/76/2c6afeb7e2442ea84ce9f12d113068/content
.htm?frameset=/en/e5/af5bad9e3d459f9f35560eab1098eb/frameset.htm&current_toc=/en/59/8
4c162a0974e99be741ae14fbd9bf4/plain.htm&node_id=43&show_children=false

29
SQL commands for DB parameter staging/tuning
Sybase DB needs to be tuned for optimal performance based on hardware
1749935 - SYB: Configuration Guide for SAP ASE 15.7
Syntax: sp_configure Parameter, Value
Ex: sp_configure "job scheduler interval",30
Below are the some of the Sybase parameters need to be tuned after install.
Max memory
Lock entries
Scheduler interval
Enable housekeeper GC
Number of open indexes
Procedure and statement cache
Number of work processes

30
Sybase Database standalone installation.
Sybase DB can be installed in both integrated and standalone mode.
Integrated mode DB which is part of Business suite and it will be installed by
sapinst during installation and will mention path of DB software in sapinst.
We have an option to install Sybase ASE separately for standalone applications.
Download Sybase ASE Installation files:
Go to service.sap.com/swdc
Navigate to
Installations and Upgrades
Browse our download catalog
Sybase Products
SAP Adaptive Server Enterprise
Sybase ASE 15.7
Installation
Microsoft Windows
Sybase ASE 15.7 Refresh Windows x64
31
Sybase Database standalone installation.

32
Sybase Database standalone installation.

Install Type and License

33
34
Installation completed and check the installed databases.
Open Isql GUI after install and login with sapsa user and execute sp_databases as shown below

35
Sybase Database integrated installation
Sybase DB is installed along with SAP installation.
Provide Path of RDBMS during SAP installation

36
Enter configuration Parameter.

37
Sybase Licensing

SAP offers a stand-alone and run-time license for SAP Sybase ASE Enterprise Edition. To use ASE with a stand-
alone license, a request has to be sent in to obtain licenses for the same ASE options as included in the run-time
license in order to stay compliant. The runtime license includes ASE options that are required for running the SAP
Business Suite. The runtime license comes at an extremely favorable cost: the fee is 8% of the SAP application
value (SAV). The SAP Sybase ASE installer automatically installs a SySAM license server if you choose the full
installation option or enter a served license when prompted for the SySAM license key. You can also install the
license server using the installer's custom installation option.

When you purchase SySAM 2enabled SAP database products, you must generate, download, and deploy SySAM
product licenses.

If you purchased your product from SAP-Sybase or an authorized SAP-Sybase reseller, go to the secure Sybase
Product Download Center (SPDC) and log in to generate license keys. The license generation process may vary
slightly, depending on whether you ordered directly from SAP-Sybase or from a SAP-Sybase reseller.

When you purchase SySAM2-licensed products from a SAP-Sybase reseller, your product package may include a
Web key certificate that contains the location of the SPDC Web key login page and the activation string to use for
the login name.

If you ordered your product under an SAP contract and were directed to download from SAP Service Marketplace
(SMP), you can use SMP to generate license keys for Sybase products that use SySAM 2-based licenses
38
Sybase Licensing through SAP Standard Install

Sybase Licensing through SAP Standalone Install Needs separate productive license.
License will be valid for 1 month during standalone install , hence we need to apply an renew it
manually.
Error / System down due to license expire:

39
How to apply License and install
https://service.sap.com-> Keys and requests - > License Keys
Choose SID and fill the details
Once generated-> Copy the license file manually in Licenses directory

40
How to enable / Disable DB Logging

SAP- Note 1585981 - SYB: Ensuring Recoverability for Sybase ASE


(Syntax : sp_dboption [dbname, optname, {true | false}] )
'trunc log on chkpt', 'false'
'full logging for all', 'true'
'enforce dump tran sequence', 'true

We need to execute the below commands in sequence to enable the DB Logging


use master
sp_dboption CJP, 'trunc log on chkpt', 'false
go
sp_dboption CJP, 'full logging for all' , 'true
sp_dboption CJP, 'enforce dump tran sequence', 'true'

41
Configure automatic Database and Log Backup
Reference Notes

Note 1801984 - SYB: Automated management of long running transactions


Note 1588316 - SYB: Configure automatic database and log backups
Note 1802842 - SYB: Error 1105 and / or Error 3475 in ASE error log

Create a file system to store the dumps.


Create a dump configuration.

Create a job and a schedule for each database you want to back up.
DBACOCKPIT central calendar Schedule an Action

42
Configure automatic Database and Log Backup
SQL Script

43
Auto Threshold Log backup setup
Define Backup Stripe directory

Download sp threshold action script from SAP Note :1801984


Edit the Script, replace <my_dump_config> with backup strip

Grant authorization to user sapsa : sa_role and mon_role


44
Auto Threshold Log backup setup
Execute sp threshold action script

Add threshold backup values : threshold value is set approx at 3 GB

Validate auto threshold backup

45
Device and DB Expansion policy Setup
Policy to enable the automatic extend or expansion of Device and DB files when it
reaches
C:\Users\sybcrp>isql -Usapsso -SCRP
sp_locklogin 'sa', 'unlock'

Script in Path - D:\sybase\CRP\ASE-15_0\scripts


isql -Usa -SCRP -iinstalldbextend -oinstalldbexted.log

46
Setup the Threshold
exec sp_dbextend 'set', 'threshold', CRP, 'default', '500m'
exec sp_dbextend 'set', 'threshold', CRP, 'logsegment', '200m

Step 2 : Setup Expansion %


exec sp_dbextend 'set', 'database', CRP, logsegment,'10%'
exec sp_dbextend 'set', 'database', CRP, 'default', '10%

We have to follow the same steps for other DBs like


Saptools, master, model...etc.

Command to List all devices:


sp_dbextend list, device
go
47
Device and DB Expansion thresholds and values

48
Sybase DB Restore / Recovery
DB restore is done using Load database
Load database from <SID> from <PATH>

Load Transaction from <SID> from <PATH>

49
Sybase DB Patch upgrade including JDBC / ODBC drivers
Reference Notes :1590719 & 1607816
Software Details
ASE& DBCLNT

Pre-requisites
Determine current versions of database and drivers
sqlsrvr.exe --sbssav
sqlsrvr.exe version
Determine ODBC Version
In dev_w* search for ASE database version. Path \usr\sap\SID\DVEBMGSxx\work

Determine JDBC Version : using command %JAVA_HOME%\bin\java jar jconn3d.jar

50
Sybase DB Patch upgrade including JDBC / ODBC drivers

Check Space requirement


Resize the database - Make sure all the databases of the system have alteast 1GB freespace
SID
Master
Model
Saptools
Sybmgmtdb
Sybsystemdb
Sybsystemprocs

Backup environment variables

51
Sybase DB Patch upgrade including JDBC / ODBC drivers
Backup the system

Check and Install MS VC++ updates

52
Sybase DB Patch upgrade including JDBC / ODBC drivers
Start Sybase installation GUI

53
Sybase DB Patch upgrade including JDBC / ODBC drivers

54
Sybase DB Patch upgrade including JDBC / ODBC drivers

Check the log file for any errors. sybase\SID\ASE-15_0\install\SID.log

55
Sybase DB Patch upgrade including JDBC / ODBC drivers
Post update tasks
Start the Sybase services in the following order from WIN services:
Sybase BCKServer _<SID>_BS & Sybase SQLServer _<SID>
Execute the following Sybase installation scripts in sequence: These scripts needs to be executed using user Sa.
Instmstr
Instcomm
instmsgs.ebf
installjsdb
Restart the job scheduler
sp_configure "enable job scheduler", 1
go
exec sybmgmtdb..sp_js_wakeup "start_js", 1
go
Execute the script 'syb_update_db.TXT
Lock user sa : sp_locklogin 'sa', 'lock'

56
Sybase DB Patch upgrade including JDBC / ODBC drivers
Restart the Sybase services in the following sequence:

Stop Sybase SQLServer _<SID>


Restart Sybase BCKServer _<SID>_BS
Start Sybase SQLServer _<SID>

Verify upgrade

JDBC and ODBC driver updates : Uncar the JDBC/ODBC update software into this directory:
Open command prompt and change directory to :\usr\sap\<sid>\SYS\global\syb\NTAMD64

57
Sybase DB Patch upgrade including JDBC / ODBC drivers
Update the JDBC driver location
Make sure the new JDBC drivers are copied by the kernel as below:
From: \usr\sap\<sid>\SYS\global\syb\NTAMD64\sybjdbc
To: D:\usr\sap\<sid>\DVEBMGS00\exe\sybjdbc

Validate JDBC/ODBC version

58
Sybase DR setup

Refer SAP Note : 1650511

59
Sybase DR setup

Install the DR System


Use the Export and import method to build SAP DR system.
Stop SAP and its services.

DR Steps:
Backup the Master DB and other 3 DBs from primary node.
Drop master DB and device in the DR server.
1 . Start DR master DB in single user Mode by running the below script

60
Sybase DR setup
Load master database

Restart ASE in multi user mode as a service by restarting the services.


Re-create and load the databases SID, 'sybmgmtdb, sybmgmtdev, saptools, datasaptools_1,&
logsaptools_1 ( Drop DB and Device and recreate)

Create the Device and DB


disk init name='datasaptools_1', physname=\\sybase\<SID>\sapdiag\datasaptools_1.dat',
size='2048M', directio = 'true'
61
Sybase DR setup
Create DB
CREATE DATABASE saptools ON datasaptools_1 = '2048M'
2>LOG ON logsaptools_1 = '200M' FOR LOAD
3>go

Bring database online, using the command : online database <DB>

Recreate User DB and Log, Load DB and Tlog.


<sid> db should be in offline Mode in DR system.
62
Sybase DR setup
Setup log shipping scripts as per below directory in Primary and DR system
Primary System
Take a Transaction log
Perform a log shipping to PIP DR
To use this script please change source and target hostnames, by editing the file.
Write log output to dmplgout ( after every dump) & logtrsfr ( PP- DR log transfer results)

DR system
DRloadlog- Apply log in PIP DR (After log is shipped, with delay of 15 minutes)
MaillogtoAdmin- Send Email Notification (Runs after log is applied, after job PIP-DRloadlog runs with delay of 10 minutes)

63
Sybase DR setup

Modify Scripts for log shipping, log dump on primary DB server and loading tran dumps on
secondary DR server
execute script dump log to run every 1 hour in primary server
Setup scheduled task in both systems (to run Log Shipping and Load Log into DR database)

Additional note: Perform File system replication from Primary to DR server and also take
export of Java Engine, when ever any patching in Primary, During takeover, Import in DR
system.

64
Migration

65
Migration
Source System : export

66
Migration

67
Migration

Target System : Import

68
Sybase DB Administration Help Links:

https://service.sap.com

http://scn.sap.com/docs/DOC-36181

http://help.sap.com/saphelp_sm71_sp10/helpdata/en/14/95bd14c0564c19bf1fd94c01920c32/c
ontent.htm?frameset=/en/48/bb072bf5fe307be10000000a42189b/frameset.htm

http://scn.sap.com/community/sybase-ase

http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.help.ase.15.7/title.ht
m

69
THANK YOU

Questions and Answers

70

You might also like