Maintenance and Management

Technical Article

Find Orphan Logins in SQL Server2000

  • Script

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

Auto Auditing on Tables

  • Script

This is something that I find very useful and saves me a lot of time.This procedure needs to be created on the Database that holds the table that you wish to Audit. This procedure when called will create an audit table based on your source table in a database of your choice. All update/delete and […]

4.75 (8)

You rated this post out of 5. Change rating

2007-10-03 (first published: )

9,229 reads

Technical Article

Monitor Database Growth

  • Script

This code provides a way of monitoring the growth of all your databases within a single instance. The first part is the creation of a monitoring table with the initial load of current databases and sizes. The second part is the SQL that can be put in a scheduled job to automate the growth monitoring.It […]

4.84 (19)

You rated this post out of 5. Change rating

2007-05-16 (first published: )

24,350 reads

Technical Article

Mirroring Job Switcher

  • Script

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: )

465 reads

Technical Article

Refreshing Views and Recompiling Stored Procs

  • Script

When a table is modified by changing the order of fields or changing field type or adjusting field sizes etc, some of the dependent views (or views on views on views :)) may become invalid as they store some metadata in order to run more efficiently. These views would need to be refreshed with new […]

4.86 (7)

You rated this post out of 5. Change rating

2007-04-20 (first published: )

2,014 reads

Technical Article

Audit SQL Logins

  • Script

We have auditors in the building, looking at our security (amongst other things). So, we needed an easy way to generate a listing of the SQL logins, and the permissions into each database on our servers (over 70 if them).This script will generate the listings the auditors wanted.

5 (9)

You rated this post out of 5. Change rating

2007-04-02 (first published: )

5,615 reads

Technical Article

Easily Kill All Users In A Database

  • Script

This simple script (ran from the master database) in Query Analyser removes all the requirements of collating currently connected spids to a database and the need to systematically open a cursor to kill each spid individually by simply placing the database offline, then immediately online.

2 (1)

You rated this post out of 5. Change rating

2007-03-16 (first published: )

366 reads

Blogs

T-SQL Tuesday #180: Good enough is perfect Roundup

By

This month, I prompted bloggers to discuss whether good enough is perfect. Thank you to all...

Using SQL Compare with Read-only Access

By

Recently a customer asked if SQL Compare and SQL Data Compare can be used...

Off to Live 360

By

I am off to Live 360 today, on my last trip of the year....

Read the latest Blogs

Forums

how can i tell if our db2 driver is ms or ibm or other?

By stan

i see this in the definition of a linked server on our wh sql...

normal role member to be able to view list of other role members in his DB

By Senad

Is this even possible ? Tried with grant but to no avail. [sys].[database_role_members] and...

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

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