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

Imex not working when uploading excel sheet data

$
0
0

Hi

I have a set of multiple excel sheets to be uploaded on a excel work book. It has kind of null values for columns. What I mean is like empty cells and then it has numeric values like 154.75, 145.25.

My problem is in the advanced editor of the excel source it takes Unicode string [DT_WSTR] as the data type for most of the columns. Since my database data type for this column is numeric it gives an error saying "The value could not be converted because of a potential loss of data."

I tried putting IMEX=1 and still it picks up the data type as string. I don't want to change the registry entries too.

Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\MyData\FirstSetOfData.xlsx;Extended Properties="EXCEL 12.0 XML;HDR=YES;IMEX=1";

Any idea how I can fix this without saving it to a CSV file?

Please let me know.

Thanks

Lucki


SLOW INSERT!!!!

$
0
0

I have an insert into a table being done within a data flow task.  I have a basic query inserting the data from a OLE DB Source: 

Select pi.fkpromotionitemidAS fkpromotionitemid,pi.marketAS market,

nullAS regionid,pi.regionas region,nullAS subregionid,pi.SubRegionAS SubRegion,pi.marketidAS marketid,

from tmp_ItemMarketspi LEFTJOIN tmp_rbmtbl tON t.fkpromotionitemid=pi.fkpromotionitemidAND(t.regionid=pi.regionidorpi.subregionid= t.subregionid)

where t.fkpromotionitemidISNULL

tmp_ItemMarkets has 3.8 million records.

My Insert into the Table has only one index on it that  refers to fkpromotionitemid,regionid, and subregionid as well.  what do I need to do to get this optomized to insert faster than 3 hours.

flat file bad rows

$
0
0

I need to create ssis pakcage as below

In my Flat file Column Delimiter is "|"

1.

Before loading the flat file, check for additional columns by row by row if there is any  extra "|" column data exist.

If "|" extra column exists, i have to skip the file.

2. 

On Column matching and when the data is loaded into Table, if any error, revert back all the updates with respect to the file and move to next file


ShanmugaRaj

Package Configurations - SQL Server Type Seems Not To Work

$
0
0

I have set my package configuration to SQL Server. All that I want is for the Server Name to be changed from one environment to the other. As such, I have configured my Properties as follows:

Package Configuration Wizard -> SQL Server -> Select Properties to Export -> Connection Managers -> ServerName -> Finish

When I query the SSISConfiguration table I get the expected values on the results.

I have then tried to test if my package configurations work by doing the following:

  1. Ran UPDATE statement on the SSISConfiguration table to update ConfiguredValue column with the ServerName of QA environment from DEV server name
  2. In QA environment, deliberately dropped one of the tables which is referenced in the package that I’m using to test my configurations
  3. Executed my test package with the hope that it will take its configuration values from the above updated SSISConfiguration table.

To my dismay, the test package appears to be running under the original configuration which is pointing to DEV box and is not throwing any error of “invalid object” as I have expected. I'm running my test package from BIDS. Where am I going wrong. If everything is running according to plan this package is supposed to fail because QA server does not have one of the tables referenced in the package as I deliberately dropped it to prove a point.

Many thanks,


Mpumelelo

Visual Studio 2012 SSIS Transfer Logins Task

$
0
0
I am trying to run this task & transfer individual logins but the task stalls when it gets to a group (in this case a local security group) in the list. How do I configure the task to skip groups when running?

Need Help with Automation

$
0
0

Hi,

Right now i have a package that i'm executing manually, but want to automate the process and i'm facing some problems. Hopefully some guru can me some advice or point me to a dcoument or a blog.

Purpose of the Package: To sftp to a remote server and copy files over to the local DEV Server. Once the 3 files are copied over to the local DEV Server , the 3 files have 3 different DFT's based on their requirements. The script i'm using to sftp the three files from the remote server is as below:

option batch on
option confirm off
open sftp://<username>:<password>@server -hostkey="ssh-dss xxxxxxxxxxxxxxxx"
cd .
option transfer binary
synchronize local [ <local directory> [ <remote directory> ] ]
 *.txt F:\FTPShare\ftp\
 close
exit

The challanges i'm facing are:

1) The Old files on the remote server are not deleted, so my script is bring all the files. They have date as a suffix (need help in tweaking my code to get the recent files).

2) Once these files are copied to the local server (DEV), what i'm facing is. The three files have a connection manager each and i have to speciy the exact file name including the date extension each time i need to execute the package. I'm looking for something that is independent of the date extension.

For example i have the files CTA-201307.TXT,CTD-201307.TCT,CTF201307.TXT that i copied from the remote to the local server on to the C drive ( so the 3 connection managers have the location as C:\ CTA-201307.TXT,C:\ CTD-201307.TXT,C:\ CTAF201307.TXT. In August the file names are changed to CTA-201308.TXT,CTD-01308.TCT,CTF201308.TX.

So i have to manually edit these files in the connection managers, so am looking for a way where in i need not go every month and change them manually. Please need help.

Thanks


SV

execute large block of sql using Execute SQL Task

$
0
0

Hi,

I have a sql string about 5000 lines of code needed to run in the remote server everyday around 4am.

Seems liked there is a limit on the length of the SQLStatement in Execute SQL Task.  Because more than half of the code is truncated.

I've tried putting this code using openquery and there are several hundred of ' which break the OPENQUERY.

What is the fastest way to schedule a job running at 4am to get the result set from this monster query?

Thanks!


-- IBM has jobs for USA employee to work oversea (India) and get their wages.

Filename with a defined DateRange in it

$
0
0

Hi Gurus, 

I'm trying to change the file names of  txt files using SSIS expression. But I'm not sure how I can go back 4-2 months from current date. Ex: Today's Date is 8/19/2013. So, If my job runs today or this month,

then my fiile name should be like:

 File1_20130401_20130630.txt

If my job runs next month it should be : File2_20130501_20130731.txt

If you observe the dates it's  like 3 months data and I want start & end dates for that period in the filename.

Please help me with this.Thanks


Variable value not getting changed - Execute sql task

$
0
0


Hi Experts,

My requirement is to fetch data from excel file located in one shared location to another excel file in another shared location using SSIS.
for this I am using a sql server table where I 've stored all the file paths of source and destination.
am using execute sql task to get the file paths of source and destination and keeping result set as single row and want to store them in variables.

I am trying to get the result set of my Execute SQL Task into two variables.
For this I've kept Result Set as single row, In sql statement I've query writeen which gives one result set.
By Pass Prepare is True
In Result set I've given Indexes as 0 and 1 for the two fields which I am getting from sql query to two variables of type string.

and then I've Data flow task to load data from excel source to excel destination. when my query result changes the variable value is not getting change ..could you please help me what should I do for this.

--NoorBi

Unable to open SSIS package using Visual Studio 2010

$
0
0

Hi,

I'm using Visual Studio 2010 and I can't open any SSIS packages but my coworkers can. I get the error, "X cannot be opened because its project type (.dtproj) is not supported by this version of the application."

Again, my coworkers use the same version of VS and they CAN open SSIS packages. I don't know what's different about my setup.

I heard it might have something to do with BIDS, but I don't know how to check. Can anyone point me in the right direction?


Project Structure for packages

$
0
0

I am working on a project that will have numerous SSIS packages from approximately 6-7 different source databases.  I have start to create separate Visual Studio Projects for each related source.  All of the projects are in the same solution but I wanted to keep the packages separated logically by source.   

Is it better to simply put all of the packages in one Project under one solution or is having multiple packages in one project a better approach ?


Thanks,

SSIS Development...Cache and Lookup Transformation vs. Index/Materialized Views

$
0
0

I'm in the process of creating and testing new templates for my company's SSIS packages. A colleague and I are debating/wondering about Cache and Lookup Transformation vs. Index Views (materialized views). These packages will be used for incremental loads....

with these in mind, does anyone have any guidelines, suggestions or things I should keep in mind as we determine the more optimized route? 

Overall we're looking to reduce current package execution times. I personally don't see the use of materialized views b/c of the required data maintenance, restrictions in script, etc.

error in converting nvarchar to varchar with derived column does not solve covert error problem

$
0
0

Hi

I have a source table with nvarchar data type and a destinationvarchar data type.

I am using the derive coloum transformation editor in the following way:

MyColumn   Replace 'MyColumn'     (DT_STR,256,1252)MyColumn

But still getting a cannot convert between unicode and non unicode data type strings in the following OLD DB destination.

What am I doing wrong ?

Thanks,

Dani

How to use that excel Data in Lookup Transformation

$
0
0
 Let’s say if we have some reference data in Excel and we want to use that excel Data in Lookup Transformation, how we can achieve that without loading into staging or temp table

How do i set Project Parameter Value Programatically

$
0
0

My application is 4.0 console application

My packages are SSIS 2012 Project Deployed.

I am trying to set a project parameter value programatically before calling package.Execute.

I am able to call : project.Paremter("My parameter").Set()....this sets the defaultvalue property to the value i am setting. The design default value remains the same.

And when the package starts executing, it uses the design parameter and not the defaultvalue i just set.

Please help!!!



sharepoint 2010 The permissions granted to '*****\*****' are insufficient for performing this operation (reAccessDenied)

$
0
0

Users are get the following error: The permissions granted to '*****\*****' are insufficient for performing this operation (reAccessDenied) sharepoint 2010. From project server 2010 site BI on sharepoint 2010 database SQL 2008 r2 running in

Sharepoint integrated mode. This was working fine don't know how to fix the issue please help>

SSIS foreach loop ADO enumerator (records from one table to another table after 10 records)

$
0
0

I have a database source table and database destination table. I need to load data from first table to second table using a foreach loop.
The normal situation is that rows are loaded singly (is that true?), but I need to repeat loop after load by ten records. The reason why I want to use a loop is that I want to have overview over the course of loading the data.

This is what is done:

  • I have an sql task where I select all of the records from source table and save to full result set as an object variable.
  • Drag and drop foreach loop container and set ADO enumerator and set object variable.

Can someone help me with the next steps?

Date Conversion

$
0
0

I have couple of csv's coming from different sources and different date formats viz dd/mm/yy; mm/dd/yy ; mm/dd/yyyy i want to convert all of these formats to one universal format irrespective of whichever format style. This i want it to be done in SQL Server. 

Can we create a data table with default value as mm/dd/yyyy HH:mm:ss 

I intended to create the starting field entry as 01,January,1900 00:00:00

Is this possible for multiple csv throwing different formats from different machines?

Thanks in Advance

SSIS Lookup - Set values programmatically

$
0
0

For the SQL 2008 R2  SSIS Lookup Transformation, how do I get the 'Modify the SQL statement' checkbox to be selected programmatically? I can change it through the front end, but I can't find the property to change it programmatically.

As I set the properties:

.SetComponentProperty("SqlCommand", "SELECT [Lookup_Code], [Product_I] FROM [vSource]")

.SetComponentProperty("SqlCommandParam", "SELECT * FROM (SELECT [Lookup_Code], [Product_I] FROM [vSource]) [refTable] WHERE [refTable].[SUB_SYNM_C] = ? OR (SUBSTRING([refTable].[Lookup_Code], 1, 3) >= ? AND SUBSTRING([refTable].[Lookup_Code], 1, 3) <= ? AND SUBSTRING([refTable].[Lookup_Code], 4, 3) = 'XXX')")

As I need to use <= and >= comparisons.

But the checkbox is never ticked, can anyone please tell me what I need to do to tick the check box?

Kind Regards 

Rambabu.S


Convert DT_WSTR to DT_Datetimestamp

$
0
0

Hi I have vb6 code ("VALID_DATE") = FormatDate(Mid(Table_Fields(1), 85, 8)),for which i have converted it to SUBSTRING(Data_table,95,8)...

I want to convert SUBSTRING(Data_table,95,8) to (DT_DBTIMESTAMP) in derived column because my destination table has (DT_DBTIMESTAMP) as datatype.

Please suggest a solution..

Thanks in advance..

Viewing all 24688 articles
Browse latest View live


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