自来云

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
上一页 1 ··· 6 7 8 9 10 11 12 13 下一页

2018年5月28日

摘要: Win 7 win xp系统中SQL2008安装注意事项一:SQL2008 镜像下载地址 http://download.microsoft.com/download/4/C/4/4C402E48-0223-4D3B-8574-2C259500D2E4/SQLFULL_X86_CHS.EXE二:VS 阅读全文
posted @ 2018-05-28 20:45 自来云 阅读(2126) 评论(0) 推荐(0) 编辑

摘要: 一、SQL Profiler工具简介 SQL Profiler是一个图形界面和一组系统存储过程,其作用如下: 1.图形化监视SQL Server查询; 2.在后台收集查询信息; 3.分析性能; 4.诊断像死锁之类的问题; 5.调试T-SQL语句; 6.模拟重放SQL Server活动; 也可以使用S 阅读全文
posted @ 2018-05-28 14:41 自来云 阅读(552) 评论(0) 推荐(0) 编辑

摘要: --异地数据库备份作业语句 --显示高级选项(仅需执行一次) EXEC sp_configure 'show advanced options', 1 GO RECONFIGURE WITH OVERRIDE; GO --允许执行xp_cmdshell EXEC sp_configure 'xp_cmdshell', 1 GO RECONFIGURE WITH OVERRIDE... 阅读全文
posted @ 2018-05-28 14:36 自来云 阅读(226) 评论(0) 推荐(0) 编辑

2018年5月27日

摘要: SQL2005清空删除日志: sqlserver2000压缩日志 可以将jb51.ldf文件变得很小,方便备份数据库等,在sqlserver查询分析器中执行即可。 阅读全文
posted @ 2018-05-27 21:25 自来云 阅读(117) 评论(0) 推荐(0) 编辑

摘要: /*如果某进程将其他堵塞超过55秒,则自动将其清除,并将其执行的语句报错出来。可将语句建成作业,每分钟执行一次。但有风险,不可作为常规用法,只能在短期内作为捕捉问题的工具,在有跟踪的情况下使用*/ declare @sql nvarchar(4000),@spid int select top 1 @spid = spid from master..sysprocesses a where b... 阅读全文
posted @ 2018-05-27 21:23 自来云 阅读(166) 评论(0) 推荐(0) 编辑

摘要: --前提是硬盘没问题.如果硬盘本来就有问题.次方法可能无效 --1.停止sql 服务,获取数据库路径,删掉日志文件 use master go select name,reverse(substring(reverse(filename),charindex('\',reverse(filename)),1000)) from sysdatabases --2.启动sql 服务 us... 阅读全文
posted @ 2018-05-27 21:21 自来云 阅读(248) 评论(0) 推荐(0) 编辑

摘要: 新建表: create table [表名] ( [自动编号字段] int IDENTITY (1,1) PRIMARY KEY , [字段1] nVarChar(50) default '默认值' null , [字段2] ntext null , [字段3] datetime, [字段4] money null , [字段5] int default 0, [字段6] Decimal (12... 阅读全文
posted @ 2018-05-27 21:19 自来云 阅读(305) 评论(0) 推荐(0) 编辑

摘要: sql 取整数去小数点 update cn_product set productprice2=ROUND(productprice1*3.3,0,1) where productclassid='2' Sql截取浮点小数位数,不四舍五入 round(551.239567,2,0) 结果:551.24 round(551.239567,2,1) 结果:551.23 第一个2表示截取2位 第... 阅读全文
posted @ 2018-05-27 21:18 自来云 阅读(31389) 评论(0) 推荐(0) 编辑

摘要: IF OBJECT_ID('DBO.GET_NUMBER2') IS NOT NULL DROP FUNCTION DBO.GET_NUMBER2 GO CREATE FUNCTION DBO.GET_NUMBER2(@S VARCHAR(100)) RETURNS VARCHAR(100) AS BEGIN WHILE PATINDEX('%[^0-9]%',@S) > 0 BEGIN set... 阅读全文
posted @ 2018-05-27 21:17 自来云 阅读(1542) 评论(0) 推荐(0) 编辑

摘要: --查看所有表的大小 declare @id int declare @type character(2) declare @pages int declare @dbname sysname declare @dbsize dec(15,0) declare @bytesperpage dec(15,0) declare @pagesperMB dec(15,0) ... 阅读全文
posted @ 2018-05-27 21:16 自来云 阅读(288) 评论(0) 推荐(0) 编辑

上一页 1 ··· 6 7 8 9 10 11 12 13 下一页