Maintenance and Management

proc to order xp_enumerrorlog

  • Script

this is a quick stored procedure I put together when trying to find a log for a particular day (xp_enumerrorlogs returns the archive is as a varchar, so 1 is followed by 11, 12 etc rather than 2) sp_display_errorlogs with no parms returns output in archive id order. if the parm 'size' is passed in, […]

2007-09-21

395 reads

Extract More Than 1000 Active Directory Accounts

  • Script

This is a simple method to load a SQL database with active directory account information without running into the 1000 record limit.  You will need to change the SERVERNAME, PORT, DATABASENAME, USERID, AND PASSWORD values in the connection strings to your own values.  You will also need to change the LDAP connection string values ('LDAP://SERVERNAME/ou=OUName,dc=host,dc=domain,dc=tld') […]

5 (2)

2011-11-21 (first published: )

2,795 reads

Get User Info

  • Script

Returns database user information as a runnable script for the specified database. Great for restoring user access and permissions after a restore to a development server. Run this T-SQL script and copy the output to you favorite editor.Needed an easier way to script the user info than Enterprise Manager. Found a script by Clint Herring […]

5 (1)

2007-07-12

818 reads

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)

2007-06-21

257 reads

Blogs

Updated Pluralsight Course – Managing the Kubernetes API Server and Pods

By

My updated course “Managing the Kubernetes API Server and Pods” in now available on Pluralsight here! If...

Daily Coping 11 May 2021

By

I started to add a daily coping tip to the SQLServerCentral newsletter and to...

What do you do when technology changes? : T-SQL Tuesday #138

By

Our host for this month’s TSQL Tuesday is Andy Leonard (blog|twitter). He’d like us...

Read the latest Blogs

Forums

high CPU

By sqlguru

CPU Usage was running very high than normal. Identified the top query, so removing...

SSRS Report Subscription Fails (Failure sending mail) due to column contents

By street9009

I've had this problem rear its head before but not in some time. There's...

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers