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

SSIS Send Mail task problem

$
0
0

Hi,

I have got the problem connected with Send Mail Task in SSIS.
The general idea was: sending email alert to different email users. I tried to use Foreach Loop task which loops through dataset (where the emails are stored) and assign different email addresses to SSIS package variable.

When I try to use this task inside Foreach Loop task I receive this error message: "Error: 0xC002F304 at Send Mail Task, Send Mail Task: An error occurred with the following error message: "The parameter 'address' cannot be an empty string."

The SSIS package has variable (string) which is binded with ToLine - property of Send Mail task (it was set up in Expressions tab of Send Mail task). This ToLine property should assign different emails during every loop of Foreach Loop task.

But unfortunately is seems to be not true, because Send Mail task does not allow to assign different values to ToLine property while is in Run-Time.

Have you discovered this quite bizzare Send Mail task behaviour before ??
I appreciate every help and suggestions.

Thanks,Marek


Cannot create Integration Services Catalog

$
0
0

Hi,

So I have a SSIS package that I want to deploy in SSMS and run as a job. But I am not able to create a catalog. It shows the message - 
"The catalog backup file 'C:\Program Files\Microsoft SQL Server\130\DTS\Binn\SSISDBBackup.bak' could not be accessed. Make sure the database file exists, and the SQL Server service account is able to access it. "

I have the following softwares Sql Server 2017 developer edition with Integration Services, SSMS -v18.3, Visual Studios 2017 for SSDT .

The SSISDBBackup.bak file is present in the path C:\Program Files(x86)\Microsoft SQL Server\140\DTS\Binn\ path but SSMS is looking for it in the path C:\Program Files\Microsoft SQL Server\130\DTS\Binn\.

I have tried reinstalling Sql Server with Integration Services, SSMS and SSDT several times
I have checked that I do have write access in the Binn folder.

Could you please help me by suggesting what I should do to solve this issue.? I am stuck on this issue for 2-3 days and the IT service in my office are also not able to help me anymore.

Thank You!

SSIS ETL package container usage question

$
0
0

Hi, 

I have a question,  ssis package needs to loop 100,000 times which container is used?

Thanks!


Red

On Error Redirect Rows ( Failing Rows Redirect and XML)

$
0
0
Hi All,

In My current project, all SSIS Package flow is that, in case of failure It will redirect raw to error table.Error table is having same structure  of original table but only diff between Error and Destination table is that Error table is have datatype Nvarchar for all column with size 4000.

For Example:
-----------

Table:Emp

Empid Int
EmpName Varchar(50)
Salary Decima(25,8)


Table : ErrorEmp

Empid NVarchar(4000)
EmpName NVarchar(4000)
Salary NVarchar(4000)


Now my database table count increase day by day.So, I want to maintain some common structure like for every failing rows It will insert data into XML column.

Table: ErrorMaster

Id bigint
TableName Varchar(100)
Errorstring XML


Can someone help me with that to achieve my goal ?

How to bulk convert ISO8859 text in Text columns to UTF8 in nvarchar(max) columns?

$
0
0
Hi, I've been struggling for days with a problem on a MS SQL database. Here is the situation: I have an old Open Source PHP application (Limesurvey version 1.92) running on a Windows 2008R2 server, with SQL2008R2 as RDBMS. I need to migrate the surveys in the application to a new instance, running on Linux with MySQL. The new instance is version 3, and database structure between both versions is different. The scenario I tried to use is upgrading the old version on the old server, and then exporting the surveys as export files, which I can import into the new application. It works well. Except that I'm stuck because of a problem of character encoding. The old application (web application) uses UTF-8. But the database uses only VARCHAR and TEXT columns. Therefore UTF-8 characters are stored using several bytes in these columns : é is stored as é for example. When I upgrade the application, the upgrade script changes the structure of the tables: TEXT columns become NVARCHAR(MAX), but the content in the column is not converted to UTF-8. So I'm searching for a way to change the content in the NVARCHAR(MAX) columns from ISO8859 to UTF-8. The database has approx 200 tables and is 600MB.

Do you want to be acknowledged as SQL Server Integration Services Guru? Submit your work to Oct 2019 competition!

$
0
0

What is TechNet Guru Competition?

Each month the TechNet Wiki council organizes a contest of the best articles posted that month. This is your chance to be announced as MICROSOFT TECHNOLOGY GURU OF THE MONTH!

One winner in each category will be selected each month for glory and adoration by the MSDN/TechNet Ninjas and community as a whole. Winners will be announced in dedicated blog post that will be published in Microsoft Wiki Ninjas blog, a tweet from the Wiki Ninjas Twitter account, links will be published at Microsoft TNWiki group on Facebook, and other acknowledgement from the community will follow.

Some of our biggest community voices and many MVPs have passed through these halls on their way to fame and fortune.

If you have already made a contribution in the forums or gallery or you published a nice blog, then you can simply convert it into a shared wiki article, reference the original post, and register the article for the TechNet Guru Competition. The articles must be written in October 2019 and must be in English. However, the original blog or forum content can be from beforeOctober 2019.

Come and see who is making waves in all your favorite technologies. Maybe it will be you!


Who can join the Competition?

Anyone who has basic knowledge and the desire to share the knowledge is welcome. Articles can appeal to beginners or discusse advanced topics. All you have to do is to add your article to TechNet Wiki from your own specialty category.


How can you win?

  1. Please copy/Write over your Microsoft technical solutions and revelations to TechNetWiki.
  2. Add a link to your new article on THIS WIKI COMPETITION PAGE (so we know you've contributed)
  3. (Optional but recommended) Add a link to your article at the TechNetWiki group on Facebook. The group is very active and people love to help, you can get feedback and even direct improvements in the article before the contest starts.

Do you have any question or want more information?

Feel free to ask any questions below, or Join us at the official MicrosoftTechNet Wiki groups on facebook. Read More about TechNet Guru Awards.

If you win, people will sing your praises online and your name will be raised as Guru of the Month.


PS: Above top banner came from Rajeesh Menoth.

Importing a package with SMTP Connection Manager-SSIS 2017

$
0
0

I am trying to import a package to SSIS 2017 .I have a SMTP connection manager in my package which is causing the issue while I import :

OLE received a packet with an invalid extension. (Exception from HRESULT: 0x80010112) (Microsoft.SqlServer.DTSRuntimeWrap)

I tried removing the connection manager and did an import. It worked.

Can you please let me know if I am missing any assemblies?

Can not Load excel worksheets

$
0
0

Hi,

I am trying to load an excel file in my excel source editor but when I try to load the excel sheets it throws an error. Everything was working fine before, I am not sure why it's not working now. 

The error:

TITLE: Microsoft Visual Studio
------------------------------

Could not retrieve the table information for the connection manager 'Excel Connection Manager'.
Object reference not set to an instance of an object.

------------------------------
BUTTONS:

OK
------------------------------

Thanks,

Minhal



Invalid character value for cast specification

$
0
0

Hi 

I was trying to store an ID as  full resultset in a parameter  from target and using that parameter to get data from source server without having linked server.

I get below error

[OLE DB Source [211]] Error: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80040E21.
An OLE DB record is available.  Source: "Microsoft SQL Server Native Client 11.0"  Hresult: 0x80040E21  Description: "Invalid character value for cast specification".




yoba


Read only 3years of data from CSV file on base of date column loaddate into sql using SCRIPTTASK

$
0
0

Hi,

I have past 5 years of data in CSV file.Everytime i want to read past 3 years of data i.e (Loaddate>=01-01-2017) from CSV file on base of loaddate and load into sql server.Please give me sample code using script task.My CSV file has millions of rows for each year.to decrease the loadtime want to read only 2 years of data from csv. Any help appreciated.

Ex file:

ID  Name LoadDate

1     AAA   01-01-2015

2     AAA   01-01-2016

3     BBB   01-01-2017

4     CCC   01-01-2018

5     CCC   01-01-2019

Expected output:

3     BBB   01-01-2017

4     CCC   01-01-2018

5     CCC   01-01-2019

Thanks,

Su



Convert data type to text for case statement

$
0
0

I need to convert data type to text for following statement. Can someone please help…

,case

when [Order_ID]isnullthen'N'

when [Order_ID]=''then'N'

else [Order_ID]

endas [Order_ID]

Many thanks


SSIS send mail task

$
0
0

Hello,

how can i create a local smtp server to test the send mail Task, i dont want to use the script task .

Thanks in advance

FTP task error

$
0
0

Hello

I’ve got an SSIS package with an FTP task. The package runs without any problems on my local machine, but when I deploy it, and run it via the SQL agent it fails on the FTP task, I get the following error …

Detailed error description : 426 Failure writing to network stream

Has anyone come across this, I can’t find much on-line

Thanks in advance

Roy

The AcquireConnection method call to the connection manager myDataBase_ODBC failed with error code 0xC0014009.

$
0
0

As a training exercise, I am trying to use ODBC to perform a simple copy of a single table on a SQL 2012 database. I know I could use another connection method but as I say it is a training exercise.

It is a very simple copy from one table to another with one ODBC source and destination.

The error I'm getting is:

SSIS package "c:\users\brendan\documents\visual studio 2010\projects\Integration Services Project1\Integration Services Project1\Package.dtsx" starting.
Information: 0x4004300A at Data Flow Task, SSIS.Pipeline: Validation phase is beginning.
Error: 0xC0014020 at Package, Connection manager "myDataBase_ODBC": An ODBC error -1 has occurred.
Error: 0xC0014009 at Package, Connection manager "myDataBase_ODBC": There was an error trying to establish an Open Database Connectivity (ODBC) connection with the database server.
Error: 0x20F at Data Flow Task, ODBC Destination [2]: The AcquireConnection method call to the connection manager myDataBase_ODBC failed with error code 0xC0014009.  There may be error messages posted before this with more information on why the AcquireConnection method call failed.
Error: 0xC0047017 at Data Flow Task, SSIS.Pipeline: ODBC Destination failed validation and returned error code 0x80004005.
Error: 0xC004700C at Data Flow Task, SSIS.Pipeline: One or more component failed validation.
Error: 0xC0024107 at Data Flow Task: There were errors during task validation.
SSIS package "c:\users\brendan\documents\visual studio 2010\projects\Integration Services Project1\Integration Services Project1\Package.dtsx" finished: Failure.


I tested the connection within the ODBC administrator successfully. With one test, I use the same connection manager for the source and destination, the source works, but the destination fails.

I've tried it on two different servers, one a brand new clean install and one a trusted server that has been in use for ages with no problems. Each time the source and destination are on the same servers.

I've tried copying from one database to another.

I've tried copying within the same database.

The ODBC connection is 32 bits but everything else is 64bit i.e. Windows Server 2012 and SQL Server 2012. The development environment is Visual Studio 2010 which installs with SQL Server.

ssis package failed at job side and working in bids side(how to handled bytestrem data)

$
0
0
Hi I have one doubt in  ssis 
how to load bytestrem values (DB2 source ) to sql server  table using ssis package


DB2 Table :

create table Emp
(LOCK char(1) for bit data DEFAULT ' ' NOT NULL)

and tow types of values have 1)e8  2) 40  

sql server side Emp :lock column datatype  is nvarchar(max)

in ssis package I have done like below steps.
step1 : using ado.net source transfomation I congigure source db2 table query like 
select lock from emp

ste2: using derived column/dataconversion transformation I changed datatype dt_wster,10

step3 : using  ado.net destination tranformaion i configured sql server emp table 

after I execute the package its working fine.records also have in sql server table.

after that I Deployed this package in server and schedule this package using sql serve agent job
here  same package is not working in the sql server agent job side.
getting error like tem.overflow Arithmetic operation resulted in an overfow.at system.data.odbc.datareader.buildmetadatainfo()


can you please tell me how to achive this type of issue in ssis

ssis package developed in VS 2017

$
0
0
can a SSIS package developed in VS 2017 be scheduled in SQL Server 2014?

How to Create a SQL Server Audit Trigger

$
0
0

I am about to create a table to load some data. I also need to trigger audit table. We want our trigger to insert a row into the tblOrdersAudit table any time a record is updated or inserted in tblOrders, essentially taking a snapshot of the new or changed record along with which principal affected the record and when it happened.

I have no any idea how to do this, any help you can provide would be much appreciated.

Many thanks

SSIS -- Scripting Email Body -- Odd results

$
0
0

Good Day, 

I am using VS2015 to create an SSIS package which generates an email containing both text and a return dataset.  The method that I found and am using sends the dataset values (more than one record) out as text using a ForEach Loop.  It is working; mostly.

my C# code is main():

 Variables varCollection = null;
            string header = string.Empty;
            string message = string.Empty;
            string footer = string.Empty; 

            Dts.VariableDispenser.LockForWrite("User::EmailMessage");
            Dts.VariableDispenser.LockForWrite("User::EmailBody_P1");
            Dts.VariableDispenser.LockForWrite("User::EmailBody_Footer");
            Dts.VariableDispenser.LockForWrite("User::MaxSiteID");
            Dts.VariableDispenser.LockForWrite("User::MaxWOGenDescr");
            Dts.VariableDispenser.LockForWrite("User::MaxNewValue");
            Dts.VariableDispenser.LockForWrite("User::MaxOldValue");
            Dts.VariableDispenser.GetVariables(ref varCollection);

            //Set the header message for the query result
            if (varCollection["User::EmailMessage"].Value == string.Empty)
            {
                header = string.Format(varCollection["User::EmailBody_P1"] + "\n" + "\n");
                    //"Execute SQL task output sent using Send Email Task in SSIS:\n\n";
                header += string.Format("{0}\t{1}\t\t\t{2}\t\t{3}\n", "Site ID", "WOGen Description", "Old Value", "New Value");
                varCollection["User::EmailMessage"].Value = header;
            }

            //Format the query result with tab delimiters
            message = string.Format("{0}\t{1}\t\t\t{2}\t\t\t{3}",
                                        varCollection["User::MaxSiteID"].Value,
                                        varCollection["User::MaxWOGenDescr"].Value,
                                        varCollection["User::MaxOldValue"].Value,
                                        varCollection["User::MaxNewValue"].Value);

            footer = string.Format( "\n" + varCollection["User::EmailBody_Footer"]);

            varCollection["User::EmailMessage"].Value = varCollection["User::EmailMessage"].Value + message + footer;

            Dts.TaskResult = (int)ScriptResults.Success; 

The results are ALMOST what I expect and look like this as received by email: 

Microsoft.SqlServer.Dts.Runtime.Variable

Site ID   WOGen Description                                       Old Value                           New Value

CGCH    PMWOGenGroup2Mo                                  60                                          60

Microsoft.SqlServer.Dts.Runtime.VariableKGH   PMWOGenGroup1Mo                                  30                                          30

Microsoft.SqlServer.Dts.Runtime.VariablePHH    PMWOGenGroup1MoB                               0                                             0

Microsoft.SqlServer.Dts.Runtime.VariablePIMC  PMWOGenGroup1Mo                                  30                                          30

Microsoft.SqlServer.Dts.Runtime.VariableSHMCPMWOGenGroup2Mo                                  60                                          60

Microsoft.SqlServer.Dts.Runtime.VariableSJH     PMWOGenGroup1Mo                                  30                                          30

Microsoft.SqlServer.Dts.Runtime.VariableSJMC  PMWOGenGroup1Mo                                  30                                          30

Microsoft.SqlServer.Dts.Runtime.VariableSWMC              PMWOGenGroup1MoB                               36                                         36

Microsoft.SqlServer.Dts.Runtime.VariableUGMCPMWOGenGroup1Mo                                  30                                          30

Microsoft.SqlServer.Dts.Runtime.VariableSSC     PMWOGenGroup1MoB                               0                                             0

Microsoft.SqlServer.Dts.Runtime.Variable

My issues are: 

  • The first line of the email reads Microsoft.SqlServer.DTS.Runtime.Variableand should be a line of TEXT that is defined in the SSIS Package Variable  -- NOTE:  It does read the to line feeds (\n) that I sent. 
  • The next section (looping through the data) reads the header row and the first row of data as expected.  This is followed by: Microsoft.SQLServer.DTSRuntime.VariableDataElement, next data element...  The data elements are correct.  Why is the Microsoft... showing? 
  • The final line of the email is like the first.  it reads Microsoft.SqlServer.DTS.Runtime.Variable and should be a line of TEXT that is defined in the SSIS Package Variable.  

If I could just clean this up a bit, it would be perfect.  

Thank you in advance for any guidance/help. 


MT

Add folders to miscellaneous folder

$
0
0

Hi

Is there a way to add child-folders to the miscellaneous folder in SSIS? It will nice to group biml files in separate folders.  

Thanks

How to add drop downs to excel exports

$
0
0

I am creating dynamic excel files with each file consisting of 2 worksheets in it. In both the worksheets I am looking to create a drop down with few values for few of my columns. 

I am not getting it to be done using ssis excel destination.

Thanks

Viewing all 24688 articles
Browse latest View live


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