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 - Stored Procedure to Know Database Access Permission to Current User

SQL SERVER – Stored Procedure to Know Database Access Permission to Current User

September 23, 2007
Pinal Dave
SQL Tips and Tricks
SQL Cursor, SQL Scripts, SQL Stored Procedure, Undocumented SQL

Which databases can I use? Run EXEC sp_MShasdbaccess to see the database access permission of the current user. Our Jr. DBAs check it all the time.

Read More
SQL SERVER - Difference Between EXEC and EXECUTE vs EXEC() - Use EXEC/EXECUTE for SP always

SQL SERVER – Difference Between EXEC and EXECUTE vs EXEC() – Use EXEC/EXECUTE for SP always

September 13, 2007
Pinal Dave
SQL Tips and Tricks
DBA, SQL Cursor, SQL Scripts, SQL Stored Procedure

What is the difference between EXEC and EXECUTE? None. The real difference is EXEC vs EXEC(), and I show why EXEC belongs before every stored procedure call.

Read More
SQL SERVER - 2005 - Search Stored Procedure Code - Search Stored Procedure Text

SQL SERVER – 2005 – Search Stored Procedure Code – Search Stored Procedure Text

September 3, 2007
Pinal Dave
SQL Tips and Tricks
SQL Cursor, SQL Scripts, SQL Stored Procedure, SQL System Table

How to search stored procedure code in SQL Server 2005 for a table or column name, using sys.procedures and OBJECT_DEFINITION instead of sp_depends.

Read More
A furnished room beside the same room drawn as an empty blueprint, showing shape without contents.

SQL SERVER – 2005 – Create Script to Copy Database Schema and All The Objects – Stored Procedure, Functions, Triggers, Tables, Views, Constraints and All Other Database Objects

August 21, 2007
Pinal Dave
SQL Tips and Tricks
Database, SQL Backup and Restore, SQL Constraint and Keys, SQL Cursor, SQL Download, SQL Function, SQL Index, SQL Scripts, SQL Stored Procedure, SQL Trigger

A step by step tutorial to create a T-SQL script that can copy database schema and all objects, like stored procedures, functions, triggers, tables and views.

Read More
A long sheet of rolled dough cut into many identical shapes in one press, a single small cookie cutter lying beside it.

Replacing a Cursor With a Set-Based Query

July 25, 2007
Pinal Dave
SQL Performance
SQL Cursor, SQL Joins, SQL Scripts, SQL Server

Replacing a cursor with one set-based update can simplify row processing; this worked example shows correctness checks and fair timing.

Read More
SQL SERVER - 2005 Comparison SP_EXECUTESQL vs EXECUTE/EXEC

SQL SERVER – 2005 Comparison SP_EXECUTESQL vs EXECUTE/EXEC

July 2, 2007
Pinal Dave
SQL Performance
SQL Cursor, SQL Download, SQL Scripts, SQL Stored Procedure

SP_EXECUTESQL vs EXECUTE/EXEC in SQL Server 2005: what they share for dynamic SQL, like late compile and variable scope, and how they differ.

Read More
A gouache seed-sorting chute uses a removable red stop block to limit material reaching one tray, with another tray waiting nearby.

SQL SERVER – SET ROWCOUNT and TOP Precedence with Deterministic Limits

April 30, 2007
Pinal Dave
SQL Tips and Tricks
SQL Cursor, SQL Scripts, SQL Server, SQL Server Security

SET ROWCOUNT limits the session, while TOP limits a statement. I reset ROWCOUNT after testing so later queries keep their intended limits.

Read More
Previous 1 2 3 4 5 6 Next
  • Books
  • Testimonials
  • Privacy Policy

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