SYBASE 工作
2007-01-04 15:26
162 查看
38201377-226
初始化一个数据设备和一个日志设备:
disk init
name="labor_data",
physname="/sybase/data/labor_data",
vdevno=5,
size=2560000
disk init
name="labor_log",
physname="/sybase/data/labor_log",
vdevno=6,
size=512000
create database labor
on labor_data=3
log on labor_log=4
alter database labor
on labor_data=2200
log on labor_log=880
/*用时1个半小时*/
alter database labor
on labor_data=2200
log on labor_log=400
load database labor from "/export/home/2004-01-06"
/*用时30分钟*/
dump database labor to "/export/home/2004-01-06"
dump transaction labor with no_log
online database nanhai
/*远程备份*/
修改interfaces文件增加远程备份服务
zqsbe5s_back 用IP
sp_addserver zqsbe5s_back,null 增加远程备份服务
sp_helpserver 查看服务
dump database e5s to "/sybtest/16dfdef" at zqsbe5s_back
load database e5s from "/sybtest/16dfdef" at zqsbe5s_back
Server Message: Number 5005, Severity 10
Line 1:
Extending database by 1792000 pages on disk labor_data
Server Message: Number 5005, Severity 10
Line 1:
Extending database by 460800 pages on disk labor_log
Server Message: Number 5038, Severity 10
Line 1:
Warning: Using ALTER DATABASE to extend the log segment
will cause user thresholds on the log segment within 128
pages of the last chance threshold to be disabled.
执行创建命名高速缓存
sp_cacheconfig “tempdb_cache”,”10m”,”mixed”
信息如下:
Server Message: Number 18155, Severity 16
Procedure 'sp_cacheconfig', Line 634:
The cache type can be either 'logonly' or 'mixed' only. Replacement policy can be either 'strict' or 'relaxed' only.
Server Message: Number 18177, Severity 16
Procedure 'sp_cacheconfig', Line 635:
Usage: sp_cacheconfig [ cachename [, 'cache_size[K|P|M|G]' ] [, logonly | mixed ] [, strict | relaxed] [, cache_partition = [1|2|4|8|16|32|64]]]
(return status = 1)
开机自动启动sybase:
su root
cd /etc/rc2.d
vi S99startsybase
su - sybase -c "/usr/sybase/install/startserver -f /usr/sybase/RUN_SERVERNAME 1>/dev/null 2>/dev/null"
su - sybase -c "/usr/sybase/install/startserver -f /usr/sybase/RUN_BACKUPSERVERNAME 1>/dev/null 2>/dev/null"
:qw
sp_lock:显示对象的被锁类型及上锁的进程。如果锁住的状态过长,则杀掉上锁的进程,
kill spid(SA角色)
监视目标占用空间情况
使用系统过程:sp_spaceused
说明:该过程显示行数、数据页数以及当前数据库中由某个目标或所有目标所占用的空间。如下表是某数据库日志表的信息:
四、保证系统数据安全,周期更改用户口令;
为保证系统数据的安全,系统管理员必须依据系统的实际情况,执行一系列的安全保障措施。其中,周期性的更改用户口令是比较常用且十分有效的措施。
更改用户口令是通过调用系统过程sp_password 来实现的。Sp_password 的语法为:
sp_password caller_password,new_password [,loginame]
其中caller_password 是登录口令(老口令),new_password是新口令,loginame是登录名称。
load database labor from "c:/dumpdata20040326"
初始化一个数据设备和一个日志设备:
disk init
name="labor_data",
physname="/sybase/data/labor_data",
vdevno=5,
size=2560000
disk init
name="labor_log",
physname="/sybase/data/labor_log",
vdevno=6,
size=512000
create database labor
on labor_data=3
log on labor_log=4
alter database labor
on labor_data=2200
log on labor_log=880
/*用时1个半小时*/
alter database labor
on labor_data=2200
log on labor_log=400
load database labor from "/export/home/2004-01-06"
/*用时30分钟*/
dump database labor to "/export/home/2004-01-06"
dump transaction labor with no_log
online database nanhai
/*远程备份*/
修改interfaces文件增加远程备份服务
zqsbe5s_back 用IP
sp_addserver zqsbe5s_back,null 增加远程备份服务
sp_helpserver 查看服务
dump database e5s to "/sybtest/16dfdef" at zqsbe5s_back
load database e5s from "/sybtest/16dfdef" at zqsbe5s_back
Server Message: Number 5005, Severity 10
Line 1:
Extending database by 1792000 pages on disk labor_data
Server Message: Number 5005, Severity 10
Line 1:
Extending database by 460800 pages on disk labor_log
Server Message: Number 5038, Severity 10
Line 1:
Warning: Using ALTER DATABASE to extend the log segment
will cause user thresholds on the log segment within 128
pages of the last chance threshold to be disabled.
执行创建命名高速缓存
sp_cacheconfig “tempdb_cache”,”10m”,”mixed”
信息如下:
Server Message: Number 18155, Severity 16
Procedure 'sp_cacheconfig', Line 634:
The cache type can be either 'logonly' or 'mixed' only. Replacement policy can be either 'strict' or 'relaxed' only.
Server Message: Number 18177, Severity 16
Procedure 'sp_cacheconfig', Line 635:
Usage: sp_cacheconfig [ cachename [, 'cache_size[K|P|M|G]' ] [, logonly | mixed ] [, strict | relaxed] [, cache_partition = [1|2|4|8|16|32|64]]]
(return status = 1)
开机自动启动sybase:
su root
cd /etc/rc2.d
vi S99startsybase
su - sybase -c "/usr/sybase/install/startserver -f /usr/sybase/RUN_SERVERNAME 1>/dev/null 2>/dev/null"
su - sybase -c "/usr/sybase/install/startserver -f /usr/sybase/RUN_BACKUPSERVERNAME 1>/dev/null 2>/dev/null"
:qw
sp_lock:显示对象的被锁类型及上锁的进程。如果锁住的状态过长,则杀掉上锁的进程,
kill spid(SA角色)
监视目标占用空间情况
使用系统过程:sp_spaceused
说明:该过程显示行数、数据页数以及当前数据库中由某个目标或所有目标所占用的空间。如下表是某数据库日志表的信息:
四、保证系统数据安全,周期更改用户口令;
为保证系统数据的安全,系统管理员必须依据系统的实际情况,执行一系列的安全保障措施。其中,周期性的更改用户口令是比较常用且十分有效的措施。
更改用户口令是通过调用系统过程sp_password 来实现的。Sp_password 的语法为:
sp_password caller_password,new_password [,loginame]
其中caller_password 是登录口令(老口令),new_password是新口令,loginame是登录名称。
load database labor from "c:/dumpdata20040326"
相关文章推荐
- PB打开任意一个数据窗时,提示“sybase powerbuilder已停止工作”解决方法
- 【PB】打开任意一个数据窗时,提示“sybase powerbuilder已停止工作”解决方法
- win8.1系统中Sybase PowerBuilder已停止工作的有效解决办法
- Sybase安装后的配置工作
- 2015年工作总结
- Struts2学习笔记一:工作流程与核心文件
- Linux主机被***后的工作
- 转载“完全用Linux工作――清华大学退学博士王垠作品 ”
- 2012-半年工作总结
- 测试工作管理流程
- Eclipse Ctrl+Space 无法工作的问题
- 医院HIS系统运维工作见闻
- 她是你学习工作的好伴侣!
- 这段时间的工作与生活
- 想去谷歌工作? 5个面试问题据说难倒天才!
- C#中得到程序当前工作目录和执行目录的五种方法
- [工作中的设计模式]模板模式
- Android NFC近场通信02----读写卡的准备工作
- 怎樣把Excel檔中的工作表內容存入數據庫
- SystemParametersInfo ( SPI_GETNONCLIENTMETRICS...)在VC 2008 里不能正常工作