Thursday , November 21 2024

Sybase ASE Migration from Physical to Virtual Machine

 

Pre-Migration : Questionnaire

That need to ask from the client before planning to migrate SAP Sybase ASE database servers from physical machines to virtual. This following questionnaire is necessary for mission critical systems in-order to safeguard post migration issues related to performance glitches and service interruptions.

  • Complete version of SAP Sybase ASE & Operating System with service pack/patch numbers etc
  • Detailed specs of current production hardware machine (CPU, Memory, Local Disk, FC Card specs, Network Interfaces etc) and brief details of VM Host machine.
  • Detailed Configuration of Sybase ASE (CPU core/engines, Memory Assignment, Default and Named Cache etc), if possible share the configuration files. We also need to review some OS configuration files for database server configuration i.e. /etc/system etc?
  • Are they currently using license version of Sybase ASE? if yes are they also having support subscription with principle SAP Sybase? We also need Sybase licensed setup file copies.
  • Details of environmental variables for both OS and Sybase ASE.
  • How many user databases on this instance? Mention the size of each database and location of data files of master and user databases
  • Is all the data files is on SAN or on local disks?
  • How many concurrent connections on database during peak hours?
  • What SANs will be used before and after migration i.e. SAN details with RAID Levels.
  • How they currently doing monitoring of production database, any specific tools?
  • Share the following health check reports & error log files for last 7 days for
    • Operating System – (CPU, Memory, I/O, Network Utilization)
    • Sybase ASE – Sysmon reports with hourly or half hourly intervals during working hours.
  • Backup & Recovery policies (i.e. frequency of full and incremental backups with the location of dump files, local or remote copies etc)
  • Size of database backups i.e. if doing compress backup mention the compression level.
  • We need Architecture / Block Diagram of their system, focusing the interconnections of all their applications and database servers.
  • Nature of application & Severity level of production system i.e. low, high medium, 24×7 etc.
  • What High Availability / DR Solutions currently setup at their production environment and how many standby / secondary sides they have? (i.e. Clustering, Warm Stand By databases, Replication Server etc). What so ever be the setup give the complete details highlighting the synchronization mode.

 

Migration Activity / Action Plan

Scenario: We need to move the database from physical server machines to virtual in offline mode whereas the operating system and database versions will be the same on both servers. Downtime will be observed during this phase (i.e. depends on the size of the databases)

Current Production Server
1. First of all check and match the Mount Points / locations and their size on both the server
a. Df –h or fdisk –l
2. Check the hostnames of both servers /etc/hosts. It must be same.
3. Note the OS configuration whereas possible
4. Note the IP Addresses of both the servers.
5. Run the following SQL Queries on primary database server from isql or any query tool and save
the output on grid format on excel spreadsheet.
a. select @@version
b. sp_version
c. sp_helpdevice
d. sp_helpserver
e. sp_configure
f. select @@max_connections
g. select @@servername
h. select * from syslogins
i. select * from sysusers
j. sp_helpdb
k. sp_helpdb ‘FOR EACH Database’;

l. note the record count of important activity tables from you critical databases and export it to any external file excel or notepad etc.

6. Take the backup of all users databases using dump database command
7. Shutdown the Sybase ase of primary server using following 2 commands
a. shutdown SYB_BACKUP
b. shutdown with nowait
8. Copy the database backup to new server to any location

New Production Server

9. (Optional if you are moving all binaries from old server to new server OR Sybase ASE Server already installed in this machine) / Install the sybase ASE 15.7 Enterprise Edition on new server with the same server name as  of primary and with the same home location of $SYBASE. Follow the options and proceed the installation and default configuration. (You may change $SYBASE home if you don’t have any constraints of location / mount points in that case you need to readjust the following steps.)

10. Copy/Backup the SERVER.cfg and master.dat on the new server
11. COPYING all DB & Log Files from old server to new server with the same location
12. make a copy of RUN_SERVER File on new server (optional)
13. start DB at destination with single user mode i.e. with -m switch (-c/opt/sybase/ASE-
15_0/SYBASEPRD.cfg -m\) (optional)
14. restore the master database on new server (optional)
15. load database master from’/sw/DB_BKs/master_bk.dat’;(optional)
16. after loading sybase will shutdown automatically(optional)
17. check & verify the all user database files location (DB & LOGS)
18. Switch the IP of new server as of primary and disconnect the primary server from the network
19. Login new server with Sybase or any other less privileged user then root

Note: In case you are moving all the binaries of sybase home $SYBASE , skip the database dump and load steps from the above action plan.

20. Run $SYBASE/source.sh file to load environmental variables.
21. start the sybase with default RUN Files (i.e. $SYBASE/ASE-15/install/RUN_Servername_BS & RUN_Servename)

 

Post Migration Phase:

To ensure the successful migration of database servers we go-through the following steps.

1. login to the new / migrated server and checkout the error log (i.e. $SYBASE/ASE-15/install/servername.log) for the startup activity of new Sybase ASE
2. verify that New Sybase ASE is started using following command
a. ps –ef|grep Sybase
b. showserver
c. connect to isql or any other query tool of Sybase to verify the connectivity / availability
3. Run following queries on isql of new server and check & verify all outputs which are taken from
primary server specially user databases and logins. It must be same as of primary server. If
anything is not same as primary troubleshoot it before moving further.
a. select @@version
b. sp_version
c. sp_helpdevice
d. sp_helpserver
e. sp_configure
f. select @@max_connections
g. select @@servername
h. select * from syslogins
i. select * from sysusers
j. sp_helpdb
k. sp_helpdb’FOR EACH Database’;
4. Connect to the databases and verify the records which was exported earlier or/which as possible and go live with the new server

DONE!

Loading

About Engr. Mohammad Rizwan Yasin

Leave a Reply

Your email address will not be published. Required fields are marked *