|
Top Ten Tips |
 |
Reading the SQL Server log files using T-SQL
One of the issues I have is that the SQL Server Error Log is quite large and it is not always easy to view the contents with the Log File Viewer. In a previous tip "Simple way to find errors in SQL Server error log" you discussed a method of searching the error log using VBScript. Are there any other easy ways to search and find errors in the error log files?
|
Using the CASE expression instead of dynamic SQL
I have a lot of SQL update queries where I need to make IF/ELSE types of decisions. I am using a cursor in some cases but looping through thousands of rows for update takes a long time. I also use some dynamic SQL to handle some query parameter decision making. Is there a better alternative?
|
Designing Tables for Audit Data in SQL Server
My company is just starting to look at adding functionality to retain historical data for key tables and columns for auditing purposes in many of our SQL Server databases. I have seen some of your recent tips related to triggers (Forcing Trigger Firing Order in SQL Server and Trigger Alternatives in SQL Server - OUTPUT Clause). Based on using triggers or a similar technology, what is the best way to store the historical data? What options are available to store the data? Are there really a variety of options? Should the historical data be in the same database as the original data? Does it really make a difference?
|
Script to determine permissions in SQL Server 2005
At times I run into application issues when I am unable to perform particular functions in the application that some of my peers are able to complete. I need to be able to quickly and easily understand my permissions in SQL Server. Do you know of an easy way to do so? Do you know how I can compare 2 different users to see what the difference could be at an instance, database or object level? Any and all suggestions would be appreciated.
|
SQL Server Reporting Services Configuration Tool
Installing SQL Server Reporting Services is just the first step in building the foundation for a solid Reporting Services instance. The second step in the process is configuring Reporting Services to conform to the particulars of your environment. These configurations are made to the RSServer.config file via the Reporting Services Configuration Tool. This tool is quite similar in concept and practice to the Surface Area Configuration Tool that is utilized to configure the SQL Server Database Services instance post-install. In this tip we will walk through each part of the Reporting Services Configuration Tool.
|
SQL Server DBA Phone Interview Questions
The phone interview. It has tales of bringing normally rationale people to a terrified state. I have even heard of a DBA that was so worried about a SQL Server phone interview that 'they just happened to be in the office park' where the company was located and actually wanted the interview face to face. The reality is, just about all organizations that I work with have a phone interview as a right of first passage in the process. The employer wants to quickly determine if the DBA candidate could be qualified for the position from a technical perspective and if they will fit into the team. As a DBA, what sorts of things should you be on the lookout for during a phone interview? What do you think the employer is expecting?
|
SQL Server Index Checklist
Indexing a SQL Server database in some respects is considered both an art and a science. Since this is the case, what are some considerations when designing indexes for a new database or an existing one in production? Are these the same types of steps or not? Do any best practices really exist when it comes to indexing? Where does indexing fall in the priority list from an application or production support perspective?
|
SQL Server Script to Create Windows Directories
Most SQL Server Database Administrators have specific standards for storing their database files on the disk drives. In our environment many of our instances host multiple databases, and though database names must be unique on a Microsoft SQL Server instance, I do not like to drop all of the database and/or log files into the default data and log directories on my SQL Server instances. To make file management easier, I create a subdirectory for each database in the default data and log paths. I was curious if I could create the database file folders dynamically, without needing to open an Windows Explorer session in order to create the new database folder each time I created a database...
|
Using the script task to dynamically build SSIS package variables
One of the advantages of using SSIS is the ability to dynamically create tasks and variables that can take different elements and manipulate them in code instead of having to hard code the package to do only one task. In a previous tip we looked at how to use expressions to dynamically build an output file: "Dynamic Flat File Connections in SQL Server Integration Services". In this tip, we will show you another way to do this using the script task.
|
Export data from SQL Server to Excel
Exporting data from SQL Server to Excel seems like a reasonably simple request. I just need to write out a few reports for users on a regular basis, nothing too fancy, the same basic report with a few different parameters. What native SQL Server options are available to do so? Do I need to learn another tool or can I use some T-SQL commands? Does SQL Server 2005 offer any new options to enhance this process?
|
|
|
Additional info from our sponsors |
 |
|
|
|
|
Red Gate Software - SQL Prompt
Fast, intelligent, T-SQL code-completion add-in for Visual Studio, SSMS and Query Analyzer. SQL Prompt helps you write faster, neater SQL queries without having to know the details of the database schema. Preset exactly how and when SQL Prompt responds to your needs. Free 14-day trial download.
Download now!
|
|