Clinton Herring

Format a DOS date as yyyymmdd

Do you run jobs that call BAT files where you wish you could include a formatted date stamp in the output name of an OSQL file? Well, you can using the DOS 'FOR' command. I named a variable FILEDATE and use it as: path\Filename_%FILEDATE%.txt (Note: A BAT file requires double %% in the 'FOR' command […]

4.5 (2)

2002-10-21

1,070 reads

sp_CompareTblCnts

This stored procedure does a quick table comparison between 2 databases that are supposed to be the same. Tables found on either db but missing from the other are reported as are record count differences for matching tables. Establish a linked-server with appropriate permissions to compare across servers. Compile in master.

2002-10-09

114 reads

sp_GetUserInfo

Returns database user information as a runnable script for the specified database. The default is master. Great for restoring user access and permissions after a restore to a development server. Run prior to the restore and save the output to an sql file.

2002-10-09

1,018 reads

Find and replace column constraints

I submit this script as an example of how one might go about generating 'Alter Table' statements that find and replace specific column constraints. In my case I had to find all occurrences in a production db of suser_name() as a column constraint and replace it with suser_sname(). This script is only an example and […]

2002-10-08

223 reads

sp_spaceused2

An update to sp_spaceused2. This update fixes some problems related to dbs that are non-accessible such being offline. This stored proc can be run from any database when compiled in master and can report information on all databases at once. Get information on all dbs, one db, one db and all its tables or one […]

2002-02-19

273 reads

Blogs

What you need to know About Azure SQL backup

By

Most of DBA are coming from On-premise Database Servers they know very well How...

Social: Respecting Names

By

This is a non-technical post, and my opinion. If you don’t want to read...

Proud to present at this year’s VMworld 2020 conference

By

I’m thrilled to support and participate in this year’s VMworld 2020 conference, which is...

Read the latest Blogs

Forums

slow query

By thenewbee

Hi All, I have some issue with a slow running query and im quite...

How to be an MVP

By Kathi Kellenberger

Comments posted to this topic are about the item How to be an MVP

rename sa

By ramyours2003

i want to  rename the sa login with different name , is the jobs...

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers

Question of the Day

BDC Storage

See possible answers