I am new to SSIS and am facing an issue with reading a File from a remote server
I have a Flat File Connection defined at the Project level where the ConnectionString is defined by a variable say #AbsoluteFilePath.
The value of #AbsoluteFilePath is calculated at run-time to a UNC say :
\\myserver\myfolder\myfile.txt
I have a Web Application which invokes execution of the package.
I am able to view the file folder as a logged in user however the execution of the package ends in an error while reading the file.
The execution fails with error message of return code 0XC020200E
I tried mapping my UNC \\myserver\myfolder to Z: on the machine where SQL 2012 is running. However this too gives me the same error.
Is using UNC advisible in SSIS ? What is the standard way of doing this task ?
Following is the complete workflow I am trying to achieve :
Complete Picture
User picks a file on the web front end. the web application saves the
file at a shared drive and invokes the SSIS package to run. the SSIS
package reads the file from the shared drive and performs required
action it.
Update : Explaining Permissions and running SSIS package from stored procedure
Web Application X runs on a server server-web
SSIS package Y runs on a server server-ssis
accesses database on a server server-database
accesses UNC where on a server server-filesystem
The package is being run by executing a stored procedure by running a stored procedures mentioned here http://msdn.microsoft.com/en-us/library/ff878099.aspx
the connection string used by server-web is of the form
Data Source=server-ssis;Initial Catalog=SSISDB;Integrated Security=SSPI;
I'd bet dollars to dumplin's this is a permissions issue (besides the fact a search for 0XC020200E yields hits on file permissions).
Check the permissions for the account that is running the web application. It needs to be granted permissions to the share. It works with your account or the logged in user but that is probably not the same account that is running the package.
#user1826905 you were right, using a SQL Agent Job to invoke the SSIS package proved to be the simplest way of invoking the SSIS package from a web application.
This link http://msdn.microsoft.com/en-us/library/ms403355.aspx gives out two different way of invoking SSIS packages
using SQL Agent Job
using a web service
There is a third way of invoking SSIS which I was trying using stored procedures http://msdn.microsoft.com/en-us/library/ff878099.aspx but has an issue when working across multiple server hops kerberos delegation explained here
We are still struggling over using this approach to access the UNC due to accessing changing to Anonymous user after the hop
Related
Scenario: Read Excel file from a shared folder on a different domain
Issue: SSIS Package works fine when run manually from SQL server but when I tried to run it using SQL job it fails.
The solution is Kerberos Authentication configuration between two domains so that the SQL Server Job agent can access the shared folder from another domain.
I am working on my first SSIS package that connects to a SQL server. While I am developing it, I am connecting using Windows authentication which works fine since my Windows user name was added to the security of the database I am working on. Now, my IT department created a service account to deploy the package with. My question is, how can I change the user name/password of the connection before I deploy it? Is there a configuration file that the connection can read from? How can this be handled?
You actually have two security contexts here to be concerned with. The first is the account required to deploy the package or project you've created. The second is the account required to be able to execute the package you've created.
End-to-end Windows Authentication (deployment, execution and data sources)
The deployment account would need to have correct permissions to the server or filesystem on which it will reside. The execution account may be configured with a very different set of permissions, primarily related to the permissions required to execute whatever tasks you've built into the package.
In order to deploy the package under a different user that your own, it may be as simple as opening an application (like Command Prompt, Windows Explorer or SSIS Deployment Utility) as that user account and moving the package to the correct location. This can be handled on your workstation or the server.
For the execution account, you have options depending on how you're going to operationalize the execution of the package. Here's a few scenarios:
If you will have the package be executed by the SQL Server Agent and the account you need to execute the package with is the SQL Server Agent service account, you only need to create the job to run the package. Unless otherwise programmed, packages called from a SQL Agent job will run as the SQL Agent account
If you will have the package be executed through a SQL Server Agent job and the account you need to use for executing the package is NOT the SQL Agent service account, you can create an SSIS Proxy Account and specify that in the SSIS Package execution job step. After creating the credential inside SQL Server, it is as simple as changing a dropdown.
If you will be using command line execution from a SQL Agent job, the above two scenarios are still applicable.
If you will be using another mechanism (like Windows Scheduler or another Enterprise Scheduling tool) that uses a command line execution-like method, you should still be able to have that process "run as" the execution account.
Windows Authentication for deployment and execution only (SQL authentication for data)
The above details still apply for executing SSIS packages via jobs and/or command line, but you will need to pass the username and password to the connection manager at the time the package runs. You have several options to do this and should follow any established patterns or standard your organization has in place. SSIS has long supported using an XML-based .dtsConfig file which can be read into the package at run-time. There is a GUI within SSDT/BIDS that will lead you through the process of creating the file and telling it which package properties you want it to be able to configure.
A word of caution
Be careful when you're trying to SAVE sensitive information inside SSIS packages. There is a property named PackageProtectionLevel which can be set at the project and package level. By default, it is set to EncryptSensitiveWithUserKey. Now, don't let this property trick you into thinking the entire package is encrypted. It is not. This setting specifically refers to how SSIS will handle properties that are typed as sensitive. For example, the passwords in the connection managers are typed as sensitive information. SSIS will encrypt that field so that it doesn't store passwords in plain text. But it ONLY pertains to saving/storing the package. You can pass in plain text through a variable or configuration file that will be read into a sensitive field (like a password) at run-time.
If you need to be able to save a password with the package you've developed, I would recommend changing the PackageProtectionLevel to EncryptSensitiveWithPassword and setting it to something your team is able to remember or uses to protect other assets. Once that setting is in place, you will be able to check the "Save Password" box within the connection manager and have that go where ever the package goes. If you don't need to save that password with the package, change the property to DontSaveSentitive. Like I mentioned, you can still pass in credentials through configurations or other means, but it won't be stored INSIDE the package itself.
I have an SSIS package that I am attempting to set up as a SQL Server Agent Job. This package takes XML files and inserts/ updates records in Dynamics CRM 2011. In my development environment, the execution works correctly. However, when deployed to the server (which is the same domain as the database concerned), when executing a System.MissingMethodException is thrown.
The machine definitely has the DynamicsCRM2011.dll in the GAC - this machine has both the database and teh instance of CRM2011 running on it. On my test machine, I was connecting to this server (which is on a different domain) without incident. I get the same issue for all users whether integrated security is used or not.
The files are correctly read, this error is happening when declaring the CRM service and assigning a new Helper from the service (CRM2011.Proxy.Helper).
Any ideas?
Are you sure u added the dll in GAC? You can copy the dll in the same folder as the SSIS Package.
I have an ETL on SSIS fully running, and created cubes via SSAS with success, deployed and processed.
I can run the ETL, the process&deploy ssas via Visual Studio, all works
Now i'm trying to put the cube processing in the ETL, with "Analysis Services Processing Task", 3 of them: "process dimensions","process cubes","process database".
I get the error:
[Analysis Services Execute DDL Task] Error: The following system error occurred: A specified logon session does not exist. It may already have been terminated.
With the two possible configurations of the connection to SSAS:
If the ssis "Analysis Services Processing Task" is connected to the ssas project (that is in the same solution).
And even when i change the connection in the "Connection Manager" to "Create a connection to a computer running Analysis Services", in which set the server: .\SQLSERVER2008R2, location blank, integrated security, database catalog set, teste connection with success. Then i updated the configuration files with the connection string, just to be sure.
The only way around is to run etl tasks only, deploy the ssas project via Visual Studio (where i'm prompted to insert my windows user password!), then run the ssas tasks of the ssis package, after this the ssas task in ssis runs successfully.
UPDATE: I've changed the connection to windows authentication, test is ok. But still same error when i run the ssis task...i've never seen nothing like this
How are you executing your SSIS package? That error is usually related when running through a windows task, and bound to a security policy having the "Run whether user is logged on or not" security option on the General Tab. I am referring to the following :
In the case of running through a task, you can try disabling the policy and see if the problem still occurs
However it is not clear what you are using the execute the SSIS.
This does not qualifies as an answer, more of a workaround.
The problem is that visual studio does not store or retrieve the password in the data source of a SSAS. I tried checking the "save password", manually insert the password in the dtsConfig file, but still get the error, and the password is blank in the edit section of the connection.
What i did was generate the xmla via Deployment Wizard, which as to be executed manually the first time before the ETL runs, this way my SSAS tasks in the SSIS run with no stress.
Side note: SSAS & SSIS are like the ugly cousins of microsoft developments tools, they are far behind the other project types/technologies microsoft has.
I've run into this twice now where I can run my SSIS package in BIDS and Integration Services but it fails when it's run through SQL Server Agent. Both of these packages transfer a file as a final step to a folder on our network.
The error I receive is Could not find a part of the path then the path and file name. When I schedule them in Windows Task Scheduler they execute fine but I'd rather have them run through sql server agent.
Has anyone run into this issue and found a work around? Is there a setting that I'm missing in sql server?
Any help would be appreciated.
You need to run the SQL Server job using a proxy account that is configured to run jobs of type SQL Server Integration Services Packages. The jobs usually run under SQL Server Agent Service account, which does not have access to network folders. To access network folders, you need to set up a proxy with a domain account credentials (preferably) so you can access network path.
Below answer in SO question has the detailed steps on how to set up a proxy account
How do I create a step in my SQL Server Agent Job which will run my SSIS package?