Quantcast
Channel: SQL Server Integration Services forum
Viewing all 24688 articles
Browse latest View live

[298] SQL Server Error: 258, Shared Memory Error

$
0
0

I've read many articles on this error but still not sure where to start in identifying what is causing this issue.  We continue to see this daily and our SSIS job fails during this time.  I did see someone mentioned timeout setting but the job fails within 1 minute while ssis configured to timeout in 30 minutes and SQL timeout is even longer...

Date6/13/2016 3:48:23 AM
LogSQL Server Agent (Current - 6/13/2016 3:52:00 AM)

Message
[298] SQLServer Error: 258, Shared Memory Provider: Timeout error [258]. [SQLSTATE 08001]


mass export of dtsx files from catalog

$
0
0
Hi. I'm running 2008 r2.  in analogous fashion to automatically scripting all of the engine objects in a database from ssms's wizard to separate files, I'd like to do the same with pkgs sitting in various folders on MSDB on my SSIS server instance.  Is there such a utility or feature that comes with sql server that I can use to export en masse a dtsx file for each pkg on msdb?

SqlServerDataTools several versions on Help About error on Script Component The binary code for the script is not found. Please open the script in the designer by clicking Edit...

$
0
0

Who knows what follows the ellipses "..." . None of these error messages ever seem to be displayed in their entirety. Problem #1.

(Well, problem #1 is "Microsoft-an error has occurred.")

I copied a colleague's script into my task and edited it down to a less-robust piece of code so that I could build on it. When I double click the SSIS component, the edit dialog lets me click an Edit Script... button, bringing me to VSTA Projects and the script text. The base script was created by default, and I added a 

public void Main()

to the 

public class ScriptMain : UserComponent

[I expected the public void Main() would be created by default for me to add my own (well, my colleague's) code, but no.]

There are NO ERRORS INDICATED in the editor after editing and simplifying the code, so I simply close VSTA Projects. What else does this Obfuscated Development Environment want me to do with a Script Component? Is there a Compile button or menu selection? Is there a hidden Errors tab I should look at?

SSIS Package running slow with no reason

$
0
0

Hi All,

I have 169 of 355 packages are running slow than usual. The gap increased from 12 seconds to 110 seconds. I could not be able to find any solution. 

SQL Server 2012 SP3.

select 
  e.project_name,  

e.package_name,

e.start_time,cast(e.end_time as  datetime) as SSISDbcompletedtime

,ssisdbfinishedinss = DATEDIFF(second,e.start_time,e.end_time),

m.DateLog,gap = datediff(SECOND,cast(e.end_time as  datetime),m.DateLog)

  ,e.execution_id

  from SSISDB.catalog.executions e

  join xxxx.xxxx.SSISDBLog m on e.package_name = m.PackageName collate Latin1_General_CI_AS and e.execution_id = m.ExecutionId
  where cast(e.start_time as date) > '2016-5-5'
  and e.folder_name = 'xxxx'
  and e.package_name = 'xxxx.dtsx'

 xxxx.xxxx.SSISDBLog is our log table. we use below code to get package finish time while SP running package. the code as followed

-- Create Instance of package
 EXEC [SSISDB].[catalog].[Create_execution] 
            @package_name=@packageName, 
            @execution_id=@executionId output, 
            @folder_name=@folderName, 
            @project_name=@projectName, 
            @use32bitruntime=false 

EXEC [SSISDB].[catalog].[set_execution_parameter_value] 
        @executionid,  
        @object_type=50, 
        @parameter_name=N'SYNCHRONIZED', 
        @parameter_value=1; -- true

-- Set our package parameters
EXEC [SSISDB].[catalog].[set_execution_parameter_value] 
        @executionid,  
        @object_type=50, 
        @parameter_name=N'DUMP_ON_EVENT', 
        @parameter_value=1; -- true

EXEC [SSISDB].[catalog].[set_execution_parameter_value] 
        @executionid,  
        @object_type=50, 
        @parameter_name=N'DUMP_EVENT_CODE', 
        @parameter_value=N'0x80040E4D;0x80004005';

EXEC [SSISDB].[catalog].[set_execution_parameter_value] 
        @executionid,  
        @object_type=50, 
        @parameter_name=N'LOGGING_LEVEL', 
        @parameter_value= 1; -- Basic

EXEC [SSISDB].[catalog].[set_execution_parameter_value] 
        @executionid,  
        @object_type=50, 
        @parameter_name=N'DUMP_ON_ERROR', 
        @parameter_value=1; -- true


      -- Assign parameters to the instance of package
          EXEC [SSISDB].[catalog].[Set_execution_parameter_value] 
            @executionId, 
            @object_type=30, -- package parameter 
            @parameter_name= 'AuditKey', 
            @parameter_value= @auditKey


EXEC [SSISDB].[catalog].[Start_execution]

            @executionId

             SELECT @validationMessage = CASE  WHEN [status] = 1 THEN 'created'

             WHEN [status] = 2 THEN 'running'

             WHEN [status] = 3 THEN 'canceled'

             WHEN [status] = 4 THEN 'failed'

             WHEN [status] = 5 THEN 'pending'

             WHEN [status] = 6 THEN 'ended unexpectedly'

             WHEN [status] = 7 THEN 'succeeded'

             WHEN [status] = 8 THEN 'stopping'

             WHEN [status] = 9 THEN 'completed'

             END

             FROM [SSISDB].[catalog].[executions]

             WHERE execution_id = @executionId

INSERT INTO [Control].[SSISDBLog]([AuditKey],[ProjectName]     ,[FolderName],[PackageName],[Message],[DateLog],[ExecutionId])

SELECT @AuditKey,@projectName, @folderName, @packageName, @validationMessage,Getdate(),@executionId



Shawn



Trouble using an or statement with a boolean value

$
0
0

I am trying to create a derived column where if

A = 1  or B = 1 or C = 1 then D will = 1

(DT_I4) A == 1  ?  1  :  0   -  this will work for just one column however as soon as I add a new column with an | | statement it errors

(DT_I4)([A== 1 | | B == 1)  ? 1  :  0

How do I download a file on the web to a .zip file

$
0
0

So I understand the fundamentals...

http://microsoft-ssis.blogspot.com/2011/05/download-source-file-from-website-with.html

How do I specify a .zip file to download to? Do I hard code within the C# Script?

// Download file and use the Flat File Connectionstring (D:\SourceFiles\Products.csv)
                // to save the file (and replace the existing file)
                myConnection.DownloadFile(Dts.Connections["myProductFile"].ConnectionString, true);

How do I specify the path and file name? I'm assuming where "myProductFile" is...

Package task won't populate all fields unless that task is run independently

$
0
0

I'm running SQL8 R2.
I have a package which pulls data from our production server into our data warehouse for several tables. 

One table that is built in the process depends on an earlier table being populated, from which it should be retrieving an Admission Date and a Discharge Date.

When I run the solution (created in SQL Server Business Intelligence Development Studio) it appears to run fine but in 1 table the dates are populated as NULL.  After the solution has completed I can right click on the Execute SQL Task component in the Control Flow and when it completes the dates are now populated with the expected data.

I thought maybe something wasn't "completing" from an earlier task so I set all of the constraint values to Completion (previously they were on Success).  That did not help.

I thought maybe it was a timing issue so I added a 10 second delay and that did not help.

Am I missing some kind of "commit" that needs to run between the components?

How to load xls & xlsx files with a Single DFT

$
0
0

hello friends,

I have two excel files: xls & xlsx format with same structure

I want to load these two files using a single Data Flow Task. And these files are coming on a regular basis.

please help me creating the package.

Regards,

Mohammed Aala


automate attachment from email to table?

$
0
0

Hi experts,

I am consuming from 'Adobe Analytics - omniture' ... I had an ftp, and exported regularly a csv, and with SSIS inserted it to a table.

Problem now is that security is asking us to stop using the FTP as export for security reasons (?! ftp represents a risk??)

The issue is that now I need to:

1-get an attachment from an email

2-insert the attached csv to a table

3-delete email.

What's the best approach for this? SSIS, powershell? can this be done from tsql itself? Anyone knows an already implemented example?

Any piece of advice is welcome, thanks!

Difference Integer to Double (DTS) Column Copy and Integer to Double SSIS Data Coversion

$
0
0

Greetings, I am converting a DTS package to SSIS, and data from a SQL Server table is being column copied (no transformation) from SQL to a dbase III table. I am using a compare utility (WinMerge)  to compare the .dbf table/file from the DTS package result to the new SSIS package result and seeing differences in how an integer column is transformed and stored in the file. In the DTS package, the source  (SQL Server) is an Integer, the destination (dbase III table Jet oledb 4.0 provider) it is a Double. In the SSIS  package, the source (SQL Server) it is four byte signed integer (DT_I4), the destination(again Jet oledb 4.0 provider)  is a double preceision float (DT_R8).  The issue I am having, is the column result from DTS stores a 0 value for instance as 0.00000 but out of the SSIS package, it is storing the result as a 0 with no scale/decimals. Both the DTS and SSIS package delete and recreate the dbase III table, and the definition for the column is numeric(5,0).   Although the numeric values are the same, I would like the compare to be clean and was hoping someone could help me with how to resolve this if possible? How can I force SSIS to store the value in the same format as the original package? I would like to understand why this is happening. Thanks

SSIS packages not able to see them in integration service catalog.

$
0
0
   

Hi,

I have integration service catalog where create catalog option is disabled but clr is enabled and no ssisdb catalog is there.

But there are ssis packages running on this server .can any one please let me know how to get the packages.

Please let me know if you have any questions.

Thanks

                                                                    

Conditional Split - or operator - does not work

$
0
0

Hi community,

I have a "conditional split" in my SSIS package, the condition is written as (TableStatus != "Submitted") || (TableStatus != "Complete"). Output name is set as "NoSubmitNoComplete". The "NoSubmitNoComplete" is also pointing to the destination table.

It never worked, the "Submitted" and "Complete" tables still go through ETL into my database. Do you guys have any idea why?

Mel

how to Unzip to specific folder

$
0
0

Can someone help me with the argument on how to put the unzipped file to specific location.

Here's my Executable and arguments

Executable: C:\Program Files\7-Zip\7z.exe

Arguments: e "abc.zip" -aoa

This argument puts the unzipped files in same directory, how can I put it to specified location using arguments?

Thanks


sree

How to check sql connection in ssis package

$
0
0

Hi

I want checking  sql server connection before run query and execute task. how can i check it?

thanks

Package runs fine when local machine is ON but not when OFF in server

$
0
0

Hi,

I have developed a SSIS package which imports data from access database. It's working fine in my local system and working fine when configured in SQL Job until my local system is ON.

When I turn off my system the job starts to fail.

I have used SQL authentication for connection string and declared it in an expression.

I'm getting the error "

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. "

Please help me.


about connection string

$
0
0

in the script task in ssis i want to connct to sql server and get query how can connect to it? The below code is mine but it has mistake.

On Error Resume Next
        Dim ObjCnn As SqlClient.SqlConnection
        Dim SqlStr As String
        Dim Objcmd

        ObjCnn = CreateObject("ADODB.Connection")

        Objcmd = CreateObject("ADODB.Recordset")

        SqlStr = "exec sp_who"

        ObjCnn.ConnectionString = "Provider=SQLOLEDB.1;integrated security=SSPI;data source=" & Dts.Variables("User::NamServer").Value.ToString() & ";persist security info=False;initial catalog=" & Dts.Variables("User::NameDataBase").Value.ToString()


        ObjCnn.Execute(SqlStr)

        If Err() > 0 Then

            Dts.TaskResult = ScriptResults.Failure
        Else
            Dts.TaskResult = ScriptResults.Success
        End If

Problems by executing a Package of SSIS from a Job in SQL Server

$
0
0
Hi there

I got a problem by deploying a SSIS package in SQL Server 2014.
I have created two different environment: Testing and Development.
Just for now, the SSISDB is in the same server with the testing environment. From the project folder I am able to execute the process without any inconvenient for both the environments. But when I execute the job I receive a error message for the Development Environment (wich is in another server).

My questions are, why can I execute the process for Development from the Testing server without any problem within the Project Folder in SSISDB, and what can I do in order to fix this problem? I am new in this kind of tasks.

Regards.

Why is my C# Script blowing up?

$
0
0

I have a pretty simple SSIS C# Script which attempts to unzip and store a .zip file.

#region Help:  Introduction to the script task
/* The Script Task allows you to perform virtually any operation that can be accomplished in
 * a .Net application within the context of an Integration Services control flow.
 *
 * Expand the other regions which have "Help" prefixes for examples of specific ways to use
 * Integration Services features within this script task. */
#endregion


#region Namespaces
using System;
using System.Data;
using Microsoft.SqlServer.Dts.Runtime;
using System.Windows.Forms;
using System.IO.Compression;
using System.IO;
#endregion

namespace ST_1f613bef25864d8cb0aded9bf64e60dd
{
    /// <summary>
    /// ScriptMain is the entry point class of the script.  Do not change the name, attributes,
    /// or parent of this class.
    /// </summary>
	[Microsoft.SqlServer.Dts.Tasks.ScriptTask.SSISScriptTaskEntryPointAttribute]
	public partial class ScriptMain : Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTARTScriptObjectModelBase
	{
        #region Help:  Using Integration Services variables and parameters in a script
        /* To use a variable in this script, first ensure that the variable has been added to
         * either the list contained in the ReadOnlyVariables property or the list contained in
         * the ReadWriteVariables property of this script task, according to whether or not your
         * code needs to write to the variable.  To add the variable, save this script, close this instance of
         * Visual Studio, and update the ReadOnlyVariables and
         * ReadWriteVariables properties in the Script Transformation Editor window.
         * To use a parameter in this script, follow the same steps. Parameters are always read-only.
         *
         * Example of reading from a variable:
         *  DateTime startTime = (DateTime) Dts.Variables["System::StartTime"].Value;
         *
         * Example of writing to a variable:
         *  Dts.Variables["User::myStringVariable"].Value = "new value";
         *
         * Example of reading from a package parameter:
         *  int batchId = (int) Dts.Variables["$Package::batchId"].Value;
         *
         * Example of reading from a project parameter:
         *  int batchId = (int) Dts.Variables["$Project::batchId"].Value;
         *
         * Example of reading from a sensitive project parameter:
         *  int batchId = (int) Dts.Variables["$Project::batchId"].GetSensitiveValue();
         * */

        #endregion

        #region Help:  Firing Integration Services events from a script
        /* This script task can fire events for logging purposes.
         *
         * Example of firing an error event:
         *  Dts.Events.FireError(18, "Process Values", "Bad value", "", 0);
         *
         * Example of firing an information event:
         *  Dts.Events.FireInformation(3, "Process Values", "Processing has started", "", 0, ref fireAgain)
         *
         * Example of firing a warning event:
         *  Dts.Events.FireWarning(14, "Process Values", "No values received for input", "", 0);
         * */
        #endregion

        #region Help:  Using Integration Services connection managers in a script
        /* Some types of connection managers can be used in this script task.  See the topic
         * "Working with Connection Managers Programatically" for details.
         *
         * Example of using an ADO.Net connection manager:
         *  object rawConnection = Dts.Connections["Sales DB"].AcquireConnection(Dts.Transaction);
         *  SqlConnection myADONETConnection = (SqlConnection)rawConnection;
         *  //Use the connection in some code here, then release the connection
         *  Dts.Connections["Sales DB"].ReleaseConnection(rawConnection);
         *
         * Example of using a File connection manager
         *  object rawConnection = Dts.Connections["Prices.zip"].AcquireConnection(Dts.Transaction);
         *  string filePath = (string)rawConnection;
         *  //Use the connection in some code here, then release the connection
         *  Dts.Connections["Prices.zip"].ReleaseConnection(rawConnection);
         * */
        #endregion


		/// <summary>
        /// This method is called when this script task executes in the control flow.
        /// Before returning from this method, set the value of Dts.TaskResult to indicate success or failure.
        /// To open Help, press F1.
        /// </summary>
		public void Main()
		{
            String CMSNPIZipFileName = Dts.Variables["User::CMSNPIFileName"].Value.ToString();
            String CMSNPIFilePath = Dts.Variables["$Package::CMSNPIFileLocation"].Value.ToString();

            using (ZipArchive file=ZipFile.OpenRead(CMSNPIZipFileName))
            {
                foreach(ZipArchiveEntry entry in file.Entries)
                {
                    entry.ExtractToFile(Path.Combine(CMSNPIFilePath,entry.FullName));
                }
            }

            File.Delete(CMSNPIZipFileName);

			// TODO: Add your code here

			Dts.TaskResult = (int)ScriptResults.Success;
		}

        #region ScriptResults declaration
        /// <summary>
        /// This enum provides a convenient shorthand within the scope of this class for setting the
        /// result of the script.
        ///
        /// This code was generated automatically.
        /// </summary>
        enum ScriptResults
        {
            Success = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Success,
            Failure = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Failure
        };
        #endregion

	}
}

And this is the error I am getting when I attempt running my SSIS Package and seems really cryptique to me...

 at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
   at Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTATaskScriptingEngine.ExecuteScript()

Can anyone help me out here???

Thanks for your review and am hopeful for a reply.

Batch processing Transnational Data Suggestions

$
0
0

Hello,

I have a requirement where Data comes in flat file format.  This data need to go through various step of transformations and lookup . I have broke down the process in steps.  1. Stage 2. Collect Needed Data 3. Validate Data 4. Store Them in incremental order for Future use. 5. Generate More transaction related to incoming rows. 6 Send it to Target system.  

Through out the process data will be going across many tables and servers and i have following requirement.

1. I need to create process so that in case of failure  if data has not gone through all steps  and in to target system i need  process to start from where it left off and finish processing the data to target.  ( Requirement ask not to use Check Point in SSIS)

2. In case failure require to process that same file again then all data should be wipe Cleaned in step 1 to 5 and new file should process  

I have looked in to batch processing so in all steps batch ID will be there but need better suggestions. Please let me know if you have any suggestion or route i should avoid.

Support

$
0
0
how much cost SSIS-Support or Sql Server per Hour?
Viewing all 24688 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>