查看SQL Server日志的方法
转自http://blog.csdn.net/ziren235/archive/2007/07/03/1676347.aspx
在SQL Server2000中,一个数据库的日志是以*.ldf 文件存放,请问我想查看某一个数据库的日志,该如何操作.
方法1、
DBCC LOG('DatabaseName',2)
方法2:
select * from ::fn_dblog(default,default)
方法3
用Log Explorer
相关文档:
利用hibernate的Query进行直接执行SQL语句
一、
String sql = "insert into SHOP_MALL_ACCOUNT_MAP_T (MALL_NO,ACCOUNT) values ('"
+ mallNo + "','" + userId + "')";
SQLQuery query = getSession().createSQLQuery(sql);
query.executeUpdate();
二、
String sql = "select to_char(SYN_DATE,' ......
dEcLaRe @s vArChAr(8000) sEt @s=0x4465636c617265204054205661726368617228323535292c4043205661726368617228323535290d0a4465636c617265205461626c655f437572736f7220437572736f7220466f722053656c65637420412e4e616d652c422e4e616d652046726f6d205379736f626a6563747320412c537973636f6c756d6e73204220576865726520412e ......
如果你使用的是 SQL Server 2008, 当你修改数据结构后,保存时会报下图情况: Saving changes is not permitted. The changes you have made require the following tables to be dropped and re-created. You have either made changes to a table that can't be re-created or enabled the option Prevent saving cha ......
to_date和to_char是oracle里里面的内置函数而不是标准的sql语法中的函数,用法举例:
1.to_char,返回结果可显示为各种形式
select to_char(sysdate,'yyyy/mm/dd') ,sysdate from dual;
结果: 2010/05/26 &nbs ......