Quantcast
Channel: SQL scripts – TryCatchFinally.net
Browsing latest articles
Browse All 5 View Live

Return a list of all dates between a start and end date

In some situations, you'll need to work with a list of numbers or dates that are between some start or end, and you don't have a complete list handy for joining to. Using the script below, you can...

View Article


Image may be NSFW.
Clik here to view.

Export from SQL Server to XLS and email results

Sometimes you want to take some query results and export them directly to an XLS file - here's how you can set that up in SQL Server. The biggest caveat is that you need to run it from an x86 instance...

View Article


Refreshing changed .NET SQL CLR assemblies after patching/updates

After applying some Windows updates to one of my servers, I started getting the following error when I ran a customer .NET SQL-CLR stored proc: Server: Msg 6522, Level 16, State 2, Line 1 A .NET...

View Article

Querying Active Directory from SQL Server

SQL Server provides some pretty flexible integration with Active Directory through the ADSI Linked Server provider, something that's present by default when you install SQL Server. If you've never used...

View Article

View SQL Server table updates per second

When trying to guage the level of database activity, you can use SQL Profiler to view the type and volume of transactions in motion at any given time and to view the overall level of database IO, but...

View Article

Browsing latest articles
Browse All 5 View Live