SQL CLR Deployment Issue - sql

Hi I am new to this SQL CLR. I have created a SQL CLR project and complies without any errors. When I try to deploy the code I am getting this below error,
.....\bin\Debug\xxx.sql(85-85): Deploy error SQL01268: .Net SqlClient Data Provider: Msg 701, Level 17, State 11, Line 1 There is insufficient system memory in resource pool 'internal' to run this query.An error occurred while the batch was being executed.
I have Microsoft SQL Server 2008 R2 (SP2) - 10.50.4276.0 (X64) version.
Also when I run the SQL profiler when I deploy this code this deployment stops after this long line of code
CREATE ASSEMBLY [solaceVHI]
AUTHORIZATION [dbo]
FROM 0x4D5A9000030000000400.... 037D0E0100042A1E027B0F0100042A2.... E4A007A0303C2000000008608550E3C...
53716C436F6E746578740053716C5069....
WITH PERMISSION_SET = UNSAFE;
I have enough memory on my SQL server.
The event virewer error log says ... "There is insufficient system memory in resource pool 'internal' to run this query".

Related

Get Error While Job executed by SQL JOB AGENT

I am getting below error while execute SSIS Package with SQL Server Agent. I have use administrator account(proxy) to execute this job.
SSIS Package contain data flow task. I have used ODBC connection as data source and OLEDB connection for data destination.
Data Souce :- AS400 JDE system & Data Destination - SQL Server 2019
SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on ODBC Source returned error code 0x80004005. The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing.There may be error messages posted before this with more information about the failure.End Error DTExec: The package execution returned DTSER_FAILURE (1)
`
Here is the SSIS Log.
Here the some more details.
• SQL Edition: 2019 Enterprise
• OS: Windows 2019 server edition
Issue description:
• I have SSIS Package which connect to JD Edwards database via ODBC Connection
• I have Scheduled SQL Job and one of the step is using above package to load data form JD Edwards
• The job step throw error during execution. Below is the detail description of the error
Executed as user: {DomainName}{UserName}. Microsoft (R) SQL Server Execute Package Utility Version 15.0.2000.5 for 32-bit Copyright (C) 2019 Microsoft. All rights reserved. Started: 12:39:40 PM Error: 2020-06-11 12:40:02.18 Code: 0xC0047038 Source: Data Flow Task SSIS.Pipeline Description: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on ODBC Source returned error code 0x80004005. The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing. There may be error messages posted before this with more information about the failure. End Error DTExec: The package execution returned DTSER_FAILURE (1). Started: 12:39:40 PM Finished: 12:40:02 PM Elapsed: 21.969 seconds. The package execution failed. The step failed.
'
Can Anyone Help in this ?
That log you're looking at must be incomplete. To get all error messages:
USE SSISDB
SELECT * FROM catalog.executions WHERE package_name LIKE 'NameOfYourPackage'
Copy the execution_id of the relevant execution (look at dates and times)
SELECT * FROM catalog.event_messages WHERE operation_id=[execution_id from previous query] AND message_type>110

How to run an SSIS package having excel source on a server where excel is not installed using SQL Server Agent Job

I have an SSIS package that reads data using a custom query and stores it into a target excel source. I am able to run the SSIS package successfully on a server where no excel is installed by doing a right click and selecting the Run Package option. When I add the same SSIS package to Integration services and run the package, it still executes successfully. But, when I schedule the package using SQL Server agent job, it fails with the below error:
"Executed as user: Username. Microsoft (R) SQL Server Execute Package Utility Version 10.50.2500.0 for 32-bit Copyright (C) Microsoft Corporation 2010. All rights reserved. Argument "Excel" for option "connection" is not valid. The command line parameters are invalid. The step failed."
Specification of SQL Server: SQL SERVER 2008 R2
Executing as SQL Server Agent Job.
Tried the following:
1) Checked the 'Use 32 bit' check box under Execution options tab in Step menu and unchecked all the check boxes in Datasources tab. Got the below error:
"Executed as user: Username. Microsoft (R) SQL Server Execute Package Utility Version 10.50.2500.0 for 32-bit Copyright (C) Microsoft Corporation 2010. All rights reserved. Started: 9:44:03 PM Error: 2015-06-08 21:44:04.21 Code: 0xC002F304 Source: File System Task File System Task Description: An error occurred with the following error message: "The device is not ready. ". End Error DTExec: The package execution returned DTSER_FAILURE (1). Started: 9:44:03 PM Finished: 9:44:04 PM Elapsed: 1.219 seconds. The package execution failed. The step failed."
2) Created a proxy account that had sysadmin, public, serveradmin roles. Modelled the package to run as proxy account. Got the below error:
"Executed as user: Username. The process could not be created for step 1 of job (reason: 1314). The step failed."
The command line looks almost similar to the below:
/DTS "\File System\PackageName" /SERVER SERVERNAME /CONNECTION "InputFileConn.xlsx";"F:\Folder\InputFile.xlsx" /CONNECTION "OutputFileConn.xlsx 1";"F:\Folder\Output\OutputFile.xlsx" /CONNECTION "Excel Connection Manager 1";"\"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=F:\Folder\Output\OutputFile.xlsx;Extended Properties=""EXCEL 12.0;HDR=YES"";\"" /CONNECTION "SERVERINSTANCE.DBName";"\"Data Source=ServerInstance;Initial Catalog=DatabaseName;Provider=SQLNCLI10.1;Integrated Security=SSPI;Auto Translate=False;Application Name=SSIS-Package-{D4E09BF5-DF25-3DE7-BCAE-B667C38F85B7}SERVERNAME\SQLSERVER.DatabaseName;\"" /X86 /CHECKPOINTING OFF /REPORTING E
Is it necessary to install excel in the server to make the SQL Server agent job work?
Based on the discussion above, the job was referring to F drive but F is a different drive to expected when running on the server.

Unable to complete login process due to delay in opening server connection in azure Db using ssis

I am using azure db and my ssis package is failing with the below error and also the both the source and destination Database are working fine.
we are using sql2012 and our destination is Azure.
Microsoft (R) SQL Server Execute Package Utility Version 11.0.5058.0 for 64-bit Copyright (C) Microsoft Corporation. All rights reserved. Started: 9:31:13 AM Error: 2014-12-03 09:31:39.32 Code: 0xC0202009 Source: PKG_ Connection manager "Azure_Destination" Description: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005. An OLE DB record is available. Source: "Microsoft SQL Server Native Client 11.0" Hresult: 0x80004005 Description: "Unable to complete login process due to delay in opening server connection". End Error Error: 2014-12-03 09:31:39.32 Code: 0xC020801C
i found a solution for my problem . when I have increased the retry count of the SSIS package it is getting success for the second attempt. I did nt get the permanent fix for this but with this temporary fix I can work on .

SSIS Package Failing on Executing Job

Good Day,
I imported a package from SSIS to SQL to run as a Job.
if i manually execute the Package in SSIS in MSSMS it executes successful
as soon as i run it as a job i get the following error:
Executed as user: NT AUTHORITY\LOCAL SERVICE. Microsoft (R) SQL Server
Execute Package Utility Version 10.50.1600.1 for 64-bit Copyright
(C) Microsoft Corporation 2010. All rights reserved. Started:
12:10:22 PM Error: 2014-08-14 12:10:22.07 Code: 0xC0016016
Source: Description: Failed to decrypt protected XML node
"DTS:Password" with error 0x8009000B "Key not valid for use in
specified state.". You may not be authorized to access this
information. This error occurs when there is a cryptographic error.
Verify that the correct key is available. End Error Error:
2014-08-14 12:10:22.24 Code: 0xC0202009 Source:
TritonFuelImport Connection manager "41.160.218.141.CCManager.sa"
Description: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has
occurred. Error code: 0x80040E4D. An OLE DB record is available.
Source: "Microsoft SQL Server Native Client 10.0" Hresult: 0x80040E4D
Description: "Login failed for user 'sa'.". End Error Error:
2014-08-14 12:10:22.24 Code: 0xC020801C Source: Data Flow Task
OLE DB Destination [15] Description: SSIS Error Code
DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The
AcquireConnection method call to the connection manager
"41.160.218.141.CCManager.sa" failed with error code 0xC0202009.
There may be error messages posted before this with more information
on why the AcquireConnection method call failed. End Error Error:
2014-08-14 12:10:22.24 Code: 0xC0047017 Source: Data Flow Task
SSIS.Pipeline Description: component "OLE DB Destination" (15)
failed validation and returned error code 0xC020801C. End Error
Error: 2014-08-14 12:10:22.24 Code: 0xC004700C Source: Data
Flow Task SSIS.Pipeline Description: One or more component failed
validation. End Error Error: 2014-08-14 12:10:22.24 Code:
0xC0024107 Source: Data Flow Task Description: There were
errors during task validation. End Error DTExec: The package
execution returned DTSER_FAILURE (1). Started: 12:10:22 PM
Finished: 12:10:22 PM Elapsed: 0.187 seconds. The package execution
failed. The step failed.
Can someone Please assist to help me solve this problem?
When you execute the package from Visual Studio, it is run under your user principal. When it's run through the SQL Agent, it's executed under the account SQL Server is set up with (either Local Service or a domain account set up for this purpose). Now, one part of your package (probably a connection manager) has properties called EncryptSensitive and ProtectionLevel (https://msdn.microsoft.com/en-us/library/ms141747.aspx) and by default this is set to your user account.
When SQL Agent tries to execute, it can't decrypt the sensitive data on the connection manager (probably the password) using its own keys. There are two ways of resolving:
Set the Protection level to something different
Create an SQL Agent Proxy with your credentials and set up the job to use that when executing this package (https://technet.microsoft.com/en-us/library/ms189064(v=sql.105).aspx)
There is a property you need to change in visual studio data tools. Have a look in the properties tab, there is an option for encryption of passwords. There are 3 different options from memory. If that doesn't work, try going to security in SQL server management studio then credentials. Then click add credential and add the credential of the user that successfully runs the job. Then in your job step, go into the step and set "run as" to the credential you created. I would also check the advanced tabs of the job step, to make sure the properties for the username and password are correct, sometimes they don't get deployed from data tools and you have to manually add them to the job step run by the agent.

SQL Server Agent 2012 not executing SSIS 2012 package that connects to Oracle but runs OK from SSIS

I've been fighting this for a while now, and tried many things, I am finally overwhelmed.
I had many SSIS packages in SQL Server 2008 working perfectly, bringing data from SQL, MySQL and Oracle. Then I decided to upgrade to SQL 2012 and the packages won't run. I created them all again using VS2010 and they run great from SSIS, but the ones that connect to Oracle do not work. After several errors, I got this:
Executed as user: Domain\UserName. Microsoft (R) SQL Server Execute Package Utility Version 11.0.2100.60 for 64-bit Copyright (C) Microsoft Corporation. All rights reserved. Started: 12:00:00 PM Error: 2014-03-01 12:00:04.25 Code: 0xC0208449 Source: SalesBacklog ADO NET Source [2] Description: ADO NET Source has failed to acquire the connection {01F532A5-4542-4833-9103-5FCAEC4EA4A2} with the following error message: "Attempt to load Oracle client libraries threw BadImageFormatException. This problem will occur when running in 64 bit mode with the 32 bit Oracle client components installed.". End Error Error: 2014-03-01 12:00:04.25 Code: 0xC0047017 Source: SalesBacklog SSIS.Pipeline Description: ADO NET Source failed validation and returned error code 0xC0208449. End Error Error: 2014-03-01 12:00:04.25 Code: 0xC004700C Source: SalesBacklog SSIS.Pipeline Description: One or more component failed validation. End Error Error: 2014-03-01 12:00:04.25 Code: 0xC0024107 Source: SalesBacklog Description: There were errors during task validation. End Error DTExec: The package execution returned DTSER_FAILURE (1). Started: 12:00:00 PM Finished: 12:00:04 PM Elapsed: 3.297 seconds. The package execution failed. The step failed.
My new server specs are:
Platform: NT64
System: Xeon L5520 2.27GHz (16 proc), 66.1GB RAM
OS: Windows Server 2012
DB: SQL Server 2012 - 11.0.2100
I've installed, uninstalled, over and over, in different order, the Oracle 32 and 64 Clients. But no luck.
Lately I strongly believe that my problem might be related to permissions of the SQL Agent to run the package and not a problem with the Oracle Clients. I tried all types of authentications (which are quite confusing at times) and I get another wide arrange of errors.
Is anyone out there with any idea of how should I go about it? I am starting from scratch and I will try every step, all over again. If I find the issue, I'll keep you posted.
Thank you!
After much effort, #billinkc told me all I needed to know: check box for 32bit mode
Open the SQL Agent Job
On the "Steps" section, select the step that executes the SSIS Package that connects to Oracle
Under the "Execution options" tab, check the check box "Use 32bit runtime"
This time though I made sure to deinstall all Oracle Clients and just install the 32bit Oracle Client.