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

SSIS package fails for Fast Load when run from C# code

$
0
0

Hi,

I am using Fastload option to load a table in data flow. This package is running fine if i execute it from Visual Studio. But the same package is failing if i run from C# code.

I have set the Delay validation to True. The table has identity column. So i am using the fast load option to explicitly set the values for identity column. Why is the package behaves differently when run from C# code. Please suggest me the fix for this issue.

Below is the error message i am getting.

Error Code - -1071636471. Source - dftDbLoadAccountCode. Description - SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available.  Source: "Microsoft OLE DB Provider for SQL Server"  Hresult: 0x80004005  Description: "Unable to resolve column level collations.  Bulk-copy cannot continue.".

Error Code - -1071636416. Source - dftDbLoadAccountCode. Description - Failed to open a fastload rowset for "[Accounting].[AccountCode]". Check that the object exists in the database.

Error Code - -1073450982. Source - dftDbLoadAccountCode. Description - dstDbAccountCodeInsert failed the pre-execute phase and returned error code 0xC0202040.

Thank you.

Regards

Vikram


Variables Intermittently Not Being Replaced in SSIS Connection String

$
0
0

We are using BIML and .NET to generate SSIS packages and move data between servers. The BIML process generates roughly 500-600 packages in a Parent / Child setup with some running in parallel, some in sequential containers but essentially there is one Package that starts the process of running all the packages gradually.

The connection string is built using variables which are passed in from the SQL Server Agent Job, and all the packages share this connection manager.

If I run the above process it works, albeit a bit convoluted, we don’t receive errors.

If I create a second job to run the same SSIS package(s) at a different times (no overlap) and pulling from a different SQL Server I intermittently see errors. The error that I receive is where the variable has not been substituted correctly for the connection string parameter and shows the original Variable Name as part of the connection string. For example

‘Cannot open database “Destination_ServerName” requested by login. The login failed’

The Destination_ServerName is the actual parameter for the server but, then the subsequent run will work. Sometimes its the servername parameter that also gets substituted. Its doesn’t happen at a particular time, there doesn’t seem to be a pattern to it, and the memory and cpu resources on the server don’t seem to be strained.

We are running SQL Server 2017 CU16, and the server is pretty beefed up server. The packages are also not moving that much data, less than a few MB per hour or two.

Any thoughts, or help is much appreciated.

Thank you!

Unable to upgrade SSIS package from SQL 2008 to SQL 2017

$
0
0

Hi All,

we are trying to upgrade SSIS package from SQL 2008 to SQL 2017. But we are not able to upgrade. we are using Microsoft Data Migration Assistant. we are getting below error while try to upgrade.

The assessment of database 'Package store' on server 'ABC123' failed.
The error message: 'Failed to assess SSIS packages or projects: 'Could not load file or assembly 'Microsoft.SqlServer.ManagedDTS, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified.'.'. 

Regards,

Karthik B

Formatting Date

$
0
0

I have an input file which has date in the following format '1312016' and I need to get it to 'mm/dd/yyyy' so I am using this formula:

User::Test = 1312016 -> Datatype is String

RIGHT("0" + (DT_STR,2,1252)(@[User::Test]),2) + "/"
      + RIGHT("0" + (DT_STR,2,1252)(@[User::Test]),2)  + "/"
    + (DT_STR,4,1252)(@[User::Test])

getting this error message:

Any advise.

Execute SQL Task failed.

$
0
0

When I execute package , I meet  these errors.

Error: 0xC001F009 at Package: The type of the value (DBNull) being assigned to variable "User::Variable" differs from the current variable type (String). Variables may not change type during execution. Variable types are strict, except for variables of type Object.

Error: 0xC002F210 at Execute SQL Task, Execute SQL Task: Executing the query "select * from books;" failed with the following error: "The type of the value (DBNull) being assigned to variable "User::Variable" differs from the current variable type (String). Variables may not change type during execution. Variable types are strict, except for variables of type Object.

". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.

How to Schedule a Customised Whatsapp msg from ssis with an attachement

$
0
0

HI,

I need to schedule customised Data to Whatsapp phone numbers using ssis or in any other easiest way.

I already have the data in SQL Server. please help 

Thanks in Advance 

parse json response from rest api

$
0
0

Hi, I am using SSIS script task to parse json response from rest api. When I try to deserialize json payload using newtonsoft json the assembly reference does not stick if I were to close and open the edit script window. Could you please help me guide re-write the below code for json.

JSON payload:

{"Id": "1","Code": "Man","Description": "Manchester"
}


C# Code to parse xml (I am trying to re-write data insert using JSON payload)

                XmlDocument xdoc = new XmlDocument();
                string records;

                records = getRecords();
                xdoc.LoadXml(records);

                string connectionString = @"Data Source=server\SQLEXPRESS;Initial Catalog=TestDB;Integrated Security=SSPI;";							
                string sqlTable = "test";

                using (SqlConnection sc = new SqlConnection(connectionString))
                {
                    sc.Open();
                    XmlReader xr = XmlReader.Create(new StringReader(records));
                    DataSet ds = new DataSet();
                    ds.ReadXml(xr);
                    
                    DataTable dt = ds.Tables[0];
                    using (SqlBulkCopy sbc = new SqlBulkCopy(sc))
                    {
                        sbc.DestinationTableName = sqlTable;
                        sbc.BatchSize = dt.Rows.Count;
                        sbc.BulkCopyTimeout = 0;
                        sbc.ColumnMappings.Add("Id", "Id");
                        sbc.ColumnMappings.Add("Code", "Code");
                        sbc.ColumnMappings.Add("Description", "Description");

                        sbc.WriteToServer(dt);
                    }
                }	

JSON class object

public class RootObject
{
    public string Id { get; set; }
    public string Code { get; set; }
    public string Description { get; set; }
}

Thank you.


SQLEnthusiast

SSIS Access a one drive location excel file

$
0
0

Hi,

My sql account does not have access to a one drive location but I use my credential and I can navigate from the web

how can I do this using a ssis package with my credentials to import an excel file on the one drive?

please help with any suggestions

regards


SSIS Job just hangs when a connection lost in between runs

$
0
0

Hi,

SSIS Job just hangs when a connection lost in between runs

Is there a way to set expire limit on a job & package then stop job and disable then enable job and retry after x min

thanks 

SSIS stuck in validation when running package (SQL Server 2016)

$
0
0

I've got a very basic SSIS package with a task in it that has a simple Dataflow in it. Source is a table in a database in one SQL Server instance and destination is an identical table in a different instances database. I've done this kind of thing tons of times, but this time, I'm getting a weird occurance.

When I run the package, it freezes on the validation of the destination after 50% has been reached. I've turned off referential integrity for the table, and i'm doing a fast load keeping identity fields and nulls, with table lock and check contraints ticked. The table only contains about 200,000 records and should be fast to copy.

Anyone know what could be causing this?

Easiest way to start and read a trace from within a SSIS package

$
0
0
I'm trying to gather information from within a SSIS package for benchmarking, reconciliation, and reporting purposes in regards to cube processing, which I'm initiating using the AS processing task. 

What is the easiest way to capture this information?

The only way I've been able to come up with is to use a profiler trace.  If this is really the only way, what is the easiest way to execute and read the trace from within SSIS?

Also, if a script task has to be used, does anyone have a code sample?

Thanks in advance!

overriding conn string leads to anonymous log on

$
0
0

Hi we run 2017 std. At https://social.msdn.microsoft.com/Forums/en-US/7cbbbcc5-2655-4303-b788-e133ba56debb/service-acct-ends-up-looking-like-nt-authorityanonymous-logon-when-it-reaches-the-sql-server?forum=sqldatabaseengine we pretty much concluded that an issue i'm having is no/incorrect Kerberos setup.  I basically have a hop from a powershell script (which really gets run by a scheduling tool) on server a to sql on server b to sql on server c.  Server b has a catalogued pkg that actually hops to server c.  it all starts with a service acct.  but logon to server c acts as anonymous and an error occurs.

I thought a good way to test if that theory (that its kerberos) was correct would be to override the server b pkg's connection string to server c with my own creds. and I see from the std pkg report's context info that ssis totally knew about the connect string override.  For grins I ran that pkg under vs to see if perhaps the conn string was formatted incorrectly and it ran.  But i'm not sure that proves anything.

The overridden conn string looks like this when the expression for that conn property is evaluated ...  I see the familiar Fx icon representing that something is parameterized on that connection.  I don't have quotes around the domain\myuserid but am assuming they aren't necessary.

Data Source=xxxxxxxx;Initial Catalog=yyyy;Provider=SQLNCLI11.1;Integrated Security=SSPI;Auto Translate=False;User Id=domain\myuserid;Password=zzzzzzzz;   

 

Preview Vs Data Viewer

$
0
0

Hi,

I am reading complete row in one column as string in SSIS Flat File Source. Data in the row consist of NON COMP and COMP (EBCDIC/Mainframe file). When i look in Preview I can see STRING data and COMP data as garbage as expected. However, when i execute the package and see the data in Data Viewer only String data is visible till it finds first COMP byte. Anything (NON COMP/COMP) after that gets truncated/blank.

Is there any way to carry complete row forward same as Preview and avoid truncation?

Preview Screenshot -

 

Data Viewer Screenshot -

Thank you for your help!

Execute package in job agent delete all the records in the table

$
0
0

Hello everyone,

I have a package to update a table in data warehouse. The updates include adding, updating, and deleting. When I run the package through Visual Studio and integration services catalogs. It works fine. However, when I run this package in a scheduled job, it deletes all the records in the table even though there are not records need to be deleted.

I have been trying to solve this problem for a while, but no success. Any help would be greatly appreciated.

Thanks,

Xiaowen

SSIS Package is working fine in SSDT but givign error in SQL Agent JOB

$
0
0

 I am getting below error using SSIS package created in SSDT 2019 and SQL server 2019 in  SSMS v18.4. 

its working fine when i am running from SSDT and only giving error by SQL agent job. I am not passing any parameter. its simple package is with just one script task. i don't think its issue with script task because i also checked   with execute process task in ssis with simple different package and that is also giving the same error.

is there any help? Thanks in advance....

Description: Cannot create a task from XML for task "Script Task", type "Microsoft.ScriptTask" due to error 0x80070057 "The parameter is incorrect.".  End Error  Error: 2019-12-23 00:29:35.22    Code: 0xC0010018     Source: Script Task      Description: Failed to load task "Script Task", type "". The contact information for this task is "".  End Error  Error: 2019-12-23 00:29:35.22     Code: 0xC0010026     Source: Script Task      Description: The task has failed to load. The contact information for this task is "".  End Error  Error: 2019-12-23 00:29:35.22    Code: 0xC0024107     Source: Script Task      Description: There were errors during task validation.  End Error  Error: 2019-12-23 00:29:35.22     Code: 0xC0010025     Source: Package2      Description: The package cannot execute because it contains tasks that failed to load.  End Error  DTExec: The package execution returned DTSER_FAILURE (1).  Started:  12:29:35 AM  Finished: 12:29:35 AM  Elapsed:  0.094 seconds.  The package execution failed.  The step failed.


Will adding a new column to a existing UTF -8 file at the end in SSIS package break the mapping ? SSIS 2014

$
0
0

Will adding a new column to a existing UTF -8  file at the end  in SSIS package break the mapping ?

Existing file

"Employee","Email","FirstName","LastName"
"7777777","user@tests.com","Joe","Smith" 

New file

"Employee","Email","FirstName","LastName","CITY"
"7777777","user@tests.com","Joe","Smith" ,"Chicago"

Right now we are getting the below error

The column delimiter for column "LastName" was not found.”

Env :VS 2013 and SSIS 2014 .SQL server 2008




Scheduling SSIS Package via SQL Server Agent

$
0
0

I need the 4-1-1 on this..."Scheduling a SSIS Package via a SQL Server Agent Job 101"

The UI is easy enough...I need the niddy griddy...Like what service account does it use to execute? Do I need to set-up a SSIS Service Account? What privileges do I need to define to the Service Account? How does the SSIS Service Account execute the job? Does it need SysAdmin rights to all the databases in order to run the SSIS Package? How do I specify the SSIS Service Account to run and execute the job and the SSIS Package?

So many questions....

Thanks for your review and am hopeful for some informative web links or maybe even a YouTube.

Flexible File Destination filename from variable

$
0
0

Hi All,

I'm using Flexible File Destination to insert records to Data Lake Gen2 files, my question is how can i pass variable to the filename property?

Everyday running the package, it created file with today name "20191212.txt", "20191213", "20191214",... ?

Thanks,

Mo Ghaffar



Regards, Mohamed Abdel Ghaffar | http://sharepointfoundation2010.blogspot.com

Flexible File Destination enable appending data mode

$
0
0

Hi All,

I'm using Flexible File Destination to upload date to Azure Data Lake. i'm using For-each container to loop on dates and return data. But every-time flexible file destination clears the previous data and insert the new record. So, How can i enable appending data to the same file? 

Note: In Flat File Destination there is Overwrite property but in Flexible File no such properties!

Thanks

Mo


Regards, Mohamed Abdel Ghaffar | http://sharepointfoundation2010.blogspot.com

SSIS/DB Trigger to Update Server Groups & SharePoint Group from SQL Table

$
0
0

Hi,

The OLAP Access is stored in a Group on the Server, can I via a SQL DB Trigger or SSIS pkg to store users values in a table and push/update to the the group on server and a SharePoint group

Need to find a smarter way as thee junior member everytime has to login on to server to maintain the group

please advise with any ideas

regards


Viewing all 24688 articles
Browse latest View live


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