Scripts

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 […]

(1)

You rated this post out of 5. Change rating

2003-02-10

1,795 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

274 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:

(1)

You rated this post out of 5. Change rating

2003-02-06

212 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 […]

(10)

You rated this post out of 5. Change rating

2003-02-06

5,837 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 […]

(3)

You rated this post out of 5. Change rating

2003-02-05

1,263 reads

Technical Article

No more orphan users!

I was fed up of manipulating sysusers after restoring a db from one server to another.Just put thgis script on QA after restoring db. It will check all db users (not tested for secure connections) and will restore orphan users. Check it out!Hope this script will help.

(1)

You rated this post out of 5. Change rating

2003-02-03

830 reads

Blogs

SQL Server 2025 RegEx and AI

By

One of the language changes in SQL Server 2025 that I’ve seen a lot...

T-SQL Tuesday #192: SQL Server 2025 Backup Changes

By

I hosted this month, but I decided to put my own entry in as...

Why Databases Still Fascinate Me

By

I get asked a lot about why or how I began working with databases...

Read the latest Blogs

Forums

Call Center Agoda

By sqlnoobie

Nomor telepon call center Agoda: (0811) 222143 atau (0811) 222611. Hubungi Untuk Refund Dan...

Call Center Agoda Indonesia

By sqlnoobie

Layanan Bantuan Planggan 24 Jam Call Center Agoda Indonesia Hubungi WhatsApp: 0811 222 143....

Kenapa cashback saya tidak masuk di Agoda

By sqlnoobie

Untuk melakukan klaim cashback, Silahkan menghubungi Agoda melalui WhatsApp di nomor: 0811 222 143.

Visit the forum

Question of the Day

Identify a Slipstream Installation

I get a new SQL Server instance from my build team. How can I tell if the instance was installed using a slipstream installation later?

See possible answers