Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

SQL Server 2012 CLR stored procedure - how to

Posted on 2016-08-05
7
Medium Priority
?
98 Views
Last Modified: 2016-08-05
I want to write code that checks count and properties of files on an SFTP server from SQL Server SSIS package. As far I know the easiest way to do this without scripting is to use CLR in a stored procedure.  Being very familiar with C# I can write the code easily but I need to understand deployment.

Do I need a reference to the DB.  When I do that I get a gazillion errors.  I am also worried about overwriting changes to my DB. I just want to add the new Stored Procedure.  Please advice how this is done usually

thanks
H
0
Comment
Question by:gbzhhu
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 2000 total points
ID: 41744232
1
 
LVL 12

Author Comment

by:gbzhhu
ID: 41744345
Thanks Eric.

Perfect article for my need.  Reading it up and will feedback here.
0
 
LVL 12

Author Comment

by:gbzhhu
ID: 41744436
Eric,

That is exactly what I did! Same as in your article but my DB is not new.  So what does publishing do my DB?  That is what I am wondering.  I guess I can test with a new DB that I create.  I need to test it on server not local as other things can go wrong
0
Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

 
LVL 70

Expert Comment

by:Éric Moreau
ID: 41744451
it would really help me if you could report what is incorrect!
0
 
LVL 12

Author Comment

by:gbzhhu
ID: 41744462
Nothing is incorrect!  I am wondering if the publish only adds the CLR objects defined in the project and doesn't change anything else in the DB
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 41744478
it doesn't change anything else. Check the script, you will be convinced!
0
 
LVL 12

Author Comment

by:gbzhhu
ID: 41744494
Thanks Eric.

Your article helped me.  Maybe update your article because it says that "your database will be created"  To say changes will be applied to your DB or something along those lines.

Thank you again for the awesome article
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have a large data set and a SSIS package. How can I load this file in multi threading?
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question