SAP Sybase ASE 15.7 SAP Sybase ASE 15.7 Additional Dataserver Creation Manual Steps Example




Manual Creation of an additional dataserver on Centos Linux


This is a a worked example of a manual install of an additional dataserver on a host.

Opinions on this page are my own and do not reflect procedures outlined by SAP.

A new dataserver will be created with name "APPS2016".

Edit of interfaces file


edit file: /home/sybase/SYB157/interfaces

The following lines were added to the interfaces file with new port numbers of 5020, 5021,5022.
APPS2016
        master tcp ether centosdev 5020
        query tcp ether centosdev 5020


APPS2016_BS
        master tcp ether centosdev 5021
        query tcp ether centosdev 5021


APPS2016_XP
        master tcp ether centosdev 5022
        query tcp ether centosdev 5022

Creation of config file


The config file from the original dataserver can be copied as a template.

new file: /home/sybase/SYB157/APPS2016.cfg

Copying of RUNSERVER file


[sybase@centosdev install]$ cat RUN_APPS2016
#!/bin/sh
#
# ASE page size (KB):   4k
# Master device path:   /home/sybase/SYB157/data/master_apps.dat
# Error log path:       /home/sybase/SYB157/ASE-15_0/install/APPS2016.log
# Configuration file path:      /home/sybase/SYB157/ASE-15_0/APPS2016.cfg
# Directory for shared memory files:    /home/sybase/SYB157/ASE-15_0
# Adaptive Server name: APPS2016
#
/home/sybase/SYB157/ASE-15_0/bin/dataserver \
-sAPPS2016 \
-d/home/sybase/SYB157/data/master_apps2016.dat \
-e/home/sybase/SYB157/ASE-15_0/install/APPS2016.log \
-c/home/sybase/SYB157/ASE-15_0/APPS2016.cfg \
-M/home/sybase/SYB157/ASE-15_0 \

Creation of script file to create dataserver


[sybase@centosdev create_apps2016_from_command_line]$ cat CREATE_APPS2016
#!/bin/sh
#
# ASE page size (KB):   4k
# Master device path:   /home/sybase/SYB157/data/master.dat
# Error log path:       /home/sybase/SYB157/ASE-15_0/install/APPS2016.log
# Configuration file path:      /home/sybase/SYB157/ASE-15_0/APPS2016.cfg
# Directory for shared memory files:    /home/sybase/SYB157/ASE-15_0
# Adaptive Server name: APPS2016
#

/home/sybase/SYB157/ASE-15_0/bin/dataserver -b 100M  \
-z 4K \
-d/home/sybase/SYB157/data/master_apps2016.dat \
-e/home/sybase/SYB157/ASE-15_0/install/APPS2016.log \
-c/home/sybase/SYB157/ASE-15_0/APPS2016.cfg \
-M/home/sybase/SYB157/ASE-15_0 \
-sAPPS2016 \

4K logical page
100M master device

Run CREATE_APPS2016


dataserver: master device size for this server: 100.0 Mb
dataserver: master database size for this server: 26.0 Mb
dataserver: model database size for this server: 6.0 Mb
The master device is now created:

-rw-r----- 1 sybase sybase 104857600 Nov 20 12:29 /home/sybase/SYB157/data/master_apps2016.dat

Start dataserver


[sybase@centosdev install]$ pwd
/home/sybase/SYB157/ASE-15_0/install

[sybase@centosdev install]$ startserver -f RUN_APPS2016

isql into new dataserver


The new dataserver will not have a password (carriage return is just required)

[sybase@centosdev install]$ isql -Usa -SAPPS2016 -w300
Password:
1> select name from sysdatabases
2> go
 name
 ------------------------------------------------------------
 master
 model
 sybsystemdb
 tempdb

(4 rows affected)
1>

Create devices and sybsystemprocs database


1> disk init name="sybsystemprocsdev_250M", size="250M",
2> physname="/home/sybase/SYB157/data/sybsystemprocs_apps2016_250M.dat"


1> create database sybsystemprocs on sybsystemprocsdev_250M=250
2> go
CREATE DATABASE: allocating 64000 logical pages (250.0 megabytes) on disk
'sybsystemprocsdev_250M' (64000 logical pages requested).
Database 'sybsystemprocs' is now online.

Create tempdb device and alter tempdb


1> disk init name="tempdb_apps2016_100M",
2> physname="/home/sybase/SYB157/data/tempdb_apps2016_100M.dat",
3> dsync="false",
4> directio="false",
5> size="100M"

1> alter database tempdb on tempdb_apps2016_100M=100
2> go
Extending database by 25600 pages (100.0 megabytes) on disk
tempdb_apps2016_100M
Decision taken for this dataserver not to split data and log
and not remove tempdb database fragments from master.

installmaster script


Install system stored procedures:

[sybase@centosdev scripts]$ pwd
/home/sybase/SYB157/ASE-15_0/scripts

isql -Usa -SAPPS2016 -w300 -iinstallmaster -oinstallmaster.APPS2016.out

installmodel script


isql -Usa -SAPPS2016 -w300 -iinstallmodel -oinstallmodel.APPS2016.out

Set dataserver name


1> select @@servername
2> go

 ------------------------------------------------------------
 NULL

(1 row affected)
1> sp_addserver APPS2016, local
2> go
Adding server 'APPS2016', physical name 'APPS2016'
Server added.
(return status = 0)
1> select @@servername
2> go

 ------------------------------------------------------------
 NULL

(1 row affected)


(Illustrates a dataserver restart is required before @@servername takes effect)

Shutdown dataserver


1> shutdown
2> go
Server SHUTDOWN by request.
ASE is terminating this process.
CT-LIBRARY error:
        ct_results(): network packet layer: internal net library error: Net-Library operation terminated due to disconnect


sybase@centosdev install]$ pwd
/home/sybase/SYB157/ASE-15_0/install

mv APPS2016.log APPS2016.log.install

restart dataserver

startserver -f RUN_APPS2016

inspect the dataserver errorlog APPS2016.log

Check @@servername is set after dataserver restart


1> select @@servername
2> go

 ------------------------------------------------------------
 APPS2016

(1 row affected)

Check database summary after dataserver restart


select convert(char(16), db_name(d.dbid))
+ "|Data_Total_MB=" + convert(char(9), ceiling (sum(case when u.segmap != 4 then u.size/1048576.*@@maxpagesize end )))
+ "|Free_MB=" + convert(char(14), (convert(numeric(8,1),
           ((sum(case when u.segmap != 4 then u.size/1048576.*@@maxpagesize end ))) - (sum(case when u.segmap != 4 then size 
           - curunreservedpgs(u.dbid, u.lstart, u.unreservedpgs) end)/1048576.*@@maxpagesize))))
+ "|Used=" + rtrim(convert(char(9), (convert(numeric(12,2),
           100 * (1 - 1.0 * sum(case when u.segmap != 4 then curunreservedpgs(u.dbid, u.lstart, u.unreservedpgs) end) / sum(case when u.segmap != 4 then u.size end)))))) 
+ "%"
from master..sysdatabases d, master..sysusages u
where u.dbid = d.dbid  and d.status not in (256,4096)
group by d.dbid
order by db_name(d.dbid)


 master          |Data_Total_MB=26       |Free_MB=14.1          |Used=45.64%                                                       
 model           |Data_Total_MB=6        |Free_MB=2.6           |Used=55.85%                                                       
 sybsystemdb     |Data_Total_MB=6        |Free_MB=2.5           |Used=57.42%                                                       
 sybsystemprocs  |Data_Total_MB=250      |Free_MB=97.3          |Used=61.07%                                                       
 tempdb          |Data_Total_MB=106      |Free_MB=102.2         |Used=3.55%                                                      

Add the sa password



1> sp_password NULL, "newpassword", sa
2>
3> go
Password correctly set.
(return status = 0)

Set up and start sybase backup server


[sybase@centosdev install]$ cat RUN_APPS2016_BS
#!/bin/sh
#
# Error log path:       /home/sybase/SYB157/ASE-15_0/install/APPS2016_BS.log
# Maximum number of network connections:        25
# Maximum number of server connections: 20
# Multibuf executable path:     /home/sybase/SYB157/ASE-15_0/bin/sybmultbuf
# Backup Server name:   APPS2016_BS
#
/home/sybase/SYB157/ASE-15_0/bin/backupserver \
-e/home/sybase/SYB157/ASE-15_0/install/APPS2016_BS.log \
-N25 \
-C20 \
-M/home/sybase/SYB157/ASE-15_0/bin/sybmultbuf \
-SAPPS2016_BS \
Start the backup server:
startserver -f RUN_APPS2016_BS

First dump of system databases


I forgot to add the backup server:
          
Can't open a connection to site 'SYB_BACKUP'. See the error log file in the ASE boot directory.
Msg 7205, Level 18, State 3:
Server 'APPS2016', Line 1:
Can't open a connection to site 'SYB_BACKUP'. See the error log file in the ASE boot directory.
Msg 3220, Level 17, State 5:
Server 'APPS2016', Line 1:
Could not establish communication with Backup Server 'SYB_BACKUP'.  Please make sure that there is an entry in Sysservers for this server, and that the correct server is running.
1> sp_addserver SYB_BACKUP, NULL, APPS2016_BS
2> go
Adding server 'SYB_BACKUP', physical name 'APPS2016_BS'
Server added.
(return status = 0)


1> sp_helpserver
2> go
 name                 network_name                 security_mechanism                       server_principal                     class          
         status                                                                                                                                                   id   cost
 -------------------- ---------------------------- ---------------------------------------- ------------------------------------ ------------------------
         -------------------------------------------------------------------------------------------------------------------------------------------------------- ---- --------
 APPS2016             APPS2016                     NULL                                     NULL                                 local          
                                                                                                                                                                   0      0
 SYB_BACKUP           APPS2016_BS                  NULL                                     NULL                                 ASEnterprise   
         no timeouts, no net password encryption, writable , enable login redirection                                                                              1   1000


1> dump database master to "/home/sybase/dumps/master.APPS2016.install.dmp"
2>
3> go
WARNING: In order to LOAD the master database, the ASE must run in single-user mode. If the master database dump uses multiple volumes, you must execute sp_volchanged on another ASE at LOAD time in order to signal volume changes.
Backup Server: 4.171.1.1: The current value of 'reserved pages threshold' is 85%.
Backup Server: 4.171.1.2: The current value of 'allocated pages threshold' is 40%.
Backup Server: 4.171.1.5: The current value of 'parallel scan' is 2.
Backup Server session id is: 5. Use this value when executing the 'sp_volchanged' system stored procedure after fulfilling any volume change request from the Backup Server.
Backup Server: 4.41.1.1: Creating new disk file /home/sybase/dumps/master.APPS2016.install.dmp.
Backup Server: 6.28.1.1: Dumpfile name 'master163250D079 ' section number 1 mounted on disk file '/home/sybase/dumps/master.APPS2016.install.dmp'
Backup Server: 4.188.1.1: Database master: 2632 kilobytes (18%) DUMPED.
Backup Server: 4.188.1.1: Database master: 9998 kilobytes (100%) DUMPED.
Backup Server: 3.43.1.1: Dump phase number 1 completed.
Backup Server: 3.43.1.1: Dump phase number 2 completed.
Backup Server: 3.43.1.1: Dump phase number 3 completed.
Backup Server: 4.188.1.1: Database master: 10008 kilobytes (100%) DUMPED.
Backup Server: 3.42.1.1: DUMP is complete (database master).


The other system databases (tempdb not required) were dumped:

dump database model to "/home/sybase/dumps/model.APPS2016.install.dmp"
go

dump database sybsystemprocs to "/home/sybase/dumps/sybsystemprocs.APPS2016.install.dmp"
go

dump database sybsystemdb to "/home/sybase/dumps/sybsystemdb.APPS2016.install.dmp"
go


1> select DBName, BackupStartTime, LastTranLogDumpTime from monOpenDatabases
2> go
Msg 12052, Level 17, State 1:
Server 'APPS2016', Line 1:
Collection of monitoring data for table 'monOpenDatabases' requires that the 'enable monitoring' configuration option(s) be enabled. To set the necessary configuration, contact a user who has the System Administrator (SA) role.
 DBName                                                       BackupStartTime                 LastTranLogDumpTime
 ------------------------------------------------------------ ------------------------------- -------------------------------
 master                                                                   Nov 20 2016  2:49PM                            NULL
 sybsystemdb                                                              Nov 20 2016  2:53PM                            NULL
 model                                                                    Nov 20 2016  2:51PM                            NULL
 tempdb                                                                                  NULL                            NULL
 sybsystemprocs                                                           Nov 20 2016  2:52PM                            NULL

(5 rows affected)


Conclusion


This was an example of creating a new dataserver step by step via a command line to the point of the dump of the system databases.

Post installation tasks would depend on each site and application eg dbccdb set up, sybsecurity set up, sp_configure settings, users and groups set up.


Disclaimer



No liability can be accepted for any loss due to any information found on this page.





Push Symbol. Push Symbol. Door logos



Alastair Cook email:
cookalastair @ btinternet.com

Page created - 20th Nov 2016


Push Pull Door