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

335 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

816 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

256 reads

Blogs

ASF 032: Jennifer Stirrup interview

By

Introduction Jennifer Stirrup is a data strategist and technologist, Microsoft Data Platform Most Valuable...

SQL Server Express Size Limit

By

My Pluralsight course for new SQL Server DBAs   (Needs to upgrade to a...

Daily Coping 2 Jul 2020

By

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

Read the latest Blogs

Forums

Adding NOT NULL to column with existing rows causes page bloat

By timoq

Hi, I'd like to know why the page count is almost exactly doubled for...

Stretch database

By mtz676

Is there anything similar to a stretch database in mysql where an on-premise mysql...

Partitioning Heaps

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Partitioning Heaps

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers