Friday, October 19, 2012

Sybase Installation


Installation of Sybase

1.Pre Installation Task carried out by UNIX ADMIN
2.Installation carried out by SYBASE DBA
3.Post Installation Task carried out by SYBASE DBA

Pre Installation

  • We need to download the required software
  • Read the “Read me” files to check for system requirements
  • Make sure the UNIX ADMIN applies for the required Sybase patch on the Operating System
SHOWREV -P<patch no >
  • Ask to create a Sybase login with SA permission
        ls -l /opt/sybase
  • To Create the required RAW Devices
20 GB of each raw device
PRTVTOC <raw device>
bytes /sector.........512
…......... …............ …....
…......... …............ …....
…......... …............ …....
FIRST SEGMENT LAST SEGMENT
100254 100354

  • To calculate the size of the device
[ bytes/sector * last segment block]/1024= [KB]
  • Set the shared memory parameter
    • Unix Solaris → /etc/system
    • LINUX → /sbin/sysctl -P
    • kernal.shmax= bytes

          Installation

          • Untar the file
          • ./setup – console → First time installation
              • this process will download/create all the sybase directory binary
          • Edit the resource file and execute “Sybase.sh”
              • cd /sybase/ASE_15_0/init/sample_resource_file/syabse.adaptive.rs

          • srvbuildres -r <resource file name >
          • similarly build the BACKUP SERVER

          Post Installation

          • Change the “ SA ” password by default it is set to NULL
          • Alter the “ tempdb ” to a different device
          • Make Master device Default OFF
          • Change the configuration parameters
              • No of devices [10]
              • No of open databases [12]
              • No of open Indexes[500] Open Objects [500]
              • No of Locks → in 12.5 version we have 5000
              • in 15.0 version we have 10000
                        • Increase the “Max Memory ” {maxmemory is represented in pages 1MB = 512 pages }
                        • Initialization of devices
                        • creation of databases
                        • setting database operations
                        • shutdown and restart the server


                        • Files created after the server build

                          4 ” files will be created
                          • .cfg
                          • Interfaces
                          • 2 runserver files [one for startup and one for backup]
                          • Error log

                          Two devices created

                          • Master Device
                          • Sybsystemprocs Device

                          Default databases
                          1. Master
                          2. Model
                          3. Tempdb
                          4. Sybsystemdb
                          5. Sybsystem process
                          6. Sybsecurity ->ASE 15.0


                          Installation of Sybase in detail

                          1. Pre Installation Task carried out by UNIX ADMIN
                          2. Installation carried out by SYBASE DBA
                          3. Post Installation Task carried out by SYBASE DBA

                          Pre Installation
                          • Download the Sybase Software
                          • Read the readme file for system requiremnts
                          • Apply the required pathces
                          • Create Sybase logins with SA permission
                          • Create the required RAW devices
                          • Set the shared max memory

                          Installation
                          [root @ localhost ~ ]# SU SYBASE
                          [SYBASE @ localhost ~ ] $ ls -ltr

                          drwx rw rw....... …... ….. …. ….1
                          .. ….. …. …... ….. ….. …. …... ..
                          .. ….. …. …... ….. ….. …. …... ..
                          _rwx r_ x r _ _ 1 SYBASE SYBASE 39721160 Mar 8 20:00 ase1502_xe_linux.tar

                          [SYBASE @ localhost ~ ] $ ./Setup

                          Install Shield wizard …....
                          ..........................
                          .........................
                          what would you like to install

                          [1] ASE for evaluation
                          [2] ASE for Enterprise [Developer Edition]
                          [3] ASE for Enterprise [Express Edition]

                          Choice : [1]
                          …................
                          …...............

                          1.Typical
                          2.Full
                          3.Custom
                          Choice :[2]
                          Sybase Features
                          ….........................
                          …..........................
                          …..........................
                          …..........................
                          0%…......................100%
                          Installation Complete



                          Products to configure new
                          [x] 1
                          [x] 2
                          [x] 3
                          ...…..
                          [x] 8
                          Select an item [8]

                          [x] 1
                          [x] 2
                          [x] 3
                          ...…..
                          [x] 8
                          Select an option [1]
                          [] 1
                          [] 2
                          [] 3
                          ...…..
                          [] 8
                          Select an option [0]
                          Installation was successfully

                          [sybase @localhost software] $
                          [sybase @localhost software] $
                          [sybase @localhost software] $ . ./SYBASE.sh
                          [sybase @localhost software] $ echo $SYBASE
                          /opt/sybase

                          [sybase @localhost software] $cd /SYBASE/ASE-15_0/init/sample_resource_file
                          [sybase @localhost sample_resource_file] $
                          sqlloc.rs srvbuild.adaptive_server.rs
                          ........ srvbuild.backup_server.rs
                          .........................................................
                          .........................................................
                          [sybase @localhost sample_resource_file] $cp srvbuild.adaptive_server.rs TESTSERVER.rs
                          [sybase @localhost sample_resource_file] $cp srvbuild.backup_server.rs TESTSERVER_back.rs

                          [sybase @localhost sample_resource_file] $ vi TESTSERVER
                          Sybinit.release directory:/opt/software
                          sybinit.product:sqlserv
                          Sybinit.servername:TESTSERVER
                          .........................................................
                          .........................................................
                          .........................................................
                          Sybinit.network_hostname_list: localhost.localdomain
                          Sybinit.network_port_list : 50000
                          Sybinit.network_master_device_physical_name: /opt/SYBASE/data/master.dat
                          Sybinit.errorlog:/opt/sybase/errorlogs/TESTSSERVER.log {create the errorlogs directory}
                          Sybinit.SybsystemProcs_device_Physical_name: /opt/SYBASE/data/Sybsystem.dat
                          Sybinit.Sysbsytemdb_device_physicalname : /opt/SYBASE/Sybssytemdb.dat
                          Sybinit.default_backup_server:TESTSERVER_BACK

                          [sybase @localhost sample_resource_file] $ vi TESTSERVER_back.rs
                          sybinit.release_directory:/opt/sybase
                          sybinit.product:bsrv
                          bsrv.server_name:TESTSERVER_back
                          bsrv.network_hostname_list:localhost.locadomain
                          bsrv.network_port_list:50001
                          bsrv.errorlog”/opt/sybase/errorlogs/TESTSERVER_back.log
                          sqlsrv.realated.sqlserver:TESTSERVER

                          [sybase@localhost.sample_resource_file]$ srvbuild res -r TESTSERVER.rs
                          sucessfull
                          [sybase@localhost.sample_resource_file]$ srvbuild res -r TESTSERVER_back.rs
                          successful


                          Post Installation

                          1.password change

                          Syntax: sp_password null, “<newpassword>”
                          sp_password null, “test123”

                          2.Disk Initialization or Device Creation
                          Syntax: disk init name =tempdb01
                          physname=”/opt/sybase/data/tempdb01”
                          size= “5M”
                          go
                          3.Alter TEMPDB towards new device
                          Syntax: alter database <database name > on <device name >= “size in MB”
                          alter database tempdb on tempdb01= “5M”
                          go
                          4.Making Master device OFF
                          sp_diskdefault master,default off
                          go
                          5.Check whether server is up or not
                          ps -eaf|grep <servername>
                          ps -eaf|grep TESTSERVER
                          6.Connecting to the server
                          [sybase @localhost ]$ isql -Usa -S TESTSERVER
                          password :test123
                          >_
                          7.Startup and Shutdown of server
                          [sybase @ localhost install]$ startserver -f RUN_TESTSERVER
                          …............................................................
                          …............................................................
                          …............................................................
                          …............................................................
                          (A virtual page os 2048 bytes)



                          [sybase @ localhost install]$ startserver -f RUN_TESTSERVER_back
                          …............................................................
                          …............................................................
                          …............................................................
                          login backup server message in file '/opt/sybase/errorlogs/TESTSERVER_back.log'

                          8.SHUTDOWN
                          First shutdown the backup server and then the data server
                          shutdown [ backup_server_name ] [with {wait|nowait}]

                          The with no_wait option shuts down SQL Server immediately. User processes are aborted, and recovery may take longer after a shutdown with nowait .
                          The default is with wait , so any dumps or loads in progress will complete before the Backup Server process halts. Once you issue a shutdown command, no new dump or load sessions can be started on the Backup Server.
                          1>shutdown SYB_BACKUP
                          2>go
                          1>shutdown
                          2>go

                          No comments:

                          Post a Comment