Scripts

Technical Article

Custom Log Shipping using VB.NET

This is a first version of a custom solution for SQL Server log shipping using VB.NET 2005 and .NET Framework v.2.0. The script has to run on a server where you have SQL Server 2005 (or at least tools) installed because it uses new SMO. For some functions of the script you will have to […]

1 (1)

You rated this post out of 5. Change rating

2007-06-22 (first published: )

1,126 reads

Technical Article

Find Orphan Logins in SQL Server2000

Hi,exec sp_change_users_login 'report' displays the list of orphan USERS in a database but we don't have any builtin SP which displays the orphan LOGINS.By Orphan Logins (not users), I mean the Logins that don't have any access to any databases and are sitting idle on the server (also aren't member of any fixed server role).We […]

5 (1)

You rated this post out of 5. Change rating

2007-06-21

266 reads

Technical Article

Get DBObjects with Specified Owner

A database can have objects with multiple owners. The script will give you the list of all the TABLES, VIEWS and PROCEDURES having the specified owner. Just input the owner name and it will give you the list of all the Objects with that owner. This scope of the script is limited to the TABLES, […]

You rated this post out of 5. Change rating

2007-06-21 (first published: )

291 reads

Technical Article

Non repetable random number generation script

Some time back i had the requirement for a SP which will give non repeatable random numbers with in a range. Following SP accepts a range and gives the random numbers. Once the numbers are exhausetd NULL, will be the out put. In this case user can restart the random number generation by passing 1 […]

You rated this post out of 5. Change rating

2007-06-20 (first published: )

228 reads

Technical Article

Add Enterprise Manager registrations quickly

Use this Perl script to add Enterprise Manager registrations from a text file. The text file should contain three fields seperated by spaces. The first two fields are the server groups you want to create, and the last is the server name. ex...Production Accounting ACTPRSQL01QA Accounting ACTQASQL01The script also goes out and registers all SQL […]

You rated this post out of 5. Change rating

2007-06-19 (first published: )

288 reads

Technical Article

Use of regular expressions in TSQL

This script creates 2 new system functions :fn__testregexp(@String,@Pattern) returns int    execute the method test(@String) on the regular expressions @Pattern    returns :        0 : no match        1 : match        null : one of the parameters was null        anything else : error from sp_OA procedure        fn__replaceregexp(String,@Pattern,@Replace) returns varchar    execute the method Replace(@String,@Replace) […]

5 (2)

You rated this post out of 5. Change rating

2007-06-14 (first published: )

1,914 reads

Technical Article

SP_WHO_3 Powerful Filtering/Sorting Very Efficient

Hello,I posted this a while ago to several web sites. Someone found an obscure bug in it and I fixed it (newest script attached below). When I posted it to you last time, it didn't show up in any of the categories that I had checked; hmmmm? However, when I searched google, you have it […]

5 (2)

You rated this post out of 5. Change rating

2007-06-13 (first published: )

1,832 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