SQLServerCentral - www.sqlservercentral.com

A community of more than 1,600,000 database professionals and growing

Featured Contents

The Voice of the DBA

What's in your CLR?

Today we have a guest editorial from Jeff Moden, the anti-RBAR crusader himself,  with an interesting Friday poll. This was originally published on Dec 11, 2009.

I'm really curious so I thought I'd conduct a bit of a survey.  If you have the time and the inclination, I'd sure love to see your thoughtson this.  Thanks folks. :-)

OK, the following occurred during another person's Q&A with a well known SQL Server MVP...

Q: Considering those who are using SQLCLR, what are the biggest or most common problems? What do developers need to watch out for?

A: SQLCLR should not be looked at as a panacea. It's not going to solve all of your problems, but when properly applied, it will solve many of them. Developers like to jump on a new technology and ride it—for better or for worse—as far as it will take them, and the SQLCLR world is no different. I've heard horror stories about developers rewriting an entire application worth of stored procedures using SQLCLR, causing memory problems and severely limiting scalability. This is not the correct use case for the technology; just like with any other tool, it should be used in moderation, in situations in which it’s appropriate.

The above Q&A is part of a teaser for the PASS conference but it does bring up a couple of questions of my own...

1.  What's in YOUR CLR?  In other words, what have you written a CLR for?  What did it do?  If you don't use CLR's, why not?

2.  If you have written CLR's, why did you write them (or it)?  Was it because you didn't know how to do item 1 above in T-SQL, it couldn't be done in T-SQL, or because it was more performant as a CLR or something else?

3.  Looking back at it, was it an appropriate thing to do?

4.  Even if you haven't written a CLR, what would you consider a CLR to be appropriate for?  Please be a bit specific if you can and if you have the time.  Saying something like "math intensive tasks" or "string manipulation" tasks is what most people say but there's a lot of those things that can easily be done in T-SQL. 

For this Friday poll, what would you consider a task that should done in a CLR instead of T-SQL and why?

Jeff Moden from SQLServerCentral.com

Join the debate, and respond to today's editorial on the forums

ADVERTISEMENT
SQL Monitor

New SQL Monitor Reporting Module

SQL Monitor now includes a new Reporting module. It allows you to create customized reports, combining the individual server performance metrics available in SQL Monitor with summary information on your entire SQL Server estate. These reports can then be exported to pdf and emailed to you on a scheduled basis. Download SQL Monitor now and get a 14 day free trial

Redgate Hub

The best career move you can make

On the new Redgate Hub, we’ve gathered together a wealth of information to help you solve problems, share ideas and discover the latest insights. Whatever you need to know about to advance your career, the answer is probably right here. Move to the Redgate Hub

Featured Contents

 

The ABCs of Database Creation

Brandie Tarvin from SQLServerCentral.com

Creating SQL Server databases is easier than the internet may lead us to believe. More »


 

Introduction to Azure SQL Data Sync

Additional Articles from Database Journal

The majority of Azure SQL Database related features reach their General Availability (GA) stage relatively quickly. There are however, some exceptions. The most prominent example in this category is likely Azure SQL Data Sync, which has remained in Preview since its introduction 7 years ago. Fortunately, there are signs that this service might be finally reaching production-ready state. In thius article, Martin Policht will introduce its main characteristics. More »


 

From the SQLServerCentral Blogs - DevOps Basics–Git log

Steve Jones from SQLServerCentral Blogs

Another post for me that is simple and hopefully serves as an example for people trying to get blogging as... More »


 

From the SQLServerCentral Blogs - Performance is bad. Did you change anything recently? No. Are you sure?

Kenneth Fisher from SQLServerCentral Blogs

Ever have this conversation? Dev: Hey, can you help me? The performance on my application is terrible all of a sudden. DBA:... More »

Question of the Day

Today's Question (by Steve Jones):

I want to determine if ANSI PADDING is turned on or off in my database. Which code should I run?

Think you know the answer? Click here, and find out if you are right.


We keep track of your score to give you bragging rights against your peers.
This question is worth 1 point in this category: SET Options.

We'd love to give you credit for your own question and answer.
To submit a QOTD, simply log in to the Contribution Center.

ADVERTISEMENT

Exam Ref 70-768 Developing SQL Data Models

Prepare for Microsoft Exam 70-768–and help demonstrate your real-world mastery of Business Intelligence (BI) solutions development with SQL Server 2016 Analysis Services (SSAS), including modeling and queries. Designed for experienced IT professionals ready to advance their status, Exam Ref focuses on the critical thinking and decision-making acumen needed for success at the MCSA level. Get your copy today from Amazon.

Yesterday's Question of the Day

Yesterday's Question (by Steve Jones):

I want to create a new LocalDB instance on my machine called "SQLCI". What command should I use?

Answer: SQLLocalDB Create "SQLCI"

Explanation:

The SQLLocalDB executable is used with the create parameter.

Ref: SQLLocalDB - click here


» Discuss this question and answer on the forums

Database Pros Who Need Your Help

Here's a few of the new posts today on the forums. To see more, visit the forums.

SQL Server 2016 : SQL Server 2016 - Administration

Distributed Availability Group error message - Hello, I am trying to execute below code and for the <primary_server_instance> and  <secondary_server_instance> values I have it as "MSSQLCLUSTER" because that's...


SQL Server 2016 : SQL Server 2016 - Development and T-SQL

Evaluating use of InMemory tables... Why is it slower than temp tables? - I created a table like this CREATE TABLE blahblahblah(   LeafLevelDatasetId  INT NOT NULL IDENTITY(1, 1),   DateKey   INT NOT NULL,   SafeRegionKey ...

Difference in row-size between what was expected and what was — can anyone explain please? - Hi everybody, I am creating a table that will be the basis of a fact table for a cube. I...


SQL Server 2014 : Administration - SQL Server 2014

Standard to Enterprise Edition upgrade or reinstall - I just installed a new SQL 2014 Standard Edition with Rpt Services and Analysis Services and realized I installed Standard...

Stop SSMS providing the server name - Hello All, Can someone please advise if there is a way to stop SSMS providing the server name automatically in the...


SQL Server 2014 : Development - SQL Server 2014

Bit vs. Int in return code - Hello, Can a bit be used when validating for a return code?  Or should int be used?  Why or why not?

Getting rid of duplicate records - Hi All, I have a table that stores schedule events. One event can be scheduled more than one time in one...


SQL Server 2012 : SQL 2012 - General

Encyrption - hide definitions - I have a db  on an instance where someone else is the sysadmin. What steps  can I take to hide my...

Transaction log full error - The database is in simple mode and when I try to shrink the log USE db1

sql script backup - EXECUTEsp_msforeachdb 'USE IF DB_NAME() NOT IN(''master'',''msdb'

SSRS Subscriptions - I have a SSRS report. I have setup a subscription to the for the report which is rendered to Excel...

VLFs on AlwaysOn primary replica after log backup from secondary - I was working on a job to send me info each morning about database file free space and was noticing...


SQL Server 2012 : SQL Server 2012 - T-SQL

Can I make this query to perform better? - I am just curious if there a way to make this query perform better? I had statistics io and time...


Cloud Computing : SQL Azure - Development

Store Procedure Problem - When i am running first time sp it will take 30 sec and second time it will execute 1 sec. My...


Reporting Services : Reporting Services

Report Builder - Where or Having Using Parameters - Maybe this has been answered before, but I can't seem to find what I need. I have a SQL statement that...

Allow Multple Values parameter - how to send an empty array - Hi, When adding a new parameter to report, there is an option Allow multiple values. If this option is checked, then the...


Programming : Connecting

Cannot see tables in Linked Server (ProvideX) - System: W7, SSMS 2017, SQL server express 2014 Server: 2012 R2, MAS100 2017 provideX I can run run queries just fine (ish),...


Programming : SSDT

SSIS synchronization, find new rows and save them for later - System: SQL Server Express 2014 64bit, Sage 100 2017 4.5 provideX  I am trying to sync my AR_InvoiceHistory and ...


Data Warehousing : Integration Services

Precedence Constraints and Config Files - Here's a question kind of out of left field. I would appreciate any suggestions if you have any. I have a...

Using parameters in Execute SQL Task - Hmmm...how to best summarize this... I'm writing an SSDT package that: 1) Clones the table schema of a source table query to...

This email has been sent to [email protected]. To be removed from this list, please click here.
If you have any problems leaving the list, please contact the [email protected].
This newsletter was sent to you because you signed up at SQLServerCentral.com.
Feel free to forward this to any colleagues that you think might be interested.
If you have received this email from a colleague, you can register to receive it here.
This transmission is ©2017 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved.
Contact: [email protected]