Scripts

Technical Article

Rename SQL Server

Utilizing sp_dropserver and sp_addserver system procedures we will change local SQL Server name to a specified one, or, by default, to the WINS machine name. Just another utility in my DBAservice toolbox database.Notes:1.Tested in SQL Server7.2. In some cases it is necessary to rerun sql server setup in order to start the server after renaming. […]

You rated this post out of 5. Change rating

2003-02-13

362 reads

Technical Article

MetaData_TableDependenceOrder

MetaData_TableDependenceOrder Lists User tables in foreign key dependence order.I use this to determine data load order without having to disable foreign key constraints accepts a database name (required) and an optional comma delimited list of tables to filter the dependency list with. If tablelist is not passed, it returns all tables with a load ranking […]

You rated this post out of 5. Change rating

2003-02-12

144 reads

Technical Article

"RESTORE..... WITH MOVE" all databases on a server

If, like me, you are constantly restoring/moving several databases between multiple environments (development to staging, production to training, etc.), you know how tedious it can get to use EM, or to manually type out all those RESTORE...WITH MOVE statements in QA.Even having a saved script isn't the ideal thing, as you still need to go […]

2 (1)

You rated this post out of 5. Change rating

2003-02-10

1,774 reads

Technical Article

Attaching Multiple Data File

This Stored Procedure can attach multiple data File that have *.mdf or *.ldf Extention ..Example :you have multiple data file on your "c:\SQL_data directory" .. just type this on your query analyzer.. of course you have to be a member of sysadmin fixed server role exec attach_db "c:\SQL_data"

You rated this post out of 5. Change rating

2003-02-08

268 reads

Technical Article

Correction to "drop/recreate objects" script.

Regarding the recent script I submitted (dropping/recreating all procedures/views) - I made an important oversight. I neglected to add a CASE statement in order to make sure that the appropriate type of object was being referenced in the DROP statement.Below is the corrected script:

5 (1)

You rated this post out of 5. Change rating

2003-02-06

206 reads

Technical Article

Job Run Duration

This script gives you an idea on how long the processing time is for your SQL jobs. It will depend on how many records are being retained on the sysjobhistory table (scripts defaults to the last 30 days--may not find any history at all).One may find it useful when there are so many sql jobs […]

4.9 (10)

You rated this post out of 5. Change rating

2003-02-06

5,799 reads

Technical Article

Drop and re-create all stored procedures or views

There are times when you may need to drop and re-create all stored procedures and/or views in your database.  For example, in cases where procedures or views are causing blocked locks or other performance problems, a recent article (http://www.sswug.org/see.asp?s=1166&id=13448) suggested dropping/re-creating procedures and views after a service pack has been installed.  The installation of a […]

1.67 (3)

You rated this post out of 5. Change rating

2003-02-05

1,248 reads

Blogs

Using Flyway Prepare for State-Based Deployments

By

One of the neat enhancements made to Flyway was the addition of state-based workflows...

How I Migrated to Azure PostgreSQL Flex from Single Server

By

I did a couple of posts previously on dumping/restoring Azure PostgreSQL databases and also...

Have a Plan for Your Personal Downtime

By

Most of us know that spending a lot of time on social media and...

Read the latest Blogs

Forums

Unknown Token Received From SQL Server

By RonMexico

I have an issue when a stored procedure is executed from the SQL Server...

SSRS error on sign in ERR_UNEXPECTED

By janvan

Hi All, I have an error coming up when anyone tries signing into our...

Hash Joins IV

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Hash Joins IV

Visit the forum

Question of the Day

Hash Joins IV

What is a hash bailout?

See possible answers