Posts

Showing posts from January, 2012

SQL SERVER – Introduction to CLR – Simple Example of CLR

Image
CLR is abbreviation of Common Language Runtime. In SQL Server 2005 and later version of it database objects can be created which are created in CLR. Stored Procedures, Functions, Triggers can be coded in CLR. CLR is faster than T-SQL in many cases. CLR is mainly used to accomplish task which are not possible by T-SQL or can use lots of resources. CLR can be usually implemented where there is intense string operation, thread management or iteration methods which can be complicated for T-SQL. Implementing CLR provides more security to Extended Stored Procedure. Let us create one very simple CLR where we will print current system datetime. 1) Open Microsoft Visual Studio >> Click New Project >> Select Visual C# >> Database >> SQL Server Project 2) Either choose from existing database connection as reference or click on Add New Reference. In my example I have selected Add New Reference. 3) If you have selected existing reference skip to next step or a...

SSRS Data Driven Subscriptions Job Names

Image
When you create and schedule a Data Driven Subscription for a SQL Server Reporting Services (SSRS) report a job is created with a very meaningless name.    The name is actually a uniqueidentifier and is stored as such in the dbo.Schedule table in the ReportServer database.    I was recently asked if it was possible to use the Job Name to identify the Report associated with the job.    After a little digging I was able to produce the following query, which associates the Job Name with the Report Name: SELECT              s . ScheduleID Job_Name ,              su . Description  Subscription_Description ,              c . Name Report_Name FROM  dbo . Schedule s INNER   JOIN  dbo . ReportSchedule rs         ...

Detailed Overview SSIS Transformations

Detailed Overview SSIS Transformations