重新设定sql server数据库的硬盘备份地址
写了一个小程序,使用了sql server 2005数据库,当时该数据库放到了C:\Program Files\Microsoft SQL Server\MSSQL.4\MSSQL\Data下面,但是现在觉得不方便,想把它转移到我这个网站代码所在的那个目录,比如d:\network\app_data下面,请问怎么转过去,谢谢?
还有一个问题,就是我看C:\Program Files\Microsoft SQL Server\MSSQL.4\MSSQL\Data下面的那个数据库mdf文件的修改时间还是9.24日,怎么回事,我最近一直在用这个数据库添加数据,按照道理,这个最新修改时间应该是10.10日才对,请问怎么能让这个数据变成最新的数据,谢谢。
先选定操作数据库,右键-分离
然后拷贝去指定文件夹
然后再附加就可以了
试一下重启一下数据库,mdf时间应该会改变的
相关文档:
测试人员要掌握的基本的SQL语句(上)
  ......
1.多where,少having
where用来过滤行,having用来过滤组
2.多union all,少union
union删除了重复的行,因此花费了一些时间
3.多Exists,少in
Exists只检查存在性,性能比in强很多,有些朋友不会用Exists,就举个例子
例,想要得到有电话号码的人的基本信息,table2有冗余信息
select * from table1;--(id,n ......
You can user PL SQL Developer in Ubuntu like in Windows:
1.download PL/SQL Developer for linux;
2.Install JDK berfore the next;
3.install the PL/SQL Developer;
4.goto the $PL/SQL Developer,run sh sqldeverloper.sh;
5.type the $JDK;
6.then the PL/SQL Developer will startup. ......
1 ---上个月月初第一天
2 select CONVERT(varchar(12) , DATEADD(mm,DATEDIFF(mm,0,dateadd(mm,-1,getdate())),0), 112 )
3
4 ---上个月月末最后一天
5 select CONVERT(varchar(12),dateadd(ms,-3,DATEADD(mm,DATEDIFF(m,0,getdate()),0)), 112 )
6
7 ......
比如现在有一人员表 (表名:peosons)
若想将姓名、身份证号、住址这三个字段完全相同的记录查询出来
select p1.* from persons p1,persons p2 where p1.id<>p2.id and p1.cardid &nbs ......