Home > Top 10 T-SQL tips for improved SQL Server development
Top Expert Tips:
EMAIL THIS LICENSING & REPRINTS

Top 10 T-SQL tips for improved SQL Server development

13 Jun 2007 | SearchSQLServer.com

Expert advice on database development
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google

Having difficulty with your T-SQL programming extensions or simply want to make improvements within your SQL Server development? We've compiled a Top 10 list of the most popular tips your peers are reading. Find out how to script SQL Server backups, why T-SQL in SSIS has pros and cons and what to do about poorly written T-SQL code that's causing performance problems.

#1 - Restore basics: How to restore using T-SQL commands
SQL Server Enterprise Manager may be a quick and easy way to run backups and restores, but T-SQL commands offer much greater flexibility. Find out how to script your SQL Server backups or restores.

#2 - Stored procedure: Execute T-SQL code from a file
Need to execute T-SQL code in a file from within other T-SQL code? Existing routines used to execute T-SQL code from a file, without using osql and xp_cmdshell, have many limitations. The sp_ExecuteSQLFromFile stored procedure addresses the shortcomings and adds new functionality.

#3 - T-SQL performance problems and solutions
Don't assume all SQL Server performance problems are database-related. Poorly written T-SQL code could be to blame. Learn about common problems and workarounds in this clinic.

#4 - How to debug T- SQL stored procedures
These easy-to-use graphical debugging tools in Visual Studio 2005 will help simplify the process of unit testing your T-SQL code.

#5 - Pitfalls of using T-SQL cursors
Cursors have a bad reputation: They're considered poor performers, resource hogs and a favorite tool of every inexperienced DBA. But they do have a place. Contributor Hilary Cotter explains how cursors work and their pros and cons.

#6 - T-SQL in SSIS: The power and the weaknesses
Using T-SQL vs. the Data Flow task in SQL Server Integration Services (SSIS) is a decision dependent on a number of factors. Serdar Yegulalp shares some things to consider, including data origin, operation complexity, stored procedure purpose and whether the data is likely to change in SSIS.

#7 - Developing with SQL Server 2005 Express
With SQL Server 2005 Express Edition, Microsoft offers a feature-rich tool set with a familiar interface free of charge. Edgewood Solutions' Jeremy Kadlec provides an overview of this SQL Server version that includes Management Studio Express.

#8 - Writing T-SQL functions to SQL Server system schema
When dealing with many applications that need similar functionality, often the best thing to do is to write functions directly to your SQL Server system's schema. This will enable all databases within the server to execute the function as though it was a regular expansion of the T-SQL language. This how-to will take you through the process.

#9 - T-SQL and PL/SQL languages for database-independent applications
Common languages in T-SQL and PL/SQL exist to allow developers to write applications in database-independent environments. Common languages and interfaces such as ANSI and ODBC offer solutions to the database interoperability problem.

#10 - Getting an environment variable value using T-SQL
There are times when passing parameters does not work. For example: when dealing with DTS packages or when an external (non-SQL Server) platform activates a process inside a SQL Server environment. Here's how to solve the problem by setting an environment variable in the Windows operating system and then getting its value inside the SQL Server environment.



Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


RELATED CONTENT
Microsoft SQL Server
SQL Server errors, failures and other problems fixed from the trenches
SQL Server consolidation: Why it's an optimization technique
Can you shrink your SQL Server database to death?
Using SQL Server datetime functions GETDATE, DATENAME and DATEPART
Tuning SQL Server performance via memory and CPU processing
Get SQL Server log shipping functionality without Enterprise Edition
SQL Server 2008 backup compression pros and cons
How to use SQL Server 2008 hierarchyid data type
Tuning SQL Server performance via disk arrays and disk partitioning
Should you upgrade to SQL Server 2005 or SQL Server 2008?

SQL/Transact SQL (T-SQL)
Using DATEADD and DATEDIFF to calculate SQL Server datetime values
Manipulate column names in a SQL Server table
SQL Server trigger vs. stored procedure to receive data notification
Physical data storage in SQL Server 2005 and 2008
SQL Server 2008 data types: Datetime, string, user-defined and more
Enforcing data integrity in a SQL Server database
SQL Server and data manipulation in T-SQL
Supertype and subtype tables in SQL Server
Using SQL Server datetime functions GETDATE, DATENAME and DATEPART
Ordering the results of a SQL query
SQL/Transact SQL (T-SQL) Research

SQL Server stored procedures
SQL Server trigger vs. stored procedure to receive data notification
How to use SQL Server 2008 hierarchyid data type
SQL and SQL Server Tutorial and Reference Guide
SQL Server stored procedures tutorial: Write, tune and get examples
Check SQL Server database and log file size with this stored procedure
SQL Server source code analysis and management adds database security
Configure SQL Server Service Broker for sending stored procedure data
Find size of SQL Server tables and other objects with stored procedure
Track changes to SQL Server 2000 and 2005 with one simple utility
Troubleshoot SQL Server 2005 temporary table performance problems

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
ACID  (SearchSQLServer.com)
commit  (SearchSQLServer.com)
DAO  (SearchSQLServer.com)
fetch  (SearchSQLServer.com)
OLE DB  (SearchSQLServer.com)
query  (SearchSQLServer.com)
SQL  (SearchSQLServer.com)
T-SQL  (SearchSQLServer.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary


HomeNewsTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersIT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




All Rights Reserved, Copyright 2005 - 2008, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts