Scripts

Technical Article

Grant rights easely to a role /user

This simple script shows how to easely grant rights to user objects (tables,stored procedure,user-defined functions) to a role (public in example), in SQL Server 2000.The script can be used to grant rights to a specific NT /sql login account by replacing [public] with the desired name.

β˜… β˜… β˜… β˜… β˜… β˜… β˜… β˜… β˜… β˜…

You rated this post out of 5. Change rating

2003-05-16

446 reads

Technical Article

Convert String to Title Case

This function will evaluate an input string and convert it to title-case format. It uses the delimchars parameter to determine what are the triggering characters to indicate capitalization of the subsequent character.I am using it in a DTS package to convert data in CAPS to Title/Proper case as I output the data to an Excel […]

β˜… β˜… β˜… β˜… β˜… β˜… β˜… β˜… β˜… β˜…

You rated this post out of 5. Change rating

2003-05-15

416 reads

Technical Article

How to retrieve roles from a Database

If you have environment where you restrict access to database objects based on user roles and if you have a lot of databases on different servers in the same domain.Β  The following script can generate roles from a given database in a format that can be used to create roles on different servers where the […]

β˜… β˜… β˜… β˜… β˜… β˜… β˜… β˜… β˜… β˜…

You rated this post out of 5. Change rating

2003-05-14

183 reads

Technical Article

Script to kill the top blocker and report what it was doing.

This script identifies the blocking locks at the top of the blocking chain and kills them. Specifically, it reports what the top blocking spids are doing, kills them, waits three seconds and then reports on current blocking status.Β  If you have a situation where single connections are causing a huge blocking chain and you want […]

β˜… β˜… β˜… β˜… β˜… β˜… β˜… β˜… β˜… β˜…

4.75 (4)

You rated this post out of 5. Change rating

2003-05-12

4,333 reads

Technical Article

How to get ColumnNames, datatypes and length

This is a followup to the script submitted by srallapalli. One can return a record set of all tables in a database using the following:USE MyDatabaseSELECT so.name AS TableName, sc.name AS ColumnName,Β  st.name AS ColumnDatatype,Β  convert(int, sc.length) AS ColumnLength FROM syscolumns sc, sysobjects so , systypes st WHERE so.type='U' AND OBJECTPROPERTY(so.id,'ismsshipped') = 0 AND sc.id=so.id […]

β˜… β˜… β˜… β˜… β˜… β˜… β˜… β˜… β˜… β˜…

You rated this post out of 5. Change rating

2003-05-10

142 reads

Blogs

A New Word: Ochisia

By

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

Create a Numbers Table in Power Query

By

This is a quick blog post, mainly so I have the code available if...

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...

Read the latest Blogs

Forums

It's The People

By Grant Fritchey

Comments posted to this topic are about the item It's The People

To View or not to View, that is the question...

By pietlinden

I've read lots of the horror stories about nested views in databases where they're...

Grant user read-write permission to a single database

By PJ_SQL

Hello! How do I grant a user to read-write to a single database and...

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