Category Archives: Uncategorized

How to ignore security settings in SQL Server Database Project (SSDT)

In SSDT project, you could create everything you want and keep them identical with target database. However, security might be an exception, few reason you might want to manage security out side of SSDT project: You need to create a … Continue reading

Posted in SSDT, Uncategorized | Tagged , | Leave a comment

How to detect the owner of the database objects

Prior to SQL Server 2005, if you create objects in a schema, the owner of the object is the user who created it. However, this behavior was change in SQL Server 2005 and later versions, by default, if you create … Continue reading

Posted in Uncategorized | Leave a comment

Workaround: Items are not sorted alphabetically in the SQL Server Management Studio Solution Explorer

In SQL Server Management Studio, when you added more items (such as queries) in your project, they are always in the order of latest to oldest from up to down, but not sorted alphabetically. It can be problematic if you … Continue reading

Posted in Tools, Uncategorized | Tagged , | 1 Comment

How to detect database version of SQL Server backups

Oftentimes, we have many different SQL Server (2000, 2005, 2008, etc.) database backups files, and it is hard to remember database version in each backup file. This could cause problems, such as restoring a SQL Server 2008 database backup on … Continue reading

Posted in Uncategorized | Tagged | Leave a comment

Taking tail-log backup what if the database is inaccessible

A tail-log backup is that a log backup that backs up the tail of the transaction log that have not yet backed up. In a event of database disaster, data loss cannot be prevented if tail-log backup cannot be taken. … Continue reading

Posted in Uncategorized | Tagged , | Leave a comment

Where the database data and log files will be restored?

Generally, we could use Restore Database option in SSMS GUI or using RESTORE DATABASE T-SQL command when we want to restore a database from a database backup file (.bak). However, the destination database file (data and log) locations will vary … Continue reading

Posted in Uncategorized | Tagged , , , , | 2 Comments