Professional Documents
Culture Documents
html
Sybase : Administration
Sybase : Administration
Sybase : Administration
Sybase : Administration
Sybase : Administration
Sybase : Administration
logins
Sybase : Administration
Sybase : Administration
Sybase : Administration
Settings
Sybase : Administration
Sybase : Administration
Sybase : Administration
Sybase : Administration
Sybase : Administration
Sybase : Administration
Disk Space
Sybase : Administration
Sybase : Administration
objects
Sybase : Administration
sysprotects
Sybase : Administration
login
Sybase : Administration
Remote Server
Sybase : Administration
device
Sybase : Administration
Sybase : Administration
Transaction Log Marker
Sybase : Administration
Sybase : Administration
Sybase : Administration
Sybase : Administration
Sybase : Administration
bit ASE
:
:
:
:
:
:
A backup routine
Adding a segment to a database
Apply a transaction dump
Apply multiple transaction dumps
Configuring the cache
Create proxy tables and external
: DBCC Notes
: Database Creation
: Database Engines: Status and
:
:
:
:
:
:
Renaming a database
Reorg: rebuilding a table
Replication Server 15 Configuration
Security Tasks
Server Configuration: example for 64
allocate1.2gbtosybase(asignar1,2gbdesybase)
sp_configure'maxmemory',600000
go
allocateatsybaseboottime(asignarenelarranque
sybase)
sp_configure'locksharedmemory',1
go
additionaldatacache(cachdedatosadicional)
sp_cacheconfig'defaultdatacache','600M'
go
additionalprocedurecache(cachdeprocedimientos
adicionales)
sp_cacheconfig'procedurecache','50M'
go
cachefortempdb(cacheparatempdb)
sp_cacheconfig'cache01','80M'
go
Additionalconfig,forserverw/severalCPUs
Configadicional,paraelservidorw/variasCPUs
sp_configure"numberofuserconnections",500
go
sp_configure"numberofworkerprocesses",100
go
sp_configure"maxparalleldegree",3
go
sp_configure"maxscanparalleldegree",3
go
sp_configure"globalcachepartitionnumber",2
go
sp_configure"numberoflocks",50000
go
sp_configure"numberofopenobjects",50000
go
sp_configure"numberofopendatabases",32
go
sp_configure"numberofdevices",50
go
/*rebootASE*/
Additionalconfig,forsystemusingtext/blobdata
sp_configure'additionalnetworkmemory',4096
go
sp_configure'maxnetworkpacketsize',2048
go
sp_configure'defaultnetworkpacketsize',1024
go
sp_configure'heapmemoryperuser',4096
go
/*
UNIXSybase>=11.9,allowdevicebufferinginO/S;
improvesperformance
increaseschanceofdevicecorruptionduringfailure
*/
sp_deviceattr"device21","dsync","false"
go
/*LINUX:mayneedtosetsharedmemory*/
echo134217728>/proc/sys/kernel/shmmax
echo999999999>/proc/sys/kernel/shmmax
Extend tempdb:
size should be about 20% of the main production database's size.
Extender tempdb:
Tamao debe ser aproximadamente 20% del tamao de la base de
datos de produccin principal.
/*configuretempdbto20mb...thiscommandaddsan
additional
18megtothe2mbalreadypresentonthemasterdevice*/
1>alterdatabasetempdbondevice26=18
2>go
/*Addlocalservername*/
sp_addserversnoopy,local
go
Device initialization
/*createa2gigdevice*/
1>diskinitname='device19',
2>physname='/dev/md/rdsk/d19',
3>vdevno=6,
4>size=1024000
5>go
Database Creation
/*createa1gigdatabase,witha50mbtransactionlog
*/
/*forloadclauseallowsquickcreationwhendumpis
available*/
1>createdatabase
2>dbname
3>ondevice18=1000
4>logondevice8=50
5>forload
6>go
CREATEDATABASE:allocating512000pagesondisk
'device18'
CREATEDATABASE:allocating25600pagesondisk
'device8'
/*changethedatabaseowner*/
usedbname
go
1>sp_changedbowner'jmith'
2>go
/*setupautomaticlogtruncate,fordevelopmentmode
*/
usemaster
go
sp_dboption'dbname','trunclogonchkpt',true
go
A backup routine
usemaster
go
sp_dboptiondbname,"singleuser",true
go
usedbname
go
checkpoint
go
dbcccheckdb(dname,skip_ncindex)
go
dbcccheckcatalog
go
dbcccheckalloc
go
usemaster
go
sp_dboptiondbname,"singleuser",false
go
usedbname
go
checkpoint
go
dumptrandbnametodevice1
go
dumpdatabasedbnametodevice1
go
Striping Dump Devices (Reparticin de dispositivos de
volcado)
Sybase (prior to version 12) has a 2 GB dump file size
limitation for most platforms. Getting around this is easy simply stripe the dumps across multiple files or devices. The
examples below use file names instead of device names.
Sybase (anterior a la versin 12) tiene un volcado de 2 GB
archivo de limitacin de tamao para la mayora de las
plataformas. Moverse es fcil - simplemente raya los
vertederos en varios archivos o dispositivos. Los ejemplos
siguientes utilizan nombres de archivos en lugar de nombres
de dispositivos.
dumpdatabasehr_dbto
'/usr2/dumps/remote/db_hr05121318.dmp'
stripeon'/usr2/dumps/remote/db_hr_S1_05121318.dmp'
stripeon'/usr2/dumps/remote/db_hr_S2_05121318.dmp'
go
loaddatabasehr_dbfrom
'/usr2/dumps/remote/db_hr05121318.dmp'
stripeon'/usr2/dumps/remote/db_hr_S1_05121318.dmp'
stripeon'/usr2/dumps/remote/db_hr_S2_05121318.dmp'
go
onlinedatabasehr_db
go
Moving the transaction log to another device
1>alterdatabasedbnamelogondevice19=10
1>sp_logdevicedbname,device19
Thelastchancethresholdfordatabasedbnameisnow
1232pages.
...sqlinserts,tofilloldlogsegment...
1>dumptrandbnamewithtruncate_only
1>sp_helplogdbname
2>go
Indatabase'dbname',thelogstartsondevice
'device19'.
(returnstatus=0)
1>
Adding a segment to a database
1>usedbname
2>go
1>sp_addsegment'idx_seg1','dbname','device18'
2>go
DBCCexecutioncompleted.IfDBCCprintederror
messages,contactauserwith
SystemAdministrator(SA)role.
Segmentcreated.
1>usedbname
2>go
1>sp_dropsegment'system','dbname','device18'
2>go
DBCCexecutioncompleted.IfDBCCprintederror
messages,contactauserwith
SystemAdministrator(SA)role.
Segmentreferencetodevicedropped.
(returnstatus=0)
1>sp_dropsegment'default','dbname','device18'
2>go
DBCCexecutioncompleted.IfDBCCprintederror
messages,contactauserwith
SystemAdministrator(SA)role.
Segmentreferencetodevicedropped.
(returnstatus=0)
Configuring the cache
Important: for ASE 12.5, the default data cache MUST be
configured !
usemaster
go
sp_cacheconfig'cache01','4M'
go
Entry in config file looks like this:
[NamedCache:dev_cache1]
cachesize=4M
cachestatus=mixedcache
Next, database objects need to be bound to the cache
usedev_main_db
go
sp_bindcache'dev_cache01','dev_main_db','customer'
go
sp_helpcache
go
/*seesamplepostinstallconfigaboveformore
examples*/