Solved

SQL Server 2012 CLR stored procedure - how to

Posted on 2016-08-05
7
50 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
  • 4
  • 3
7 Comments
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 500 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

821 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