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

299 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,793 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

810 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

254 reads

Blogs

Good to see you at Houston Tech Fest 2019!

By

It was awesome to see a great crowd at the triumphant return of Houston...

Using kubectl logs to read the SQL Server Error Log in Kubernetes

By

When working with SQL Server running containers the Error Log is written to standard...

Using Powershell for SQL Saturday Logos

By

Out of necessity are born the tools of laziness.  This is a good thing. ...

Read the latest Blogs

Forums

2nd Server min requirements for transaction log shipping & reducing license cost

By guht

I will have a 64-bit 2008 R2 SQL Server Standard edition acting as the...

how to hide the passsword in the log file when the package fails.

By mcfarlandparkway

I have an encryption and decryption package and the keyId public and private from...

CREATE DATABASE 3 seconds for one server, 72 for the other?

By iosman123

Hello,   We have two IaaS VMs in Azure and a CREATE DATABASE statement...

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers