查不到的select loginname,updatedate from syslogins 查出来的没什么意义
创建时间可以查到,修改时间查不到.2005可以查到,具体方法不清楚.select name , crdate from sysobjects
select * from sys.syslogins
log explorer ,可以查到数据修改,但是也还是查不到用户的
sql2005 select * from sys.procedures修改者和主机名不知道在哪查... 估计得提前布监控.
alter procedure proc 基本上等于重写了!
select * from sys.syslogins 不知道这个可以不?
select crdate,* from sysobjects where xtype = 'U'
不清楚 只知道syslogins 等待高手
查询建立时间--表 select * from sysobjects where id=object_id(N'表名') and xtype='U' --表的结构 select * from syscolumns where id=object_id(N'表名') --存储过程 select * from sysobjects where id=object_id(N'存储过程名') and xtype='P' 查询最后修改时间--存储过程 select name,modify_date from sys.all_objects where type='P' order by modify_date desc --触发器 select name,modify_date from sys.all_objects where type='TR' order by modify_date desc --表 select * from sys.all_objects where type='u' order by modify_date desc 主要是得到几张系统表就行 还可以到系统日志里面找到 在MASTER库中
select crdate,* from sysobjects where xtype = 'U'crdate name id xtype uid info status base_schema_ver replinfo parent_obj crdate ftcatid schema_ver stats_schema_ver type userstat sysstat indexdel refdate version deltrig instrig updtrig seltrig category cache
------------------------------------------------------ -------------------------------------------------------------------------------------------------------------------------------- ----------- ----- ------ ------ ----------- --------------- ----------- ----------- ------------------------------------------------------ ------- ----------- ---------------- ---- -------- ------- -------- ------------------------------------------------------ ----------- ----------- ----------- ----------- ----------- ----------- ------
2000-08-06 01:33:52.437 titleauthor 53575229 U 1 4 1610614019 49 0 0 2000-08-06 01:33:52.437 0 48 1 U 1 115 0 2000-08-06 01:33:52.437 0 0 0 0 0 516 0
2000-08-06 01:33:52.547 stores 117575457 U 1 6 1610615041 49 0 0 2000-08-06 01:33:52.547 0 48 1 U 1 83 0 2000-08-06 01:33:52.547 0 0 0 0 0 520 0
2000-08-06 01:33:52.653 sales 149575571 U 1 6 1610614019 33 0 0 2000-08-06 01:33:52.653 0 32 1 U 1 115 0 2000-08-06 01:33:52.653 0 0 0 0 0 516 0
2000-08-06 01:33:52.763 roysched 213575799 U 1 4 1610613762 33 0 0 2000-08-06 01:33:52.763 0 32 1 U 1 99 0 2000-08-06 01:33:52.763 0 0 0 0 0 4 0
2000-08-06 01:33:52.873 discounts 245575913 U 1 5 1610613760 0 0 0 2000-08-06 01:33:52.873 0 0 0 U 1 67 0 2000-08-06 01:33:52.873 0 0 0 0 0 4 0
2000-08-06 01:33:52.983 jobs 277576027 U 1 4 1610627361 17 0 0 2000-08-06 01:33:52.983 0 16 1 U 1 83 0 2000-08-06 01:33:52.983 0 0 0 0 0 2697 0
2000-08-06 01:33:53.093 pub_info 357576312 U 1 3 1610614021 17 0 0 2000-08-06 01:33:53.093 0 16 1 U 1 8275 0 2000-08-06 01:33:53.093 0 0 0 0 0 516 0
2000-08-06 01:33:53.203 employee 405576483 U 1 8 1619408131 49 0 0 2000-08-06 01:33:53.203 0 48 1 U 1 115 0 2000-08-06 01:33:53.203 0 0 549576996 549576996 0 2692 0
2007-11-12 16:43:49.327 facmachine 730485681 U 1 3 1610612736 0 0 0 2007-11-12 16:43:49.327 0 0 0 U 1 67 0 2007-11-12 16:43:49.327 0 0 0 0 0 0 0
2000-08-06 01:33:52.123 authors 1977058079 U 1 9 1610627331 49 0 0 2000-08-06 01:33:52.123 0 48 1 U 1 115 0 2000-08-06 01:33:52.123 0 0 0 0 0 2696 0
2000-08-06 01:33:52.217 publishers 2057058364 U 1 5 1610627329 65 0 0 2000-08-06 01:33:52.217 0 64 1 U 1 83 0 2000-08-06 01:33:52.217 0 0 0 0 0 2696 0
2000-08-06 01:33:52.327 titles 2121058592 U 1 10 1610624259 81 0 0 2000-08-06 01:33:52.327 0 80 1 U 1 115 0 2000-08-06 01:33:52.327 0 0 0 0 0 2572 0(所影响的行数为 12 行)
select * from sys.syslogins
select * from sys.procedures修改者和主机名不知道在哪查...
估计得提前布监控.
alter procedure proc
基本上等于重写了!
不知道这个可以不?
只知道syslogins
等待高手
select * from sysobjects where id=object_id(N'表名') and xtype='U'
--表的结构
select * from syscolumns where id=object_id(N'表名')
--存储过程
select * from sysobjects where id=object_id(N'存储过程名') and xtype='P' 查询最后修改时间--存储过程
select name,modify_date from sys.all_objects where type='P' order by modify_date desc
--触发器
select name,modify_date from sys.all_objects where type='TR' order by modify_date desc
--表
select * from sys.all_objects where type='u' order by modify_date desc
主要是得到几张系统表就行
还可以到系统日志里面找到
在MASTER库中