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

Exporting data to a csv file and include column names

$
0
0

I am creating a SSIS package which creates a .csv file.  The package works fine except it is not putting the column names as the first row.

How do I get the column names to also export?

Thanks,

~John


Data Transformation in SSIS or in TSQL

$
0
0

I am getting data in text file which is getting exported from DB2. The data is padded with white spaces.If the value is NULL, I am getting number of spaces equal to length of the field in DB2. Also, the numbers are padded with 0's like 20 is represented as +000020. Should I be first load the data into the staging tables like the way it appears in the file and then trim the padding while loading it into the final tables ? Or, should I remove the padding in SSIS using expression in derived column.

Which one is better performancewise? Any thoughts would be appreciated.

Job executing the SSIS pkg via cmdExec line step not picking the config details

$
0
0

Job executing the SSIS pkg via cmdExec line step not picking the config details (of prod server connections/parameters)

specified in dtsConfig file and by default using the values present in the pkg (which is of dev env).  I have to open the package

uncheck "Enable package configuration" save the package and check it again and save again then the package will use the prod config.

What could be the reason? and how to fix this?

The SSIS pkg and the dtsCofig reside in same folder of network drive.

SQL Server R2 Ent Ed

Thanks

Update database from inside SSIS

$
0
0

I need to create a process that does the following with SQL 2008 R2 and SQL 2008 SSIS.  Need to figure out the most efficient way to do this.

I have a database that has a number of tables with encrypted fields.  These fields are encrypted through a SSIS package using a custom DLL.  That is all set up and working.  I need to create a new SSIS package that will be used when the encryption key gets updated.  

So my question is how easy is it to use SSIS to read a record from a table, update it and then save that record back to the same table?  From what I have read, SSIS is not the best at that kind of operation.  I am not worried about the encrypt / decrypt parts, just the update same table portion.

Can anyone recommend any good examples of how to do this?

Thanks!

Jim

Search-functionality in SSIS-Package

$
0
0
In complex SSIS-Packages it would be helpful and save time to provide an "Search-Field". Then highlight the Task witch matches to the search-result. In the attached Example i would have searched "Ablehnung".

A compare SSIS package checked out with TFS version in VS 2012 no longer shows messagebox 'The files are identical'

$
0
0

Hello,

Recently I have had started work on a development system that has VS 2012 and SQL Server Data Tools For VS2012. One thing that annoys me is the fact that a source comparison between a checked out package and the version stored in TFS no longer displays the message 'The files are identical', but instead opens the text editor with 2 panes for both sources as if there were differences, with sliders at the right side that do not show any differences (everything in B&W of course). A simple message like we had in VS2008 'The files are identical' would suffice to me. On the other hand when you check in the files with VS 2012 and they had not changed then the source control system warns that it did not make any changes since the files were identical. Why did the VS 2012 team fix something that worked ? Is there some advantage that I am missing?


Jan D'Hondt - Database and .NET development

Row delimiter and column delimiter settings in flat file connection manager

$
0
0

Hi,

I have a csv file which looks like:

col1, col2, col3, col4,

data, data, data, data,

Notice there is an annoying comma in the end of the last column name as well as in the end of each row.

How should I set row delimiter and column delimiter to read this file correctly?

I have tried:

when I use {CR}{LF} as row delimiter, I get the following error:

[Flat File Source [11985]] Error: The column delimiter for column "Column 4" was not found.

when I use comma as row delimiter, then each column turns into a row in this case.

Any ideas?

Thanks a lot

Jia


SSIS Missing Package Configurations using Visual Studio 2010 Shell

$
0
0

I'm not sure what am I missing.

I'm creating a new SSIS package using Visual Studio 2010 Shell that was installed together with SQL Server Management Studio. I cannot find Package Configurations to launch the wizard.

Things I have tried:

1) Right Click on Control Flow design. On SQL Server BIDS 2008, I can do that andPackage Configurations ... option is there.

2) From the menu, SSIS. Package Configurations ... option is not there either.

Is it my Visual Studio 2010 installation? Or am I doing something wrong?

Edit: I have also tried http://msdn.microsoft.com/en-us/library/kwybya3w(v=vs.100).aspx - To open the Configuration Manager dialog box. The only thing I see underBuild is the Build <prjname>.



How to look up a random key value

$
0
0
I'm importing some data in a flat file. That data is going to be loaded into a fact table. That fact table connects to some dimension tables and I need to the keys out of those tables. The problem is, this isn't a look up. There is no key value in the source file to match against. What I need to do is to go into the dimension table, pull out some existing keys at random and then drop them into the data flow. I have NO idea how to do that. Ideas?

HOw to avoid DeadLocks when you schedule a Sql Server Agent Job and calling SSIS packages

$
0
0

Hi All,

I have scheduled 2 packages in in Sql Server Agent jobs .

First job which is having Package 1 executing at 11 AM and where I am inserting the data in the table.

Second job which is having Package 2 executing at 12 AM and where I am updating the data in the table based on the first job inserted records.

When I am executing my first job it taking more time and executing till 12 AM and from 12 AM my job 2 also starting ,so getting deadlocks conflicts because inserting happening from job1 and updating happening from Job 2.

How to avoid deadlocks and fix the issue.

Please Suggest .

Thanks & Regards,

Anand

SSIS 2012 - Importing multiple files with different columns (where columns are stored in a table)

$
0
0

Hi everyone,

I have been tasked to upgrade an existing DTS package into an SSIS package.

The old package uses 3 tables.

Table 1) Has a list of file names

Table 2) Has a list of columns per file

Table 3) Is the data destination.

So what is supposed to happen is:

Step 1) the package should load the files into a resultset
Step 2) for each file in the resultset, the package should get the related columns
Step 3) the package should now map the columns to the destination table (variable column numbers here)
Step 4) the import should take place.

I have gotten to step 2 but am not sure how to dynamically map the columns to the destination table.

Any pointers anyone?

Thanks in advance!

Custom Datasorce Reader cast before write to buffer

$
0
0

I have created a custom datasource reader, that gets information from a webservice. The Data returned is in Json format.  Below is an example of the Json returned.  I edited it a bit theres a lot more stuff that is returned from the api that is not relivent to this question.  Trust me the Json returned works.

    {
     "columnHeaders": [
      {
       "name": "ga:date",
       "columnType": "DIMENSION",
       "dataType": "STRING"
      },
      {
       "name": "ga:entrances",
       "columnType": "METRIC",
       "dataType": "INTEGER"
      },
     {
     "name": "ga:timeOnSite",
     "columnType": "METRIC",
     "dataType": "TIME"
      }
    "rows": [
      [
       "20130604",
       "180",
       "1.1"
       ],
       [
       "20130603",
       "200",
       "1.1"
       ]

     ]
    }

As you can see the second column is an Int and the thrid column is Time which is really float.  Now the way the API returns everthing in json is string "becouse of the".   In my task i have created the output columns using the corect datatype supplyed by the api. 

My question is do i need to cast results before writing them to the output.  They are always corectly formated there is no chance that a string will be returned in an intiger column.

Currently my code looks like this: For each of the diffrent datatypes I parse them before I wright them to the buffer. 

    case "INTEGER":
         ParseFail = Int32.TryParse(ColumnValue, NumberStyles.Any, CultureInfo.InvariantCulture, out parsedInt32);
          if (!ParseFail)
            {
            msg = "Error: Data Feed Converting INTEGER string to int32: failed " + ColumnValue;
            ComponentMetaData.FireError(0, ComponentMetaData.Name, msg, string.Empty, 0, out pbCancel);
            throw new Exception(msg);
            }
            else
            {
            buffer[mycol.OutputColumnIndex] = parsedInt32;
            }
            break;


My question is do i need to do this?  The only reason i could think to be foreced to do this is that the decimal point in all of the floats is a `.`  if the server the task is installed on has EU settings which would make a decimal point a `,` Will the insert fail if i dont do the cast first?

deployement of ssis packages

$
0
0

Hi all,

in my dev enviorement i have 10 packages but i want to deploy only 5 packages in testing enviorement .

For each Loop

$
0
0
I have a typical situation. I have  certain delimited flat files having 10000 rows to be imported to SQL DB. So I built a package containing with For Each Loop containing:-

A. Script Task- which clears all the CLRF on in the Flat file(as per BUSINESS requirement).
B. Data Flow Task
C. File System Task.

Now when i run the package, if the flat files contains lesser rows say 50,60 the package runs okay for all the files. However as soon as I try with my actual files with 10,000 rows the package runs successfully for one file only. It shows"execution completed" after one file.

Again if i keep two smaller files(50-60 rows) above two bigger files (10000 rows) the package runs fine for all the files. Can any one help me out

Agent Job should call next step if SP returns value 1. Job should be stopped if value is 0.

$
0
0

I have several SQL Server 2012 SSIS packages 1 and 2, which perform Business logics of DW.
I have plan to run packages with SQL Server Agent Job.
If package 1 is successfull, package 2 is run.

We run these Jobs every night. No matter what happened in previous night, we run each night again.

Now I have need to add validation logic.
If Stored procedure return value 1, then run package 1.
If SP return value 0, then stop running job.
I wish to implement validation package to own SSIS package. Let call this as package 0, but it is okay as well if Agent call SP directly.

What is best practise for implementing and running validation logic?
Specially I need help to design how to implment logic where job is stopped if SP return value 0.

Should I do with some task inside package 0 or could Agent Job handle this?


Kenny_I


Script task edit on visual studio 2008 Integration Services project fails

$
0
0

I installed BIDS from SQL Server 2008 R2 installer. I have .Net Framework 3.5 SP1 and sql server 2008 R2 with SP2.
I also have BIDS 2010 and sql 2012 installed on the same machine, which is working fine.

I created a new SSIS project on Visual Studio 2008 and added a script task to the control flow. I added User::test in the read only variables list. When I click on edit script I get the error copied below. The MSDN forum (http://blogs.msdn.com/b/jason_howell/archive/2010/08/18/vsta-setup-and-configuration-troubles-for-ssis-2008-and-r2-installations.aspx) suggested to uninstall and re install SQL Server 2008 to fix this problem, which I did, but it did not fix the problem. What needs to be done to fix this problem?

Is there a way Microsoft tech support can check my installation via webex to help fix it?

Error:
"
Error: TITLE: Microsoft Visual Studio
------------------------------

Cannot show Visual Studio 2008 Tools for Applications editor.

------------------------------
ADDITIONAL INFORMATION:

The VSTA designer failed to load:  "System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component.
   at VSTADTEProvider.Interop.VSTADTEProviderClass.GetDTE(String bstrHostID, UInt32 dwTimeout)
   at Microsoft.SqlServer.VSTAHosting.VSTAScriptingEngine.EnsureDTEObject()" (Microsoft.SqlServer.VSTAScriptingLib)

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

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

"

Thanks for your help.

ssis 2012 configuration package wizard is hanging

$
0
0

Hi,

I am trying to edit the dtsconfig package xml file in SSIS 2012 VS envoirnemnt and the wizard is hanging up for minutes until I need to close VS.

Has anyone experienced this problem and what can be done to solve other than editing the XML file directly.


SSIS package config

$
0
0

Hi !

I'm using XML as package configuration. I'm moving COde  to production. I have moved SSIS package alone seperately and deployed it.The Package configuration is in separate location of the server.

I need to pass the package configuaration at run time to SSIS package and schedule in Sql server agent.

Please help me


Regards,

SSIS Wizard cannot import text columns longer then 255 using Excel source

$
0
0
(Applies to SQLServer 2005 SP1)

We have found that using the SSIS "Import and Export Wizard" using the "Microsoft Excel" data source that there appears to be a maximum column length of 255 characters for any row.

Even when defining the destination table columns as nvarchar(4000), the wizard fails with the errors shown below.

We have found no workaround except manually changing the imput data. There doesn't appear to be any "Advanced" options for the Excel importer as there are for the flat-text importer. So, no question here, just posting the bug so that *next* time someone searches the web for an answer, this post comes up


Messages
Error 0xc020901c: Data Flow Task: There was an error with output column "English String" (18) on output "Excel Source Output" (9). The column status returned was: "Text was truncated or one or more characters had no match in the target code page.".
(SQL Server Import and Export Wizard)

Error 0xc020902a: Data Flow Task: The "output column "English String" (18)" failed because truncation occurred, and the truncation row disposition on "output column "English String" (18)" specifies failure on truncation. A truncation error occurred on the specified object of the specified component.
(SQL Server Import and Export Wizard)

Error 0xc0047038: Data Flow Task: The PrimeOutput method on component "Source - Sheet1$" (1) returned error code 0xC020902A. 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.
(SQL Server Import and Export Wizard)

Error 0xc0047021: Data Flow Task: Thread "SourceThread0" has exited with error code 0xC0047038.
(SQL Server Import and Export Wizard)

Error 0xc0047039: Data Flow Task: Thread "WorkThread0" received a shutdown signal and is terminating. The user requested a shutdown, or an error in another thread is causing the pipeline to shutdown.
(SQL Server Import and Export Wizard)

Error 0xc0047021: Data Flow Task: Thread "WorkThread0" has exited with error code 0xC0047039.
(SQL Server Import and Export Wizard)




edit: After searching further this is documented under "Excel Source" in BOL which provides a registry-based workaround.  I guess the issue is that the wizard considers truncation to be  a 'fail' case and there's no easy way to override this behaviour, specify the column types nor determine which line is in error)

Truncated text. When the driver determines that an Excel column contains text data, the driver selects the data type (string or memo) based on the longest value that it samples. If the driver does not discover any values longer than 255 characters in the rows that it samples, it treats the column as a 255-character string column instead of a memo column. Therefore, values longer than 255 characters may be truncated. To import data from a memo column without truncation, you must make sure that the memo column in at least one of the sampled rows contains a value longer than 255 characters, or you must increase the number of rows sampled by the driver to include such a row. You can increase the number of rows sampled by increasing the value of TypeGuessRows under the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\4.0\Engines\Excel registry key.
)

I would like to learn MSBI (SSIS/SSAS/SSRS) - could any one please suggest me what are all the SoftWares i need to download & install on my personal laptop ?

$
0
0

Hi,

I am a beginner & I would like to learn SSIS/SSAS/SSRS of 2008 R2 version.

but i am new to this & i would like to create infrastructure on my personal laptop. So can anybody suggest me what are all software components i should download & install on my personal laptop.

Note: My laptop is of window-8 OS, 64-bit computer

Thanks in advance !

best regards,

Venkat

Viewing all 24688 articles
Browse latest View live


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