Scripts

Technical Article

Date String format with optional Timestamp

I find it so annoying to format dates. Sometimes I want to include the timestamp, but if it is a midnight time stamp, the time is irrelevant. Sending in a datetime will return either the date string or a date string with a timestamp up to the seconds with either AM or PM.

5 (1)

You rated this post out of 5. Change rating

2007-01-02 (first published: )

187 reads

Technical Article

Check and Set Default file Locations with TSQL

Checks the default file locations for your data and log files. If not set, it sets them to the specified values. This is written for a SQL 2005 default instance. Registry paths may be different for SQL 2000 or named instances.The script can be easily modified to update it if the current value is set […]

4.5 (2)

You rated this post out of 5. Change rating

2007-01-01 (first published: )

874 reads

Technical Article

Execution of Code on Multiple Servers Remotely

Do you have more than 10 sql servers you must manage? Most DBA s do, I have over 120 sql instances to manage. Before I used to use ISQL/OSQL in a batch to execute a command on all these instances. It works but not very nice. Below is the code I use to collect information […]

5 (1)

You rated this post out of 5. Change rating

2006-12-28 (first published: )

775 reads

Technical Article

Find Missing Constraints

Procedure to help find missing constraints when comparing two databases that are supposed to be the same.  SP has ability to show all constraints per database, and the ability to generate create scripts to make adding the missing constraints easier.

You rated this post out of 5. Change rating

2006-12-26 (first published: )

763 reads

Technical Article

Checking the REMOTE site of a database-link

When gathering SQL server statistics on ALL our Active SQL servers the script was failing sometime when one of our servers was not reachable for one reason or another.This script is checking if the LINKED SERVER is up and running before executing the "gathering statistics" script for this particular server.

You rated this post out of 5. Change rating

2006-12-25 (first published: )

187 reads

Technical Article

Update statistics for all tables in any DB

Most of the time even after executing dbcc dbreindex script on database you won't see much improvement in application/DB performance.  Thats because dbreindex creates statistics for all tables but it executes sp_updatestats which is like sample statistics. To get the maximum performance we had to execute Update statistics with fullscan on table. This simple will […]

4.75 (8)

You rated this post out of 5. Change rating

2006-12-22 (first published: )

20,425 reads

Blogs

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

Spark Connect Dotnet November 2024 Where are we?

By

All Spark Connect Posts Introduction There have been quite a few changes in the last...

Read the latest Blogs

Forums

How much transaction logs generated by hourly/daily

By JasonO

For MSSQL is there any queries or methods for me to pull historical data...

A Design Question using a fictious example

By eichnerm

Background: I have two tables. Tests and Grades. For each Tests record there are...

GBL wheel cleaner online supplier in Sussex UK.

By papucong

mathiasbrock111@gmail.com Buy GHB powder online, Buy GBL alloy wheel cleaner in Wolverhampton WhatsApp+237656193417 Buy...

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