Scripts

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

646 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

Technical Article

Get the Table Structure using a simple query

This query will solve problems related to Table structure. Using this query you can have the complete table structure for all the user tables with Table Name, Column Name, Data Type, and Null attributes of a column.You can run this script in Query Analyzer or make use of it in your front-end to give table […]

4.5 (2)

You rated this post out of 5. Change rating

2003-04-02

5,099 reads

Technical Article

Restore last backup to a different server/database

Finds the last available backup for a specified database (local or remote server), then restores the backup onto an existing database on the local server.The script will kill all non-system processes in the destination database to allow the script to be scheduled at night regardless is anyone is still connected.The logical and physical names are […]

You rated this post out of 5. Change rating

2003-03-31

765 reads

Technical Article

Date without Time (corrected)

Some time you need to know only Date without Time.This is simple function that allows you truncate datetime field to date only.This function can help you to construct dynamic T-SQL for select date period. P.S. Thanks for ispaleny! Conversion only for real not enough! It is necessary convert to real that correct errors near the […]

4 (1)

You rated this post out of 5. Change rating

2003-03-28

395 reads

Blogs

Making a PostgreSQL Backup in a Container

By

I needed to back up a PostgreSQL database as a part of the repro...

Azure SQL offerings

By

There are three Azure SQL products with so many different deployment options, service tiers,...

T-SQL Tuesday #183 Roundup

By

I hosted this month’s T-SQL Tuesday party with my invitation asking about tracking permissions....

Read the latest Blogs

Forums

RLS Causing RBAR

By danielfountain

Hi all, First I want to ask just a generic question.  Does RLS in...

SQL2019 STANDARD max memory is 128Gb yet my Bufferpool exceeds this value

By PearlJammer1

Reading the Microsoft documentation it says SQL2019 STANDARD EDITION has a max memory of...

Having issues installing SSIS extension for VS 2022 Community

By daniel.manke

I have installed the SSIS extension for VS 2022 community. When I go into...

Visit the forum

Question of the Day

A Simple Choice

I have this data in a table?

CatIDCatName
3Monitors
What is returned when I run this code?
SELECT CHOOSE(catid, 'Laptops', 'PCs') FROM dbo.Categories AS c
 

See possible answers