Scripts

Technical Article

Script tables to emulate Copy in Enterprise Manage

This script will produce the same output as doing a Copy in enterprise manager and then pasting into Query Analyser.It can handle Clustered and Nonclustered Primary Keys, Multiple Foreign Keys, Defaults, Constraints, Identity Fields.  If you are able to improve this script, or find any bugs, please let me know.

You rated this post out of 5. Change rating

2003-04-09

171 reads

Technical Article

To retrieve Stored Procedure Parameters with Description

Use this procedure to get parameters for your stored procedure with data type,length, parameter position and also the mode of parameter (Input or Output). Can be used to populate the dynamic parameters for any procedure. Mohit NayyarMCP (.Net), MCSD, MCDBA

5 (2)

You rated this post out of 5. Change rating

2003-04-06

924 reads

Technical Article

View Input Buffers for all SPIDS

This procedure, sp_AllInputBuffers, uses dynamic T-SQL to generate and execute the DBCC INPUTBUFFER statement for each server process (except yours).  Perfect for performance troubleshooting situations, when you want to see what commands are being executed against your server.  Also, a great example of the power of dynamic T-SQL.For the @exec parameter, pass 1 or leave […]

You rated this post out of 5. Change rating

2003-04-04

644 reads

Technical Article

Date Only

This is a follow-on to info's script to strip the time portion of a datetime or smalldatetime, leaving only the date.  I found info's script interesting!  When I had to do this I converted the date to varchar and back again instead of to float.  Seems to work fine for me.

You rated this post out of 5. Change rating

2003-04-03

116 reads

Blogs

A New Word: Ochisia

By

ochisia – n. the fear that the role you once occupied in someone’s life...

Create a Numbers Table in Power Query

By

This is a quick blog post, mainly so I have the code available if...

Microsoft finally adds Tenant Switcher for Fabric / Power BI

By

Praise whatever deity you believe in, because it’s finally here, a tenant switcher for...

Read the latest Blogs

Forums

To View or not to View, that is the question...

By pietlinden

I've read lots of the horror stories about nested views in databases where they're...

Grant user read-write permission to a single database

By PJ_SQL

Hello! How do I grant a user to read-write to a single database and...

Table Delete

By Bruin

I have a very large table and I'm looking to do a cleanup based...

Visit the forum

Question of the Day

The Density Vector

When building statistics, there is the concept of density that refers to the duplicates in a table. How is this calculated?

See possible answers