Scripts

Technical Article

Grant Read-only permission to user on jobs

create this SQL as a stored procedure and give user execute permissions on it store procedure. that user will be able to see all the jobs and their associated schedules but won't be able to modify, create or execute job. This is particularly a request most often aske dby developer to view jobs/schedules on production […]

You rated this post out of 5. Change rating

2004-11-15 (first published: )

636 reads

Technical Article

Fix orphan users

some times after restore database, you find your logins and users mapping is lossed and no user can now logon to database using application. I faced that many times. To map all your database users with master..syslogins. save this procedure in current database and execute it. All users will be mapped with logins.

You rated this post out of 5. Change rating

2004-11-12 (first published: )

388 reads

Technical Article

SP_WHO_3 Powerful Filtering/Sorting Very Efficient

SP_WHO_3 is a very powerful utility for all DBAs. It displays processes connected to the system and what they are doing. It can find blocking processes, can return the Input Buffer for everything in the recordset returned, and provides immense filtering and sorting capabilities. It's designed to be extremely efficient, yet it provides many more […]

(1)

You rated this post out of 5. Change rating

2004-11-09 (first published: )

891 reads

Technical Article

Updating multiple rows using single stored proc

The situation arises when we are displaying data in a grid or some other control at front end level, where the user is making corresponding changes in the grid and at last when the user click for update button, the whole changes should be posted back to the database. This can be achieved by two […]

You rated this post out of 5. Change rating

2004-11-04 (first published: )

537 reads

Technical Article

Return a Subset of Data from a Table

The ability to page in SQL Server is one of those things that everyone wants, but can't quite seem to get from Microsoft. Many ideas have been posted, each claiming to be _the_ way to do it. In the spirit of mine is better than yours, I've implemented my own paging scheme.A feature that is […]

You rated this post out of 5. Change rating

2004-11-01 (first published: )

1,427 reads

Technical Article

Create a table of dates

This script creates a table and populates it with information about all dates between a (configurable) start date and end date.It creates a table called MyDates in a database called MyDB in which this is done but the script can be easily edited create the table in whichever DB you want it with whatever name […]

(1)

You rated this post out of 5. Change rating

2004-10-28 (first published: )

332 reads

Blogs

Advice I Like: Failure

By

If it fails where you thought it would fail that is not a failure....

Data Conferences – Worth Every Dollar

By

Some of the best career enhancers you can buy.   Why I Go to...

SQL Server 2025 RegEx and AI

By

One of the language changes in SQL Server 2025 that I’ve seen a lot...

Read the latest Blogs

Forums

SQL 2022 stuck on xp_delete_file

By PJ_SQL

SQL 2022 hangs on xp_delete_file, it works for a while when sever is rebooted...

Select @ for different fields

By bswhipp

I have a need where I need to pass a field name to a...

Getting the Object Code

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Getting the Object Code

Visit the forum

Question of the Day

Getting the Object Code

What happens when I run this on SQL Server 2022 in the AdventureWorks2022 database?

SELECT OBJECT_DEFINITION (OBJECT_ID(N'dbo.uspGetBillofMaterials')) AS [Object Definition]; 
GO 

See possible answers