-
List last running status of enabled jobs in Sql Server
Script below. This one works better for Sql Server 2000. I will do a version for Sql Server 2005, when I get a chance. It didn’t work very well on Sql Server 2005 because Ad Hoc Distributed Queries is disabled by default. set nocount on IF OBJECT_ID(‘tempdb..#TmpJobs’) IS NOT NULL DROP TABLE #TmpJobs SELECT *…
-
List all sa sysadmin in your Sql Server instances with Perl
This is mainly for my own reference. Save it as ListSysadmin.pl. Run ListSysadmin.pl SqlServerList.txt on command line. It lists all logins that has sa (sysadmin) rights on Sql Server instance, including individual domain members in a domain group that has sysadmin rights. SqlServerList.txt should be a text file, with each individual line contains a Sql…
-
捐款不在多少
和大家一样,我最近读了很多关于地震救灾的消息,很为那么多人的奉献和爱心所感动。 也读到了关于捐款的新闻。其中还有不同版本、不同行业的“铁公鸡”排行榜。很多人还为谁捐多少、该捐多少争得脸红脖子粗,骂人的、扣帽子的话都出来了。个人观点:捐款不是作秀,不是攀比,不在多少。所以我和王建硕在这个问题上很有同感。当然不排除对一些名人、奸商的伪善进行揭露和批评,但出口伤人,以为嗓门大就有理就不对了。 还读了不少关于砂轮斯通的新闻。这个过气女星的评论当然很可气,值得一驳。但看到举国上下的声讨,是不是有点忒那个了。有点高射炮打蚊子的感觉。可能媒体的炒作也有推波助澜的作用。 以下是我在王建硕的博客的评论,记录过来。 You struck a chord with me on this one, Jian Shuo. I am with you regarding the “donation competition and condemnation”. I am sick of it myself. I don’t know what other popular public opinion troubles you. One thing that I personally felt a little uncomfortable with was the over reaction…
-
When was the last time a full backup was taken
One of the first things you want to do as a DBA is to check when was the last time a full backup was taken for all databases you manage. For Sql Server, here is a script you can run: set nocount on select cast(a.name as char(30)), max(b.backup_finish_date) from master..sysdatabases a left outer join msdb..backupset…
-
和你在一起
I am in Florida with the family on vacation, and put myself in web-free mode last Sunday. Tuesday afternoon, as an older gentleman was helping us getting to our car, I commented on his New York accent. He said he had left his native NYC for a long time, and has been to many places,…