-
How long has my Sql Server been running
Sometimes you want to know how long you Sql Server has been running. There are a number of ways to find that out. You can start from Sql Server error log. Go all the way to the beginning of your currect error log, assuming you have not recycled the error log manually, and look at…
-
Backup from Sql Server 2005 cannot be restored on Sql Server 2000
In this post, I mentioned that you can restore a Sql Server backup file to a Sql Server 2005 server. You cannot do it the other way, though. A backup taken on Sql Server 2005 cannot be restored on a Sql Server 2000 server. If you try, this is the likely message you will get:…
-
Interesting findings on schema owner permissions
I found out recently that a schema owner does not necessarily have right to create objects for its own schema, but can drop and grant permissions for its objects, which is kind of strange. Try this: 1. Create 2 logins: USE [master] GO CREATE LOGIN [Login1] WITH PASSWORD=N’xxx’, DEFAULT_DATABASE=[AdventureWorks], CHECK_EXPIRATION=ON, CHECK_POLICY=ON CREATE LOGIN [Login2] WITH…
-
C2 and Common Criteria Compliance
In Sql Server 2000, C2 auditing is a US government standard that monitors database security. When it is enabled, a trace will be created to collect all Security Audit related events, 21 or so of them. You can find what those events are by browsing through them in Profiler. By default, the trace file will…
-
A few handy Sql Server tips
Here are a few handy tips I learned lately: 1. When using sp_configure, you don’t need to type the whole parameter string. You just need to type enough of it for Sql Server to be uniquely identify it. For example, sp_configure ‘show ad’ will resolve to sp_configure ‘show advanced’ 2. In Query Analyzer or Management…