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,823 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

315 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

233 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,873 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,283 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

852 reads

Blogs

The Book of Redgate:A Prehistory

By

I’ve covered the values in a number of previous posts on the Book of...

Evidence-bound: what AgentDBA will and won’t link

By

When the evidence names the database, it says so. When it doesn’t, it stops....

Prep data for AI vs. Fabric Data Agent Instructions: What Goes Where?

By

Making Data AI-Ready, Part 3 (This is the final article in a three-part series...

Read the latest Blogs

Forums

DanDan Jl Panjang Cidodol | WA:083121526888

By Layanan BCA 24 JAM

Jl. Cidodol Raya No.46, RT.6/RW.6, Grogol Sel., Kec. Kebayoran Lama, Kota Jakarta Selatan, Daerah...

DanDan Kavling Polri | WA:083121526888

By Layanan Bank BCA

Kavling Polri, Jl No.1601 Blok F 8, RT.8/RW.02, Jelambar, Grogol petamburan, West Jakarta City,...

Toko Kosmetik Sumber Ayu | WA:083121526888

By Layanan Bank BCA

Pasar Tomang Barat (Pasar Kopro) Lt Dasar Blok B-48, RT.14/RW.5 (depan parkiran motor), Tanjung...

Visit the forum

Question of the Day

Hyperscale Replicas III

In an Azure SQL Database Hyperscale Edition, how many named replicas can be configured?

See possible answers