Author Archives: Alex Feng

About Alex Feng

SQL Server DBA in Alibaba Cloud Computing

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 restore a database when you have a SQL Server backup file?

Oftentimes, when I get a database backup file, I usually perform a quick database restore without any hesitation. This usually works fine, but sometimes I get an annoying error message without any clue. Actually, SQL Server provides some commands that … Continue reading

Posted in Backup & Restore, Database Engine | Tagged , , , , | Leave a comment

How to attach a database without log file (.ldf)?

Earily this morning, I was asked about how to attach a database without the lof file (.ldf). This may happen if someone drop the (.ldf) file incorrectly. For SQL Server 2005 or later, this can be eaisly done via both … Continue reading

Posted in Database Engine, Detach & Attach | Tagged , | Leave a comment

SQL Server database CHECKSUM page varify option

In SQL Server 2005, there is a new page varify option, CHECKSUM, which can detect the page corruption between time a database page is written to disk and read from subquently by SQL Server. This option (CHECKSUM) is more restricter … Continue reading

Posted in Database Engine, Database Options | Tagged , | 1 Comment

Tips: Avoid single-use cached plan with ‘optimize for ad hoc workloads’ in the SQL Server 2008 or later

In SQL Server 2008, there is a new server configuration option introduced, called ‘optimize for ad hoc workloads’. This option can improve the efficiency of the plan cache for single use ad-hoc queries (or called dynamic SQL). When this option … Continue reading

Posted in Database Engine, Script Library, Tips & Tricks | Tagged , , | 1 Comment

FAQs: Database backup and restore for a mirrored database

Recently, I was asked several regarding database backup and restore for a mirrored database; therefore I think I need to write a blog post about them which may help others who has the similar doubts. Q: Can I do database … Continue reading

Posted in Backup, Database Mirroring, Restore | Tagged , , | Leave a comment

Setup Database Mirroring using Windows Authentication (T-SQL)

Generally, database mirroring involves two SQL Server instances, synchronously or asynchronously replicating transaction logs generated on the first server, known as Principal Server, to the second server, known as Mirror server and replay them on the Mirror server; also we … Continue reading

Posted in Database Mirroring | Tagged | 2 Comments