Scripts

Technical Article

Setting permissions (Updated: UDF's now set)

Here is a script I wrote to automate updating of permission on a database. Often running as sa I forget to set the rights for objects when distributing db objects. It provides the capability to process only certain object types, and whether or not to print and execute the persmissions change or just print out […]

You rated this post out of 5. Change rating

2002-11-22

449 reads

Technical Article

Grant/Revoke EXEC permissions  for all procs in DB

Useful in dev environments when you need to periodically assign execute permissions on all procs in a db (drop/create scripts may have been run without re-assigning permissions)Accepts DB name, ProcLike for matching 'starts with' pattern against proc names in DB, revoke (optional - defaults to 0/True) specifies wheter to GRANT or REVOKE permissions

You rated this post out of 5. Change rating

2002-11-21

394 reads

Technical Article

Monitoring SQL Server downtime

The following script creates a monitoring utility to find out for how long a sql server was down prior to the latest startup. The script creates one table (tblHeartbeat), four stored procedures (uspFillHeartBeat, uspGetDowntimeSummary, uspCleanHeartbeat, uspAtStartup) and two jobs (FillHeartbeat and CleanHeartbeat).Notes:1. By convention I introduced in my company (UGO Networks, Inc.) all "service" database […]

You rated this post out of 5. Change rating

2002-11-21

809 reads

Technical Article

Creat a Pivot Table with several options

Create a pivot Table similiar to Microsoft Access Pivot Command, Specify if there should be totals at the bottom, right or both..Uses a temporary table to hold the values..Bad part is the SQL that is generated can have no more than 4000 Characters..If not using any NVARCHAR characters, could make the sql up to 8000 […]

You rated this post out of 5. Change rating

2002-11-18

2,007 reads

Technical Article

ps_SearchStoredProcedures

ps_SearchStoredProcedures provides a "find utility" to search for string in Stored Procedure(s) that you select without dumping to a SQL script file. This stored procedure returns a list of the stored procedures that the string was found in and list of line numbers where the text was found. Both parameters of the stored procedure allow […]

You rated this post out of 5. Change rating

2002-11-15

399 reads

Technical Article

Split Delimited String (Updated: Multi char delimeters)

This UDF will take a delimited string and split it into a table. It has an identity field that is provided solely for uniqueness on the rows, but that can be removed to improve the speed, and optimize it. Sample call :dbo.fnSplit(, )@Data - the string to split apart@Delimiter - the seperator string, if DEFAULT […]

You rated this post out of 5. Change rating

2002-11-15

1,111 reads

Technical Article

DBA_EverywhereRun

Runs a SQL statement against each database based on a LIKE pattern for the name of the database.Features:* IsLike and IsNotLike parameters let you specify both a matching pattern and an exclusion pattern for the database name.* Script_Only mode generates the script of what the stored proc executes.  Especially useful for DDL statements.* List_Only mode […]

You rated this post out of 5. Change rating

2002-11-14

389 reads

Blogs

Why use XACT_ABORT?

By

This came up one day at my work when a developer was using it....

Using AI for Data Conversion

By

I’m sure I’ve never mentioned that I’m an amateur radio operator. Like Vegans and...

Advice I Like: Tipping

By

When in doubt, overtip – from Excellent Advice for Living This is close to...

Read the latest Blogs

Forums

How Much AI Code Would You Use?

By Steve Jones - SSC Editor

Comments posted to this topic are about the item How Much AI Code Would...

Browsing for Instances

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Browsing for Instances

Creating a Date Dimension (Calendar Table) in SQL Server

By Noman072

Comments posted to this topic are about the item Creating a Date Dimension (Calendar...

Visit the forum

Question of the Day

Browsing for Instances

I have a SQL Server instance that is not listening for connections on port 1433. By default, all ports are locked down on my server, except for the SQL Server port. What can I do to allow users to connect to the instance without knowing the port?

See possible answers