This month's discount Comprehensive Database Performance Health Check · Testimonials
SQLAuthority with Pinal Dave
Home
  • Consulting
    • Health Check
  • Free Videos
  • All Articles
    • AI
    • SQL Performance
    • SQL Tips and Tricks
    • Interview Questions and Answers
    • SQL Puzzle
    • SQL Video
    • SQLAuthority News
    • Personal
  • Books
  • Consulting
SQL SERVER - Explanation of WITH ENCRYPTION clause for Stored Procedure and User Defined Functions

SQL SERVER – Explanation of WITH ENCRYPTION clause for Stored Procedure and User Defined Functions

July 1, 2007
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Server Encryption, SQL Stored Procedure

Use WITH ENCRYPTION to hide the code of a stored procedure or UDF, but keep a copy of the script. Once encrypted, there is no simple way to decrypt it.

Read More
SQL SERVER - Fix : Error : Server: Msg 131, Level 15, State 3, Line 1 The size () given to the type 'varchar' exceeds the maximum allowed for any data type (8000)

SQL SERVER – Fix : Error : Server: Msg 131, Level 15, State 3, Line 1 The size () given to the type ‘varchar’ exceeds the maximum allowed for any data type (8000)

June 30, 2007
Pinal Dave
SQL Tips and Tricks
SQL Error Messages, SQL String

Msg 131 says the size given to varchar exceeds the maximum allowed (8000). Use VARCHAR(8000), or VARCHAR(MAX) in SQL Server 2005 as the TEXT replacement.

Read More
SQL SERVER - Recompile All The Stored Procedure on Specific Table

SQL SERVER – Recompile All The Stored Procedure on Specific Table

June 29, 2007
Pinal Dave
SQL Tips and Tricks
Best Practices, SQL Stored Procedure

After BCP or DTS mass inserts, stored procedures can slow down. I use sp_recompile to recompile all the stored procedure on a table, or just one procedure.

Read More
Gouache painting: on a bakery bench a narrow stoneware crock holds risen dough that has been sliced flat at its rim by a bench scraper

REPLACE Return Limits: Cast the Input to max

June 28, 2007
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL String

REPLACE return limits can truncate text at 8,000 bytes. Cast the searched input to max first, then compare Unicode and non-Unicode byte lengths.

Read More
SQL SERVER - Running Batch File Using T-SQL - xp_cmdshell bat file

SQL SERVER – Running Batch File Using T-SQL – xp_cmdshell bat file

June 27, 2007
Pinal Dave
SQL Tips and Tricks
Computer Network, SQL Scripts, SQL Utility

What is xp_cmdshell used for, and how do you run a batch file using T-SQL? Examples run a system command, a plain BAT file and one with a parameter.

Read More
Numbered wooden tables arranged in rows inside a database drum.

SQL SERVER – 2005 List All Tables of Database

June 26, 2007
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL System Table

The simple way to list all tables of a database in SQL Server 2005: select from sys.tables to get every table that users have created.

Read More
SQL SERVER - Explanation and Example Four Part Name

SQL SERVER – Explanation and Example Four Part Name

June 26, 2007
Pinal Dave
SQL Tips and Tricks

What is a four part name in SQL Server? It is ServerName.DatabaseName.DatabaseOwner.TableName, for example localhost.AdventureWorks.Person.Contact.

Read More
SQL SERVER - Repeate String N Times Using String Function REPLICATE

SQL SERVER – Repeate String N Times Using String Function REPLICATE

June 25, 2007
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL String

REPLICATE repeats a string N times. I found this T-SQL string function while searching for replication, and it is handy when you need repeated text.

Read More
A long coach filling six parking bays while small cars wait at the entrance

Memory Grants: Why a Query Waits for Memory

June 24, 2007
Pinal Dave
SQL Performance
Execution Plan, SQL Memory, SQL Performance, SQL Wait Stats

Memory grants can leave SQL Server queries waiting on RESOURCE_SEMAPHORE; inspect estimates, grants, and spills before adding memory.

Read More
SQL SERVER - Comparison Index Fragmentation, Index De-Fragmentation, Index Rebuild - SQL SERVER 2000 and SQL SERVER 2005

SQL SERVER – Comparison Index Fragmentation, Index De-Fragmentation, Index Rebuild – SQL SERVER 2000 and SQL SERVER 2005

June 24, 2007
Pinal Dave
SQL Performance
DBA, SQL Index, SQL Scripts, SQL Server DBCC, SQL Server Security, SQL Utility

What is Index Fragmentation and how do page splits cause it? How to measure it with DBCC SHOWCONTIG in SQL Server 2000 and sys.dm_db_index_physical_stats in 2005.

Read More
Previous 1 … 565 566 567 568 569 570 571 … 589 Next
  • Books
  • Testimonials
  • Privacy Policy

© 2006 – 2026 All rights reserved. pinal @ SQLAuthority.com