Sybase 12.5 installation on Turbolinux __linux

Source: Internet
Author: User
Tags set time sybase

Configure Turbo Linux + ASE 12.5 database server

First, Turbo Linux installation process:
Insert Turbo Linux installation into the optical drive, CMOS settings for the CD drive boot, start the computer, type carriage return, enter the default graphics mode installation process for Turbo Linux, and the options are set as follows:
Keyboard: Default
Mouse: Default
Disk partitions: Tfdisk A graphical partition of the disk
Size Partition type
Boot area: 64M Linux ext2
Root zone: 5120M Linux ext3
Dos Extent Partition:
Swap area: 4 512M Swap
Home area: 3072M Linux ext3
Home1 area: 20480M Linux ext3
Home2 Area: Remaining space Linux ext3
Install Lilo: Install location hard drive main boot area
Set up a network: Do not use DHCP dynamic allocation of IP addresses, static settings of the local IP, gateway, broadcast and other information
Set time zone: PRC
Set account: Set root password
Installation Type: All
Configure Monitor: Display mode is 65536 color, resolution is: 1024*768 Window Manager: KDE
Test x configuration, if normal display, press Y to confirm, otherwise press N, choose color and resolution again
Until the window can be displayed normally.
Confirm settings: Verify that your settings are correct and that the process cannot be halted once the installation is started.
Set Security Level: Intermediate
Complete the installation.

Ii. the installation process of ASE 12.5:
1: Type startx into the KDE window manager, insert the Sybase installation disk, and copy the compressed files from the disk into a directory.
Executive: Tar zxvf ebf10431.tgz
CD Ebf10431/rpms
Rpm–hiv sybase-common*
Rpm–hiv sybase-ase*
Rpm–hiv sybase-chinese*
2:chown sybase/home*
Chgrp sybase/home*
chmod +777/opt/sybase-12.5/locales/locales.dat
3:xhost +
Su–sybase
Cd/home
mkdir Sybase
Export display=ip:0.0 IP To install the IP address of the machine
Asecfg into the graphical Sybase configuration interface:
4: Configure Sybase
Select Configure a news server
A) Change the name of adaptive Server to Sybase (uppercase)
Backup Server's name changes this sybase_backup
Master Device Path:/home/sybase/master.dat
Master Database size:20
Sybsystemprocs Device Path:/home/sybase/sysprocs.dat
Error Log path:/home/sybase/sybase.log
Host Name:ip
Port number:770*
B Select Edit adanced Adaptive server attibutes into server Attribute Editor:
Sybase:
Configuration file path:/home/sybase/sybase.cfg
Sybase_backup
Error Log path:/home/sybase/sybase_backup.log
Host Name:ip Port number:770* (note cannot repeat with Sybase's port number)
Select Buile Server
c After the system library is created, set the language to Chinese in the localization server and the character set (charset) as code Page 850
The collation is binary ordering, for using with Code page 850, Backup server does not have to set localization.

Third, the ASE12.5 parameter configuration.
Take 2G memory as an example:
1, modify the Linux shared memory parameters:
Where nnn is the actual memory of the system (in bytes nnn=2147483647)
Modify file:/etc/rc.local join a line:
echo nnn >/proc/sys/kernel/shmmax
Effective after startup
2, Isql–usa
A) Configuring memory
sp_configure ' max memory ', MMM (unit 2K mmm=786432)
Go
sp_configure ' allocate max shared mem ', 1
Go
The above command configures Sybase's use of mmm*2k memory, which is typically configured as 60-70% for system memory, which takes effect again. If Sybase does not start properly, adjust the sybase.cfg file to reduce the max memory parameter.
b After the above parameters are in effect, configure data cache and procedure cache:
Sp_cacheconfig ' default data cache ', ' XXXM ' (xxx=768)
Go
Typically configured to 50% of Max memory, in M, to be active
sp_configure ' procedure cache size ', XXX (xxx=157286)
Go
Typically configured to 20% of Max memory, in 2K
sp_configure ' allocate max shared mem ', 0
Go
c) Number of devices, open databases (a), number of locks (20000),
Number of user connections, and the open objects (5000) parameter adjusts the parameters in the Sinopec account set.
d) Adjust bcp configuration
1. Adjust the extended distribution
sp_configure ' number of pre-allocated extent ', 20
Go
2. Configuring the I/O buffer pool
Sp_poolconfig ' default data cache ', ' 256M ', ' 16K '
(e) Adjust the number of indexes changed
sp_configure ' number of open indexes ', 4000

Iv. Configuring Telnet Service:
1, change/etc/xinetd.d/telnet file:
Change the Disable option to No
Modify/etc/hosts.allow file, add one line all:ip.*.*
2, open root login, modify/etc/pam.d/login file, the second line plus # comment
3. Start Telnet Service
Cd/etc/rc.d/init.d
./xinetd Start
Use NETSTAT–TL to see if the service is activated

V. Start the FTP service:
Cd/usr/sbin
./proftpd Restart

Vi. How to modify the name of the local backup server
1, modify the interfaces file, replace the name of the backup server with a new name
2, enter the isql tool
sp_configure ' allow updates ', 1
Update sysservers set where
sp_configure ' Allow updatses ', 0

Vii. How to implement Sybase remote backup (connect to the remote backup Server service via the local backup Servre service, and back up the remote database to the remote machine). )
On the local machine:
1, modify the interfaces file, add the remote machine Backup server's entry (Backup server name, address, port number)
2. Add remote backup server name in sysservers system table
1>sp_addserver remote_backup_server_name, NULL
2>go
3, use sp_helpserver to view at least the following 3 entries:
--Local ASE name
--Local backup server name
--Remote backup server name
4, on the local machine to achieve remote backup:
1>dump database database_name to "remote_machine_path/..." at Remote_backupserver_name
2> Go
To restore a backup on the local machine:
1>load database database_name from "remote_machine_path/..." at Remote_backupserver_name
2> Go
Note: 1, if you want to achieve remote two-way backup, please do the same configuration as the local machine on the remote machine.
2. Local backup server name requirements are not the same as remote backup server names

Viii. How to implement a backup of Sybase remote database to local
1, modify the interfaces file, add a new entry, the purpose is through this entry to the remote machine server (name, remote server IP address, Remote Server service port number)
2. Configure a new backup server via Asecfg, and in related SERVER name, select the name of the entry that you just added in the interfaces file.
3. Add local new backup server name in sysservers system table
1>sp_addserver newbackup_server_name, NULL
2>go
4, on the local machine to achieve remote backup:
1>dump database Remote_database_name to "local_machine_path/..." at Newbackupserver_name
2> Go
To restore a backup on the local machine:
1>load database Remote_database_name from "local_machine_path/..." at Newbackupserver_name
2> Go
5, start the new Backup Server service
Startserver–f Run_newbackupname_back
Turn off services
1> shutdown Newbackup_server_name
2> Go

Ix. How to back up a database with a data volume greater than 2G
1> dump Database pubs2 to "/PATH/PUBS2_DUMP.1"
2> stripe on "/PATH/PUBS2_DUMP.2"
3> stripe on "/PATH/PUBS2_DUMP.3"
4> Go
This method can also improve the backup and recovery speed, but note that recovery must also use a corresponding number of devices. For example:
1>load database pubs2 from "/PATH/PUBS2_DUMP.1"
2>stripe on "/PATH/PUBS2_DUMP.2"
3>stripe on "/PATH/PUBS2_DUMP.3"
4>go

Ten, commonly used commands
1, check the version of Linux:
Uname–a

2. How to use the newly added hard disk under Linux
Linux defines an IDE hard disk in the following form
/dev/hd[drive][partition]
Each IDE drive is marked with a start from letter a. So the primary (master) hard drive on the first chain is a, from the (slave) hard disk to B, the primary hard disk on the second chain is C, and so on, and the partitions on each hard disk are identified by numbers. Each SCSI hard drive is identified in the same way, just replace/DEV/HD with/DEV/SD
Partition the hard disk with Fdisk Fdisk/dev/fdb (/DEV/SDB)
Create the appropriate file system on the partition MKE3FS/DEV/HDB1 (/DEV/SDB1)
Mount the appropriate partition to the specified directory MOUNT/DEV/HDB1 (DEV/SDB1) directory
Modify the/etc/fstab table and add the appropriate partitions to automatically load the appropriate file system when the system starts.

3, the DD command syntax for Linux
DD If=/home1/cwbase1.dat Of=/home2/cw.dat

4. RPM Command Usage
Rpm–uiv sybase-common*--nodeps–force
(--relocate the installation directory--nodeps Non-association –force enforced)

5, check the Sybase version:
SELECT @ @version

6, modify the dynamic properties of the device
Sp_deviceattr devicename, ' Dsync ', false

7, Copy empty table structure:
SELECT * Into Newtablename where 1=2

8. BCP operation
BCP Cwbase1.dbo.ASHSJE out ashsje.bcp–c–usa–p [–S (Connectname)]
BCP Cwbase1.dbo.ASHSJE in ashsje.bcp–c [–F (start line)] [–L (abort line)]–usa–p [–S (Connectname)]

9, start the backup service and close the corresponding services
Starterver–f Run_sybase_backup
Shutdown Syb_backup

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.