Scripts

Technical Article

finding the blocks in sql server

Hai buddies,The following procedure can be used to find whether there are any blocks in the sql server.The procedure if run in Master database , can be used like any other system stored procedure from any database.The output of the proc will contain the followingSPID OF RUNNING APPLICATIONAPPLICATION NAMEEXECUTING DATABLOCKED (Y/N)BLOCKING SPIDBLOCKING APPLICATIONEXECUTING DATA (BLOCKING […]

3.67 (3)

You rated this post out of 5. Change rating

2007-09-09

3,692 reads

Technical Article

Return comma seperated values from multiple record

It helps you in situaions whenever you wish to create commm seperated values actually originating from multiple records. Say, your query return three records in folloing patter:Student_Name=============RickyAdamMathewBut, say you wish to have records in following patter:Student_Name============Ricky, Adam, MathewThat is how it works. Try it...I beleive it will help you  a lot

You rated this post out of 5. Change rating

2007-09-07 (first published: )

469 reads

Technical Article

Smart data archiving stored procedure

This stored procedure uses a series of input parametes to generate, and optionally execute a series of SQL commands to move production data to an archive table.  The procedure assumes that the production and archive tables will have the same structure.  The procedure uses the following input parameters:@SourceTable:  This is the name of the table […]

You rated this post out of 5. Change rating

2007-09-05 (first published: )

3,975 reads

Technical Article

Mirroring Job Switcher

I wrote this so that jobs associated with a mirrored database will run on the principal and not on the mirror.  Please send your comments on what implications I might be missing - I would appreciate that greatly.This procedure works in conjunction with a WMI alert you will setup in SQLSEVERAGENT -> Alerts ->Mirroring Status […]

You rated this post out of 5. Change rating

2007-09-04 (first published: )

466 reads

Technical Article

Clean up default constraints

The script scrapes out all default constraints (optional for particular column, table or script generation for the whole db) in SQL Server 2005 manner. Based on: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsqlpro2k/html/sql00a11.asp

You rated this post out of 5. Change rating

2007-09-03 (first published: )

579 reads

Blogs

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

A Little Brainstorming with an AI

By

I was asked to do some a little thinking and brainstorming recently. Rather than...

Read the latest Blogs

Forums

MEMORYBROKER_FOR_RESERVE experience

By tony28

Hi, Does anyone have experience with MEMORYBROKER_FOR_RESERVE ? when suddenly there is somehow constantly...

Moving Database Files

By Ahr Aitch

I just learned that my database was created on my C:\ drive in the...

Migrate MSSQL to MYSQL - Different Servers

By cajun_sql

I am needing to migrate a MSSQL db to MySQL, on a different server...

Visit the forum

Question of the Day

Mixed Backups

I have a complex database with a few filegroups and files. Can I run a backup command like this? (assume file/filegroup names are valid).

BACKUP DATABASE [complex]
    FILE = N'thirdone'
 ,  FILE = N'thirdtwo'
 ,  FILEGROUP = N'second' 
 TO  DISK = N'C:\Program Files\Microsoft SQL Server\MSSQL16.SQL2022\MSSQL\Backup\complex.bak' 
 WITH NOFORMAT, NOINIT,  NAME = N'complex-Full Database Backup', SKIP, NOREWIND, NOUNLOAD,  STATS = 10
GO

See possible answers