SQL Server日志文件太大的解决方法
清空日志
1.打开查询分析器,输入命令
DUMP TRANSACTION 数据库名 WITH NO_LOG
2.再打开企业管理器--右键你要压缩的数据库--所有任务--收缩数据库--收缩文件--选择日志文件--在收缩方式里选择收缩至XXM,这里会给出一个允许收缩到的最小M数,直接输入这个数,确定就可以了。
相关文档:
第一种用法:
SELECT (CASE type WHEN 'u' THEN '用户表' WHEN 's' THEN '系统表' ELSE '其他' END) AS TABLEKIND,* from SYSOBJECTS
第二中用法:
SELECT (CASE WHEN crdate<'2006-01-01' THEN 'early' WHEN crdate<'2009-01-01' THEN 'nearly' ELSE 'now' END) AS PERIOD,* from SYSOBJECTS ......
Questions
I have a simple app that
uses an SQL Express 2005 database. When the user closes the app, I want
to give the option to back up the database by making a copy in another
directory. However, when I try to do it, I get "The process cannot
access the file '...\Pricing.MDF' because i ......
参考文献:http://www.cnblogs.com/chenxizhang/archive/2009/04/23/1441913.html
SQL Server提供四种方式连接数据库服务器:
1. share memory: 只适用于客户端和服务器端在同一台机器上,才能采用的连接
2. Named pipe:
在局域网(LAN)内实现连接,一个进程使用一部分的内存来向进程的另一端传递消息,一个进程的输出是另外 ......
//按自然周统计
select to_char(date,'iw'),sum()
from
where
group by to_char(date,'iw')
//按自然月统计
select to_char(date,'mm'),sum()
from
where
group by to_char(date,'mm')
//按季统计
select to_char(date,'q'),sum()
fr ......
一般使用SQL Server的集成认证时,都需要登陆进域,下面介绍一种不需要登陆域就可以使用域用户登陆SQL Server的方法。
SQL Server Management Studio 2005和2008的快捷方式如下图:
SQL Server 2008 x64: "C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\Ssms.exe"
SQL ......