Scripts

Technical Article

Backup SQL Server Database with Move/Copy File

The following script performs log, differential or full backups of a single, or all databases on your SQL Server.  It then copies or moves the file(s) over to a network share drive.  It also removes old backups from both locations if needed.  Don't forget to set the local drive path and network share for each […]

4 (9)

You rated this post out of 5. Change rating

2007-09-14 (first published: )

19,150 reads

Technical Article

Combine multiple rows into single output

We can use this function to combine multiple rows into single one. Generally to create comma separated list for each unique item. So this can create comma separated product list for any given category. The same can be used to make a list of items in a given order.ThanksMohit Nayyarhttp://mohitnayyar.blogspot.com/

5 (3)

You rated this post out of 5. Change rating

2007-09-14

3,785 reads

Technical Article

Restore 2000 DB to 2005

This script was designed to restore a backup of a SQL Server 2000 database from disk file to SQL Server 2005.Unfortunatelly the RESTORE will leave land mines for you to find the hard way, this script was updated to fix all that I have found:Change CONCAT_NULL_YIELDS_NULL ON, PAGE_VERIFY CHECKSUM, Compatibility level to 90, remove the […]

4 (1)

You rated this post out of 5. Change rating

2007-09-14

4,519 reads

Technical Article

Script to find text in stored procedures

This is a simple script that when used by command-line OSQL/ISQL can help you locate a stored procedure.How many times have you been looking for stored procedure code and could not find it?  This is a simple method to locate lost code.When you manage many database servers this can become a common problem.  The scenario […]

5 (2)

You rated this post out of 5. Change rating

2007-09-14

2,048 reads

Technical Article

LSTR() and RSTR(): Enhanced LEFT() and RIGHT()

Quite often I need to cut off the first (or last) few characters of a string. To do just that I created two functions LSTR() and RSTR().Syntax: LSTR( @stringtocut, @length )Note: @stringtocut is trimmed in the functionWhen @length is equal or larger than zero, this function performs the same as LEFT( LTRIM(RTRIM(@stringtocut)), @length ).When @length […]

1.67 (3)

You rated this post out of 5. Change rating

2007-09-13

1,508 reads

Technical Article

Verify Errorlog

Hi this is my first post on sql....The below procedure will check the current errorlog(past one hour errorlog will be scanned)for the keyword "error" (you can include your own key word) .. If you run the procedure it will look for keyword error in the past one hour... it will be use full for some […]

You rated this post out of 5. Change rating

2007-09-12 (first published: )

728 reads

Blogs

Book Review – Microsoft Power BI Performance Best Practices

By

I was asked to do a review of the book Microsoft Power BI Performance...

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...

Read the latest Blogs

Forums

Stairway to Snowflake Level 5 - Using Snowflake with SnowSQL and Visual Studio Code

By Mike McQuillan

Comments posted to this topic are about the item Stairway to Snowflake Level 5...

A Strange Result

By Steve Jones - SSC Editor

Comments posted to this topic are about the item A Strange Result

Possible SQL 2014 to 2016 Issue - Some Application Functions Slow/Failing

By Allenii02

First time here...hoping I can find some direction and answers so I can devise...

Visit the forum

Question of the Day

A Strange Result

What does this code return in SSMS 20 from SQL Server 2019?

select '|' + CHAR(0)+'abc' + '|';

See possible answers