|
|
-
|
|
Ever had a situation where you had to attach a database when all you had were the data files? Perhaps when you downloaded the AdventureWorks sample databases from CodePlex? Here's a script to attach a database with just the data files using CREATE DATABASE....ATTACH_REBUILD_LOG statement...
|
|
-
|
|
Introducing the new Scripts module at BeyondRelational.com where developers and administrators can share and find code snippets & scripts to address some of the common business problems. Share your code snippets & scripts on the new Scripts Module - don't reinvent the wheel, and help others to learn from your experiences....
|
|
-
|
|
Use a Windows process Id (PID) and not the SQL Server SPID to monitor the SQL Server activity generated by an application process. Use the SQL Server DMV - sys.dm_exec_sessions and the SQL Server Profiler to achieve this goal - very useful when working with applications hosted on a terminal server....
|
|
-
|
|
Avoid the hassle of going to the Query menu and choosing the SQLCMD mode if most of your queries are designed for SQLCMD. Set the "Open new queries in SQLCMD mode" switch in SSMS options for a productive day!...
|
|
-
|
|
Many ISVs do not educate users that database performance may degrade immediately after an upgrade - especially one that changes the compatibility level of the database to support a higher version of SQL Server. Today, we explore the reason behind his performance degradation - recompilation of cached plans....
|
|
-
|
|
If you are running out of space on your SQL Server, I am sure you would have tried backing up and restoring to a mapped network drive, which is not supported. However, did you trying using the UNC path to backup and restore a database to your SQL Server? Here are the scripts to do so!...
|
|
-
|
|
There are multiple ways in which column aliases can be defined in a T-SQL query depending upon the developer''''s preference. However, not all are recommended for new code being developed, because they will be discontinued in a future release of Microsoft SQL Server. Today, I look at the various methods used to define column aliases....
|
|
-
|
|
I attempt to bust an old wives tale surrounding table & column aliasing in your T-SQL query. Is it a myth that table & column aliasing impacts query performance? Or bloats the plan cache? Or hinders plan reuse? Join me as I try to answer these and other follow-up questions....
|
|
-
|
|
I attempt to bust an old wives tale surrounding table & column aliasing in your T-SQL query. Is it a myth that table & column aliasing impacts query performance? Or bloats the plan cache? Or hinders plan reuse? Join me as I try to answer these questions....
|
|
-
|
|
How do you know when your index was last rebuilt or reogranized? How many records changed during this rebuild/reorganization operation? Read this post for answers to all these questions....
|
|