Scripts

Technical Article

Performance problem in SQL Server 2005

I have written stored procedure which simply read each row one by one and update the some column in same table.SP is running fine in SQL Server 2000 and completed within 5 minutes (around 5 million rows)But same SP in SQL Server 2005, its taking around more than one hour (for same number of rows)Note: […]

You rated this post out of 5. Change rating

2007-07-16

511 reads

Technical Article

Running Sum Query

Sometimes you need to calculate a running sum. Uses of this include adding a Month-To-Date column to a query of recent orders. I haven't seen anyone publish how to do this before (using this method).This query works by using the Row_Number() function and recursive query capability of SQL 2005.

You rated this post out of 5. Change rating

2007-07-16

529 reads

Technical Article

User Tables with Size  all DBs (SQL 2005 Only)

Hope this is helpful to someone.  This script will create a table and a stored procedure in the master database to gather and store table info for all datbases. The sp uses a temp table to hold the results returned by sp_spaceused, then transfers the information to the permanent table DatabaseTableSizes and adds the database […]

5 (1)

You rated this post out of 5. Change rating

2007-07-16 (first published: )

278 reads

Technical Article

Analyse tables for replication ( sql 2000 )

I have a requirement deploy transactional replication for an existing database which wasn't designed with replication in mind. I need to script/deploy based upon PK's, identity columns and timestamp columns. This query allows me to gather and save the information enabling me to generate the various scripts to replicate my database, replication through T SQL […]

You rated this post out of 5. Change rating

2007-07-12 (first published: )

781 reads

Technical Article

Get User Info

Returns database user information as a runnable script for the specified database. Great for restoring user access and permissions after a restore to a development server. Run this T-SQL script and copy the output to you favorite editor.Needed an easier way to script the user info than Enterprise Manager. Found a script by Clint Herring […]

5 (1)

You rated this post out of 5. Change rating

2007-07-12

829 reads

Blogs

SQL Server Distributed Availability Groups and Kubernetes

By

A while back I wrote about how to use a Cross Platform (or Clusterless)...

Webcast Tomorrow on SQL Server Disaster Recovery

By

Tomorrow, November 19, 2024, at 1 PM EST, I'm giving a webcast on SQL...

SQL Server Quickie #48 – Azure SQL Managed Instance

By

Today I have uploaded SQL Server Quickie #48 to YouTube. This time I’m talking...

Read the latest Blogs

Forums

Azure elastic job issue authenticating to Azure SQL database

By Stteb

Azure elastic agent jobs: I’m getting this error “The server principal “ac1971e9-381b-449b-9e1a-9cc276fc2985@b5313c9d-fb0d-47af-bc87-7c050bffbdc3” is not...

Converting job_id to join to another table.

By Brandie Tarvin

I need help, please! I have a monitoring table that pulls in information about...

SSMS 20.2 on Windows11 not able to connect to SQL 2005 ??

By Johan Bijnens

We still have a couple of dino's. What should I check to re-enable access...

Visit the forum

Question of the Day

What's the Ceiling?

What do I get as the results from this code?

SELECT CEILING (999.999), CEILING (-999.999);

See possible answers