[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

stored procedure does not fire from ASP.NET after site is deployed

Posted on 2014-04-16
1
Medium Priority
?
327 Views
Last Modified: 2016-02-10
I have a stored procedure that fires an SSIS package from a button click event on an asp.net C# web site.  The sql server that the SSIS package is deployed on is a server on the network.  The sql server is not on my development machine.  When running the website in debug mode from the development machine, the stored procedure fires correctly.  After deployment, the stored procedure does not fire.  No error messages, just nothing.

Here is the code to fire the stored procedure:

 public partial class frm_Import : System.Web.UI.Page
    {
        private String strConnString = ConfigurationManager.ConnectionStrings["SSISString"].ConnectionString;


        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Button1_Click(object sender, EventArgs e)
        {

            using (SqlConnection _conn = new SqlConnection(strConnString))
            using (SqlCommand _cmd = new SqlCommand("dbo.execute_ssis_package_sample", _conn))
{  
   _cmd.CommandType = CommandType.StoredProcedure;

   _cmd.Parameters.Add(new SqlParameter("@output_execution_id", SqlDbType.Int));
   _cmd.Parameters["@output_execution_id"].Value = 5; // whatever value you want

   _conn.Open();
   object result = _cmd.ExecuteScalar();
   _conn.Close();

   

}
    }

Here is the Connection string:

 <add name="SSISString" connectionString="Data Source=SERVERNAME\MS2012;Initial Catalog=master;Integrated Security=true" />


When I use sql server authentication In the connection string I get a error that windows security is required.  

Again, I get no error message with the existing code.  it just does nothing after deployment, but works fine on the development machine.
0
Comment
Question by:rtay
1 Comment
 
LVL 51

Accepted Solution

by:
Mark Wills earned 2000 total points
ID: 40005828
Sounds like it is unable to resolve the windows user / security issues.

On top of that there are SSIS roles and more importantly the SQL Server Agent roles.

I am guessing that in dev you are part of a privileged group ?

So... two MS articles to check : http://technet.microsoft.com/en-us/library/ms141053.aspx and http://technet.microsoft.com/en-us/library/ms188283.aspx

And a fairly thorough walkthrough : http://armordba.wordpress.com/2013/04/29/executing-a-sql-server-2012-ssis-package-with-a-proxy-account-with-least-rights-across-domains/

Now, the links above are for 2012 (in the TechNet versions, use the drop down the get to the correct version). The last one uses SSISDB being 2012 and you might need to adjust for MSDB in earlier versions.
0

Featured Post

Fill in the form and get your FREE NFR key NOW!

Veeam is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

Question has a verified solution.

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

Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
What if you have to shut down the entire Citrix infrastructure for hardware maintenance, software upgrades or "the unknown"? I developed this plan for "the unknown" and hope that it helps you as well. This article explains how to properly shut down …
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses

834 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