Scripts

Technical Article

Script and Export (via BCP) SQL Tables

Script via OLE Automation and Export via BCP.  Check for existance of object, checks count of table with count of exported file (reads BCP output).  Will do DBCC UPDATEUSAGE if at first the SQL record count does not match BCP count.  Full options for scripting (with w/o indexes, Referential integrity, etc).  REQUIRES ADMIN ACCESS - […]

5 (2)

You rated this post out of 5. Change rating

2004-04-15

2,476 reads

Technical Article

SP to search String in TEXT of SPs

Well this is an addendum to my earlier post for searching a specific string in all the Stored Procedures defined in a database and returning the name of the stored procedure in which it is contained. This is optimized based on suggestion of Greg and I thank him for his advise.

4 (1)

You rated this post out of 5. Change rating

2004-04-09

495 reads

Technical Article

Write Text File

Adapted from Rodrigo Acosta's script which exports to a text file the text of SPs.  Parameters are the table/view name (may include a WHERE clause) , the output file path/name, and an optional list of fields (may include user-defined functions,cast/convert,etc..., the default is '*').

You rated this post out of 5. Change rating

2004-04-06

601 reads

Technical Article

SP to find text in code objects in all user db's.

This script creates a stored procedure which helps to find text in all of your code objects in all your databases. It searches the code of SP's, UDF's, views, triggers, and it searches in all databases.Output is a result set with DbName, ObjectName and ObjectType.Advantages are- works reliable also with source codes longer than 4000 […]

You rated this post out of 5. Change rating

2004-03-31

272 reads

Technical Article

Script object or user permissions

script useful for copying permissions from one database to another like test to production.Tim Stahlhut SEE sp_helprotect for params meaning Note: If you wish to script system object permission remove 'IsMSShipped' block of code. Fixed missing code & re-formatted it to look better.

You rated this post out of 5. Change rating

2004-03-26

337 reads

Technical Article

Search For SPs which contain a specific String.

This Stored Procedure is for Searching all the user defined Stored Procedures in a database for the existence of a specified string . This is especially useful when you have changed some Column name and want to Find the Column Name in all the Stored Procedures where it is used, so it will return you […]

You rated this post out of 5. Change rating

2004-03-26

822 reads

Technical Article

Function To Retrieve Last Index

This Function Enables the user to retrieve the Last Index of the character/string in a predetermined string.Eg If you want search for the Last Occurance of 'SQL' in 'SQL SERVER2000 USES ANSI SQL' thenSELECT dbo.LastIndexOf('SQL SERVER2000 USES ANSI SQL','SQL')will return 26.Tested Only in SQL SERVER2000

5 (3)

You rated this post out of 5. Change rating

2004-03-25

2,769 reads

Blogs

Spark Connect Dotnet November 2024 Where are we?

By

All Spark Connect Posts Introduction There have been quite a few changes in the last...

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

Read the latest Blogs

Forums

Writer methods in PowerQuery (LOL)

By pietlinden

I'm using PowerQuery in Excel on my desktop. (Yeah, I know you can do...

Need help with GROUP BY...

By iamjoe

Here's my data... I am trying to return total days in status for each...

Need help with GROUP BY...

By iamjoe

Here's my data... I am trying to return total days in status for each...

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