Backup & Restore

Find out logical file name of a database backup file

It’s easy when you want to restore an SQL Server database backup file using SQL Server Management Studio (SSMS). Since you only have to know where you’ve stored backup file and with few click and done, database will successfully restored. But what if you wanna use T-SQL instead to restore the database and you don’t want… Continue reading Find out logical file name of a database backup file

Backup & Restore

Using fn_dblog, fn_dump_dblog and restoring with STOPBEFOREMARK

I’ve found this very useful article wrote by Paul Randal and decide to rewrite it on my own blog.  You can find full and the original article in this link. Someone dropped a table and you want to find out when it happened and maybe who did it. The default trace has also wrapped so you… Continue reading Using fn_dblog, fn_dump_dblog and restoring with STOPBEFOREMARK

Backup & Restore

Exclusive access could not be obtained because the database is in use

I’ve got an email from a friend. He was made backup of a database, and restore that backup file to another new database but he got error “Exclusive access could not be obtained because the database is in use”. I’m trying by myself to restore a database in my machine with the same scenario and got the full… Continue reading Exclusive access could not be obtained because the database is in use

Backup & Restore

Check if a database backup is Full, Differential or Transaction Log Backup

Usually when I’ve create a database backup, I’ll use the backup file name that represent database name, backup type (Full,Differential or Log), and also date and time stamp when that backup created. But what if there is someone else in your team, took that database backup with different name pattern? How do you know if that backup files is… Continue reading Check if a database backup is Full, Differential or Transaction Log Backup

Backup & Restore

My database maintenance tasks and schedule using Olla Hallengren’s script

Every time I’ve installed new SQL Server instance, one of my first task is to create database maintenance plan. Benefits from implementing proper database maintenance plan is to help to prevent or at least to catch early and database problems. First time I know about this SQL Server, I’m using SQL Server Maintenance Plan Wizard… Continue reading My database maintenance tasks and schedule using Olla Hallengren’s script