摘要: 首先查看装数据库的服务器内存是多少 查看数据库当前设置的参数数值 --查询数据库当前总内存 sp_configure 'max memory' go --查询数据库当前过程缓存 sp_configure 'procedure cache' GO --查询数据库当前高速缓存数值 sp_cachecon 阅读全文
posted @ 2022-01-11 16:03 一只竹节虫 阅读(428) 评论(0) 推荐(0) 编辑
摘要: 查询 sp_configure 'default char' go SELECT id,name FROM syscharsets WHERE id IN (1,171,173,190) go 查看当前数据库服务名 SELECT @@servername 打开Dos窗口 切换到对应的文件夹路径 以把 阅读全文
posted @ 2022-01-11 16:02 一只竹节虫 阅读(656) 评论(0) 推荐(0) 编辑
摘要: --建主键 DECLARE @pk_name VARCHAR(80)BEGIN select @pk_name=a.name from sysindexes aINNER JOIN sysobjects b ON a.id=b.idWHERE a.status&2048=2048and b.name 阅读全文
posted @ 2022-01-11 15:57 一只竹节虫 阅读(139) 评论(0) 推荐(0) 编辑
摘要: select d.name,a.name as 字段名, upper(b.name) as 字段类型, a.length as 长度, upper((case when a.status =8 then 'null' else 'not null' end)) as 是否为空FROM syscolu 阅读全文
posted @ 2022-01-11 15:55 一只竹节虫 阅读(1029) 评论(0) 推荐(0) 编辑
摘要: sp_dboption hh_report, single, truegouse hh_reportgocheckpointgosp_renamedb hh_report, lc_reportgouse mastergosp_dboption lc_report, single, falsegous 阅读全文
posted @ 2022-01-11 15:53 一只竹节虫 阅读(89) 评论(0) 推荐(0) 编辑
摘要: USE master gosp_configure "default character set id",171gosp_configure 'number of user connections',25gosp_configure 'max mem', 0,'8G' gosp_cacheconfi 阅读全文
posted @ 2022-01-11 15:50 一只竹节虫 阅读(154) 评论(0) 推荐(0) 编辑
摘要: select top 10 * from userinfo1 noholdlock where rq <'2021/10/10' sp_configure“print deadlock information”,1 ##不用重启服务即可生效打开这个选项,当发送死锁时,信息会记录在数据库运行日志中 对 阅读全文
posted @ 2022-01-11 15:39 一只竹节虫 阅读(285) 评论(0) 推荐(0) 编辑
摘要: 只有在索引出现损坏的情况下才需要重建索引。正常没有重建索引的建议 对索引的日常维护:1,对于行锁表,如果有频繁的增删改,需要定期回收垃圾空间。(reorg)2,定期做统计信息更新。(update statistics ) 建立索引时会生成一个索引键值的统计分布图,执行计划就是根据分布图来估算给定索引 阅读全文
posted @ 2022-01-11 15:37 一只竹节虫 阅读(155) 评论(0) 推荐(0) 编辑
摘要: 如果设置日志自动清除 则只需进行定期全量备份 不能增量备份 sp_dboption HFTEST,"trunc log on chkpt",true --如果设置数据库不清除日志sp_dboption HFTEST,"trunc log on chkpt",false 如果只有全备,恢复就是恢复到全 阅读全文
posted @ 2022-01-11 15:35 一只竹节虫 阅读(625) 评论(0) 推荐(0) 编辑
摘要: 同一个数据库服务,不同的库,用insert ... select如果是不同的数据库服务,将sql对应的查询结果定义为view(视图),然后bcp out, bcp in 使用前在ini(windows) interface(unix)上先增加一个服务名 bcp是一个客户端应用 bcp dbname. 阅读全文
posted @ 2022-01-11 15:29 一只竹节虫 阅读(262) 评论(0) 推荐(0) 编辑
摘要: 申请license之后1,将license文件放置在$SYBASE/SYSAM-2_0/license目录下。2,修改$SYBASE/ASE-15_0/sysam/$SERVERNAME.properties文件,增加PE=EELT=AR 提供机器码给厂家生产系统根据合同生成license测试系统通 阅读全文
posted @ 2022-01-11 15:24 一只竹节虫 阅读(424) 评论(0) 推荐(0) 编辑
摘要: [ASE Error SQL1204]ASE has run out of LOCKS. Re-run yourcommand when there are fewer active users, or contact a userwith System Administrator (SA) rol 阅读全文
posted @ 2022-01-11 15:22 一只竹节虫 阅读(409) 评论(0) 推荐(0) 编辑
摘要: dump database to 'xxxx' load database from 'xxxx' 注意:备份出来的dmp文件实际数据大小,但还原时所需的设备大小是等于源库日志设备+数据设备之和的 database in useload database的时候,不能有用户在被load的库中sp_wh 阅读全文
posted @ 2022-01-11 15:20 一只竹节虫 阅读(135) 评论(0) 推荐(0) 编辑
摘要: 按照增量备份的逻辑,1,数据库设置了自动清除日志,则不能做增量备份。2,(关闭自动清除日志)手工清除日志后,需要一个新的全库备份后,才能开始新的增量备份。 数据库日志快满时,系统会触发一次last chance threshold,这个时候,会自动执行sp_thresholdaction存储过程。s 阅读全文
posted @ 2022-01-11 15:16 一只竹节虫 阅读(85) 评论(0) 推荐(0) 编辑