Maintenance and Management

Technical Article

Replace Object Owner

  • Script

This SP is used to identify and replace the owner of the database objects. This SP will give display object id, object name, owner id, owner name and concatenate object + owner name with brackets. SP does change the owner for the following objects. SP should available in "master" database to execute in more than […]

You rated this post out of 5. Change rating

2005-12-06 (first published: )

320 reads

Technical Article

Grant EXECUTE permission to users

  • Script

This procedure will assist in granting execute rights to a database user to all the stored procedures in a database The parameters to this procedure are the databasename and the username to whom EXECUTE rights need to be given to The assumption here is that the user already has access rights to the database mentioned […]

You rated this post out of 5. Change rating

2005-05-05 (first published: )

221 reads

Technical Article

Update statistics in all database (sp_updatestats)

  • Script

This script permit executes the sp_updatestats in all databases at same time.First I create the stored procedure above in an admin database, for sample I create one database with ADMIN name where I put all administration objects create for me. You can create this sp in exist db, if you want.Now you can execute this […]

4.5 (2)

You rated this post out of 5. Change rating

2005-04-14 (first published: )

4,151 reads

Technical Article

Find maximum values for all "int" columns

  • Script

/******************************************************** "CheckAllInts" Find all columns in all user tables in a database defined as "int", and get the maximum value for the column. Uses a cursor and logs the results to a table. (One-time CREATE TABLE statement at top of script). Successive runs over an appropriate period of time would allow one to find how […]

You rated this post out of 5. Change rating

2005-04-11 (first published: )

295 reads

Technical Article

shrinking logs: how much data will be reclaimed

  • Script

This script will show you how much diskspace can be reclaimed by shrinking all the logfiles of userdatabases using a DBCC SHRINKFILE(2) command. Often the spacegain is much smaller then expected. SQL Shrinks logfiles the end of the file until it finds the active part of the logfile. (If the active part of the logfile […]

You rated this post out of 5. Change rating

2005-03-21 (first published: )

426 reads

Technical Article

Automated Profiler trace import

  • Script

This stored procedure was written to complement the automated profiler trace create procedure (should be here somewhere - check the scripts).Bascially, given the database (sample script to create the database included, but you may want to personalize it), this stored procedure will import the tracefile content into the table, which is indexed on expected search […]

You rated this post out of 5. Change rating

2005-10-03 (first published: )

362 reads

Technical Article

Automated Profiler trace Create

  • Script

This stored procedure is created to be invoked (in my case by SQL Server scheduled job), and will then create a tracefile to a specified file location (ensure that if this is NOT local, your SQL Server Agent runs on a domain account that has access to that drive. The Stored procedure will create files […]

You rated this post out of 5. Change rating

2005-03-16 (first published: )

433 reads

Technical Article

Set Extended Properties for Every Table

  • Script

Extended properties are a neat feature in SQL Server 2000 that let you set meta data for an individual object. This stored procedure is a baseline sproc that lets you set the properties of every object in a DB to a given value. For example, if you baseline your database at 1.5.0, you can set […]

You rated this post out of 5. Change rating

2005-03-02 (first published: )

195 reads

Technical Article

SQL Server Database File Sizes

  • Script

This script creates a SQL_Statistics table in the Mater Database and then scroll through the existing databases on the server and gathers the Servers Name, logical device name, the file name and the file size and writes it to the table alond with a date time stamp.We run it once a month to gather the […]

You rated this post out of 5. Change rating

2005-02-22 (first published: )

532 reads

Blogs

Monday Monitor Tips: CIS Compliant

By

A new feature added to Redgate Monitor Enterprise automatically. CIS compliance is something many...

My 2024 in Data: Music

By

This is my last week of the year working (I guess I come back...

A New Word: Suente

By

suente– n. the state of being so familiar with someone that you can be...

Read the latest Blogs

Forums

Vendor claims unused table space impacts performance

By webrunner

Hello experts, I got a report from an application owner of degraded performance for...

Automating Export of PowerQuery to SQL Server using DAX Studio...?

By pietlinden

I wrote a PowerQuery that parses a table from a PDF, and I want...

Attaching an SQL Server database without Transaction Log Files through SQL Server Management Studio.

By Noman072

Comments posted to this topic are about the item Attaching an SQL Server database...

Visit the forum

Question of the Day

Superseded Indexes

Which of these indexes is superseded by another?

See possible answers