Sybase Ase

Embed Size (px)

Citation preview

  • 8/17/2019 Sybase Ase

    1/25

    Agenda

    • SAP ASE evaluation

    • Understanding SAP ASE

    • Managing the Databases

    • Managing the Database parameters

    • Backup and restore

  • 8/17/2019 Sybase Ase

    2/25

    SAP ASE evaluation

    • SAP Sybase ASE (Adaptive Server Enterprise !hich is commonly kno!n as ASE or "ust Sybase DB#

    is a relational model database server product $or businesses developed by Sybase %orporation !hich

     became part o$ SAP A&' ASE is predominantly used on the Uni plat$orm# but is also available $or

    Microso$t )indo!s'

    • *riginally $or Uni plat$orms in +,-.# Sybase %orporation/s primary relational database management

    system product !as initially marketed under the name Sybase S01 Server' 2n +,--# S01 Server $or

    *S34 !as co5developed $or the P% by Sybase# Microso$t# and Ashton56ate' Ashton56ate divested its

    interest and Microso$t became the lead partner a$ter porting S01 Server to )indo!s 76' Microso$t

    and Sybase sold and supported the product through version 8'4'+'

    • Sybase released S01 Server 8'4 in +,,4' later Microso$t is separated $rom Sybase# and they started

    developing MS S01 server versions

    • 1atest name o$ Sybase ASE is SAP ASE

  • 8/17/2019 Sybase Ase

    3/25

    Sybase system databases

    • 6here are $ive re9uired system databases in Sybase ASE

    •   master DB

    •   model DB

    •   temp DB

    •   sybsystemprocs DB

    •   sybsystemdb

  • 8/17/2019 Sybase Ase

    4/25

    System databases

    •   master DB : contain metadata and brain o$ Sybase ASE' 2ts $irst DB !hich come online a$ter

     boot'

    •   model DB : template DB' )henever ne! DB is created # a copy o$ model DB is copied'

    •   temp DB : temporary database' Used during sorting and other temporary !ork'

    •  sybsystemprocs DB : store all system procedure in$o'

    •  sybsystemdb : used $or distributed transaction management system'

    • Additional databases

    • sybmgmt DB : stores "ob schedule in$ormation'

  • 8/17/2019 Sybase Ase

    5/25

    User databases

    • User De$ined Databases ;S2D< is SAP database =

    sap tools (Dbaockpit >istory database

    6hese databases created by SAP installer in SAP ASE'

  • 8/17/2019 Sybase Ase

    6/25

    SAP ASE file system in SAP

    File System/logical volume Description

    /sybase/ SAP ASE so$t!are (?S@BASE Sie: at least 8 &B

    /sybase//sybsystem

    1ocation $or devices

    master'dat

    sybmgmtdb'dat

    sybsysdb'dat

    sysprocs'datSie: at least + &B

    /sybase//sybtemp 1ocation $or device tempdb# Sie: at least &B

    /sybase//saptemp 1ocation $or device saptempdbC Sie: at least &B

    /sybase//sapdiag

    1ocation $or devices containing the database saptools

    Sie: at least &B

     

    /

    sybase//sapdata_ 1ocation $or devices containing data

    /

    sybase//saplog_ 1ocation $or devices containing logs

    /

    sybase//sybsecurity

    1ocation $or devices containing the database sybsecurity

    Sie: at least + &B

  • 8/17/2019 Sybase Ase

    7/25

    Database user roles

    • System Administrator 

    •   by de$ault the system administrator (the sa

    • has the $ollo!ing role

    • sarole• ssorole

    • operrole

    • sybasetsrole

    • Managing disk storage

    • Backuping and loading databases

    • granting permissions to adaptive server users

  • 8/17/2019 Sybase Ase

    8/25

    Database user 

    • 1ist o$ database users

    +' SA

    4' SAPSA

    ' Sapsso

    )e can list the user by using stored procedure

     

  • 8/17/2019 Sybase Ase

    9/25

    Connecting to database

    • 2s9l Usapsa S;S2D< 5D;S2D< 5G

    U iusername

    S server nameD Database name

    G5 7et!ork authentication

  • 8/17/2019 Sybase Ase

    10/25

    Sybase central control

    • Sybase Central control

    • Sybase %entral is the primary tool $or !orking !ith database ob"ects on !indo!ing systems'

    • @ou can use Sybase %entral to manage servers# databases# and dbspaces' 2t lets you create# modi$y#and delete all kinds o$ database ob"ects# including tables# procedures# vie!s# indees# users# and

    groups' 6o use Sybase %entral on multiple servers# see Using Sybase 20 Multiple'

     

    • 6his chapter is concerned !ith the S01 statements $or !orking !ith database ob"ects' 2$ you use

    Sybase %entral# these S01 statements are generated $or you' 6he primary source o$ in$ormation

    about Sybase %entral is the Sybase %entral online help' 6his chapter gives only brie$ pointers $or

    tasks that you can carry out using Sybase %entral

  • 8/17/2019 Sybase Ase

    11/25

    List of process run at OS level

    • SAP ASE list o$ Process run at background

    • HU7S2D

    • HU7S2DBS

    • ISA&E76

  • 8/17/2019 Sybase Ase

    12/25

    SAP ASE supports

    • SAP ASE supports E>p4 For SAP 7et!eaver .'J on!ards

    • 2t/s support/s operating systems both $or U72G systems and !indo!s systems

    • U72G: A2G.'+ = >P5U72G ++'+ = Solaris +J = ++

    • 12nu: Hedhat enterprise linu K = . and suse enterprise linu +J = ++• )indo!s server 4JJ- on!ards

    • %luster edition SAP ASE+L'. +J

  • 8/17/2019 Sybase Ase

    13/25

    Managing databases space

    + Adding the data$ile to database device

    •use master

    •go

    • disk init name/sybmgmtdb4/# physname/E:NsybaseNDEONsybsystemNsybmgmtdb4'dat/# sie/+'L&

    •i Assigning the created database device space to database

    •alter database sybmgmtdb on sybmgmtdb4 +JJJM (mention in mbs

    •go

      7ote : >ere sybmgmtdb4 is the device name and sybmgmtdb is the database

    4 Hesiing the database device

    •disk resie name Qsybmgmtdb4Q# sie Q8MR

    • 7ote : sybmgmtdb4 is the database device name

  • 8/17/2019 Sybase Ase

    14/25

    Managing databases space

    +Adding space to log $ile

     

    •alter database saptools log on saptoolslogJJ+ +J48

    •go

    4 Shrinking log $ile # i$ unused space is available

    •alter database S2D log o$$ S2DlogJJ+'dat Q+,8LKMQ

    •go

  • 8/17/2019 Sybase Ase

    15/25

    DATA SAC! AD"I#IST$ATI%#

    &e can monitor database space'

    DB() *Data space Administration+

    &e can also e,tend database space using dbacoc-pit by selecting t.e Sybase Database

  • 8/17/2019 Sybase Ase

    16/25

    DATA SAC! AD"I#IST$ATI%#

     

    !,tending database sie

    !nter t.e database name and type o0 0ile

  • 8/17/2019 Sybase Ase

    17/25

    DATA SAC! AD"I#IST$ATI%#

     

    !,tending database sie

    !nter t.e database name and type o0 0ile

  • 8/17/2019 Sybase Ase

    18/25

    DATA SAC! AD"I#IST$ATI%#

     

    !,tending database sie

    !nter t.e database name and type o0 0ile

  • 8/17/2019 Sybase Ase

    19/25

    DATABAS! BAC12 $!C%""!#DATI%#S

    "andatory bac-ups3 database *usually system id+4 database transaction logs *usually

    system id+ daily

    %ptional bac-ups3 "aster4 sybmgmtdb4 sap tools at 5ee-ly once

    $ecommended Cycle 0or )6 days

    Daily Full online bac-up o0 sap system DB

    Fre7uent Daily Transaction 8ogs o0 SA system DB

    &ee-ly once 0ull o00line sap system DB *in Sunday+

    &ee-ly once optional database bac-ups 3 master4 sybmgmtdb4 saptools

    &ee-ly once operating system level bac-up is recommended

    Ta-ing t.e database Bac-up

    C392sers9b5dadm>is7l :2sapsa :SB&D :DB&D :;

    ass5ord3

    > dump database B&D to =!39bac-up9B&D_DB_(6_(_)('dmp=

    )> go> dump transaction B&D to =!39bac-up9B&D_DB_(6_(_)('trn=

    )>go

    dump database saptools to =!39bac-up9B&D_DB_(6_(_)('trn=

    go

  • 8/17/2019 Sybase Ase

    20/25

    DATABAS! $!ST%$!

    $estoring database using latest Bac-up

    Stopsap and start only database services

    C392sers9b5dadm>is7l :2sapsa :SB&D :DB&D :;

    ass5ord3

    >use master

    )>go

    ?>load database B&D 0rom @!39BAC129B&D_%FF_(__)('dmp

    >go

    >load transaction B&D 0rom @!39BAC129B&D_T$A#S_(__)('trn>go

    >online database B&D

    6>go

    2pdating statics 0or table manually

    Is7l E2sapsa :S$D : D$D :;>use $D

    )>go

    ?>set 7uoted_identi0ier on

    >go

    >update inde, statistics SAS$?'=$!%S$C=

    >go

    t t t d t d t b i ll

  • 8/17/2019 Sybase Ase

    21/25

    o5 to start and stop database services manually

    ' Starting Sybase database service

    8ogin to sybuser

    Cd /sybase//AS!:_(/install

    Startserver E0 $2#_

    )' Stopping Sybase database service

    8ogin to sybuser

    is7l :2sapsa :SB&D :DB&D :;

    >s.utdo5n

    )> go

    ?' Starting Sybase bac-up service

    8ogin to sybuser

    Cd /sybase//AS!:_(/install

    Startserver E0 $2#__BS

  • 8/17/2019 Sybase Ase

    22/25

    ' To start and stop database Gob sc.eduler *HSA!#T+

    'Starting database Gob sc.eduler

    8ogin to syb

    is7l :2sapsa :SB&D :DB&D :;

    >use sybmgmtdb

    )> go

    ?>e,ec sp_sGobcontrol Jname K#2884 JoptionK@start_Gs

    >go

    )'Stopping database Gob sc.eduler

    8ogin to syb

    is7l :2sapsa :SB&D :DB&D :;

    >use sybmgmtdb

    )> go?>e,ec sp_sGobcontrol Jname K#2884 JoptionK@stop_Gs

    >go

  • 8/17/2019 Sybase Ase

    23/25

    "onitoring t.e database error messages

    8ogin to syb

    Cd /sybase/!SD/AS!:_(/install

    For database error logs 'log

    For database bac-up logs _BS'log

    For HS agent logs _HSA!#T'log

    "onitoring tools in Sybase

    > monitoring t.e Sybase database parameters utiliation

    is7l :2sapsa :SB&D :DB&D :;

    >sp_monitorcon0ig @all

    )>go

    )> monitoring Sybase database per0ormance in last t5o mins

    > sp_sysmon L((3()3((L

    )> go

  • 8/17/2019 Sybase Ase

    24/25

    "onitoring t.e database space utiliation by 7uery

    is7l :2sapsa :SB&D :DB&D :;

    > S!8!CT =Database= K C%#M!$T*c.ar*)(+4 db_name*D'dbid++4 =Data Sie= KST$*S2"*CAS! &!# 2'segmap NK T!# 2'sieO*JJma,pagesie/()+/()

    !#D+4(4+4 =2sed Data= K ST$*S2"*CAS! &!# 2'segmap NK T!# sie :

    curunreservedpgs*2'dbid4 2'lstart4

    2'unreservedpgs+!#D+O*JJma,pagesie/()+/()4(4+4=Data FullP= K ST$*(( O

    * : '( O S2"*CAS! &!# 2'segmap NK T!# curunreservedpgs*2'dbid4 2'lstart4

    2'unreservedpgs+ !#D+/S2"*CAS! &!# 2'segmap NK T!# 2'sie !#D++4Q4+ R

    =P=4 =8og Sie= K ST$*S2"*CAS! &!# 2'segmap K T!#

    2'sieO*JJma,pagesie/()+/() !#D+4(4+4=Free 8og= K

    ST$*lct_admin*=logsegment_0reepages=4D'dbid+O*JJma,pagesie/()+/()4(4+4

    =8og FullP= K ST$*(( O * : '( O lct_admin*=logsegment_0reepages=4D'dbid+ /

    S2"*CAS! &!# 2'segmap K T!# 2'sie !#D++464+ R =P= F$%"

    master''sysdatabases D4 master''sysusages 2 &!$! 2'dbid K D'dbid A#D **D'dbid

    > ?+ A#D *D'dbid < ??+ A#D *D'status NK )++ $%2 B D'dbid %$D!$ B

    db_name*D'dbid+

    )> go

  • 8/17/2019 Sybase Ase

    25/25

    For re0erence tuning t.e Sybase database

    lease 0ollo5 t.e document

    http://c/Users/IBM_ADMIN/Desktop/sybase%20ASE/ASE%20runtime%20environment%20bestpractices.pptxhttp://c/Users/IBM_ADMIN/Desktop/sybase%20ASE/ASE%20runtime%20environment%20bestpractices.pptxhttp://c/Users/IBM_ADMIN/Desktop/sybase%20ASE/ASE%20runtime%20environment%20bestpractices.pptx