sqlserver中批量修改对象所有者
以超级管理员登录系统,然后执行以下脚本就可以批量修改对象所有者。
sp_configure 'allow updates','1'
go
reconfigure with override
go
update sysobjects set uid=1 where uid<>1
go
sp_configure 'allow updates','0'
go
reconfigure with override
相关文档:
sqlite官方站
http://www.sqlite.org/
SQL Syntax
http://www.sqlite.org/lang.html
sqlite中文站
http://www.sqlite.com.cn/
http://www.sqlitechina.org/
建立数据库档案
用sqlite3建立数据库的方法很简单,只要在shell下键入(以下$符号为shell提示号,请勿键入):
$ sqlite3 foo.db
如果目录下没有fo ......
<Language from="SQL" To="C#">
<Type from="bigint" To="long" />
<Type from="binary" To="object" />
<Type from="bit" To="bool" />
<Type from="char" To="string" />
<Type from="datetime" To="DateTime" ......
sqlserver 中 全局变量 是一种特殊类型的变量,全局变量以@@开头,是由系统定义的。
@@CONNECTIONS 返回
SQL Server
自上次启动以来尝试的连接数。
@@CURSOR_ROWS
确定当其被调用时检索了游标符合条件的行数。
@@DATEFIRST
针对会话返回
S ......
use tempdb
go
if (object_id ('t1' ) is not null ) drop table t1
if (object_id ('t2' ) is not null ) drop table t2
go
create table t1 (a int )
insert into t1 select 1 union select 2 union select 3
create table t2 (a int )
insert into t2 select 3 union select 4 union select 5
go
sele ......
以前经常遇到数据库日志文件损坏,或者丢失的情况,今天将解决方案写下来,以后别人再问起就给他个链接,多方便啊.
呵呵:
1.新建一个同名的数据库
2.再停掉sql server(注意不要分离数据库)
3.用要附加的数据文件覆盖掉这个新建的数据库
4.再重启sql server
5.此时打开企业管理器时会出现置疑,先不管,执行下面的语句(注 ......