Archives: January 2013
SQL Server – Attach Database with MDF file only
Earlier on my blog I posted about how you can attach a database using T-SQL when no log file is available. You can catch that here. In this post we will see how it can be attached using GUI.
To attach a database with no .ldf file, follow below… Read more
1 comments, 376 reads
Posted in SQL and Me on 30 January 2013
SQL Server – Check Enabled Trace Flags for Server
In SQL Server you can enable a Trace Flag at session (effective for current session only) level and global level. If you are not sure which Trace Flags have been enabled you can use DBCC TRACESTATUS() command to get a list of enabled Trace Flags.
DBCC TRACESTATUS() takes two arguments… Read more
0 comments, 289 reads
Posted in SQL and Me on 24 January 2013
SQL Server – Enabling backup CHECKSUM with Trace Flag 3023
You can use WITH CHECKSUM option to perform checksum when backup is created. When used this verifies each page for checksum and torn page.
You can use it in a BACKUP command as below:
BACKUP DATABASE [SqlAndMe]
TO DISK = N'C:\SqlAndMe.bak'
WITH CHECKSUM
GO
Once the backup is created… Read more
2 comments, 520 reads
Posted in SQL and Me on 15 January 2013
SQL Server – Login Failed, cannot open user default database
Each login in SQL Server has a default database associated with it. When you login to SQL Server context is set to default database for login. This is set when login is created and it can be changed by using ALTER LOGIN command.
If for some reason the default… Read more
0 comments, 470 reads
Posted in SQL and Me on 7 January 2013



Subscribe to this blog