Scripts

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

266 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

205 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,787 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,243 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.

4 (1)

You rated this post out of 5. Change rating

2003-02-03

825 reads

Blogs

A New Word: Ochisia

By

ochisia – n. the fear that the role you once occupied in someone’s life...

Microsoft finally adds Tenant Switcher for Fabric / Power BI

By

Praise whatever deity you believe in, because it’s finally here, a tenant switcher for...

Microsoft Releases Windows 11 ARM ISO – A Game Changer for ARM-Powered Devices

By

Yesterday, Microsoft released the highly anticipated Windows 11 ARM ISO image, marking a major...

Read the latest Blogs

Forums

Table Delete

By Bruin

I have a very large table and I'm looking to do a cleanup based...

Creating paginated report where each page is a month in the range selected

By plsh

With in the paginated report I am trying to display on each new page...

Upgrading SSIS and SSRS from SQL Server 2016

By Deni Kusdeni

Hi All, I have plan to upgrade SSIS and SSRS from SQL Server 2016,...

Visit the forum

Question of the Day

The Density Vector

When building statistics, there is the concept of density that refers to the duplicates in a table. How is this calculated?

See possible answers