• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 103
  • Last Modified:

SQL Server 2012 CLR stored procedure - how to

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
gbzhhu
Asked:
gbzhhu
  • 4
  • 3
1 Solution
 
Éric MoreauSenior .Net ConsultantCommented:
1
 
gbzhhuAuthor Commented:
Thanks Eric.

Perfect article for my need.  Reading it up and will feedback here.
0
 
gbzhhuAuthor Commented:
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Éric MoreauSenior .Net ConsultantCommented:
it would really help me if you could report what is incorrect!
0
 
gbzhhuAuthor Commented:
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
 
Éric MoreauSenior .Net ConsultantCommented:
it doesn't change anything else. Check the script, you will be convinced!
0
 
gbzhhuAuthor Commented:
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.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now