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

Is it possible to write a SSIS expression for getting last month's last date ?

$
0
0

Hi,

 I am generating a simple text file from a table 'Employee'. The output text file name should be dymanic. It should be suffixed with last month'a last date in the format like this 'mmddyyyyhhmmss'.

Eg: If i generate the file on August (8th month), it should be 'Employee_07312014120000.txt' and incase if i execute on Jan 2015, it should be 'Employee_12312014120000.txt'. 

I am not supposed to add anything inside the package.what I have to do is just making the output file name as dynamic (last month date) using the Expression in Connection manager.

I tried this DATEADD(s, -1, DATEADD( mm, DATEDIFF( m,0, GETDATE()) ,0) ) - but getting error like this expression contains unrecognized token "s"

Thanks in advance for your help!


Run package on coindition basis

$
0
0

Hi ,

I have 10000 records. First time I have to load 1 to 1000 records, second run I have load 1000 to 2000 records and third load I have to load 2000 to 3000 rows. How will achieve.

Thanks in advance .

regards,

Vipin jha


Thankx & regards, Vipin jha MCP

Can you mix deployment and configuration schemes?

$
0
0

I've moved a package from being deployed from the file system to the SSIS Catalog. I built the package using configurations that are set from a database table and reading environment variables. These configurations 90% of the time are in the form of file paths on various machines.

When I execute the package from the Catalog, it indicates that it has ran successfully but nothing happens. No files get moved, nothing gets downloaded. Basically anything having to do with a file doesn't actually occur. That lead me to this post:

http://social.msdn.microsoft.com/Forums/sqlserver/en-US/6d3059ea-e251-4818-ba2d-8e773c7a1db5/ssis-job-is-running-with-no-errors-but-doesnt-do-anything?forum=sqlintegrationservices

I thought this might have something to do with it, however, one of the file paths that I'm passing is a remote SFTP server that doesn't even have a drive letter. That said, one of the inputs is the path to winSCP which DOES have a drive letter in it, indicating that it's possible that WinSCP isn't even being kicked off anyway.

Is it not possible to have absolute references in packages when it's deployed in the Catalog?

Hyperlink formula not work when export from ssis

$
0
0

Hi, I have export a hyperlink to a excel file from ssis, the text is like =hyperlink("http://...", "frendlyname"). when I open the excel, this column does not turn into a link. if I copy from the result set of the sql code to excel, it works.

Can anyone help? Thanks advance.

Difference between truncating table in execute sql with ADO.NET and OLEDB connection

$
0
0

May I know is there a difference between truncating table in execute sql task with ADO.NET and OLEDB connection?

Which one should be utilized? 


Mudassar

Panel, execute task and bar. Stupid issues.

$
0
0

Hi all, I'm getting a little bit upset with BIDS. I can understand two thing:

1) Sometime I can run the package ( totally or partially) from the panel just with right click, execute task. Sometime I don't have this possibility and so I need to run directly the package with a double click on it and execute.

2) I used to have the toolbox and the solution explorer bar directly on the two side of the panel. Now both disappeared so every time I need I must go on View --> Toolbox ( or Solution Explorer).

Do you have any advice for these stupid little issue that slow down my activity?

Thanks in advance.

  

SSIS Package drops and recreates constraint

$
0
0
My SSIS package is apparently dropping a constraint and later recreating it.  So I deleted the constraint.  When I reran the package the constraint was back.  Somewhere in the package in a location I can't see/don't know about is the information on the constraint.  The primary purpose of the package is a number of Data Flow Tasks.

audit table SSIS

$
0
0

Need to create pacakge log

1) Data Flow Task Name - System::TaskName
2) Package Name - System::PackageName
3) Executing Date - GETDATE()
4) # Input Rows - Name of the variable, that points to the Row count transformation immediately after the Source.
5) # Target Insert Rows - Name of the variable, that points to the Row count transformation immediately before the target (where data is inserted).
6) # Target Update Rows - Name of the variable, that points to the Row count transformation immediately before the target (where data is updated).
7) Load Status - Where to get this information?
8) Duration - DATEDIFF([System::ContainerStartTime] , GETDATE()]

I refered http://social.msdn.microsoft.com/Forums/en/sqlintegrationservices/thread/73ff6495-a534-4fe8-9cc1-e30c49280331

but package sample is not found..

please provide me package sample to do the task


ShanmugaRaj


remove duplicates rows by date (min)

$
0
0

I customer dimension where the customer can be identified by three kind of numbers different. 
I have to load this dimension whithout customer duplicates, and the identified number can exist or not.
for example

id1    id2    id3       date 
122  null null      2014/02/01
122   22 null     2014/02/02
123    null   333     2014/12/01
nulll     333 null     2014/12/23
null     null  333      2014/11/23

I want first row for each customer, after I need make a ssc type 1.
the result would is:

id1    id2    id3       date 
122   22    null     2014/02/02
null     null  333      2014/11/23
nulll    333  null     2014/12/23

best regards

thanks, David

SSIS fails to load files from network when executed via SQL server Agent (SQL server 2008 R2 SP 2)

$
0
0

Hi All,

I have a simple SSIS package that reads a flat file and copies it into a SQL Server table.

When the flat fiel is on the C drive I have no problem runnign this package from SQL Server Agent, but as soon as I update the path to a network location the package only works when I run it manually, but fails when is executed via the SQL Server agent job.

The error says "cannot open the datafile", while the datafile location is valid.

Is this a kind of limitation of a SQL Server Agent that only local files are allowed to be processed?

Thanks,

Andrei


SSIS question

Using Oracle Data Source in SSIS using Attunity

$
0
0

Hi,

I am using the oracle data source in SSIS.

* Created the expression that will have query to select source column.

* I need to extract only rows having specific date. This date is a dynamic one i.e Created a variable1 which will be update by function call(return type is datetime) for time being i have assigned the value(datetime type).  

* I have created one more variable2(string type) which will extract only date(dd-mon-yyyy). Below is the query i used.

{"select cast(DATEPART(dd, @[User::Cob_Dt] )as char(2))+'-'+cast(DateName(mm,DATEPART(mm, @[User::Cob_Dt] )) as varchar(3))+'-'+cast(DATEPART( yyyy, @[User::Cob_Dt] ) as varchar(4)) "}

* In source query expression i have used the variable but it showing "as missing expression". Though i tried a lot i cant get. some one please help. Below is thquery

{select * from table_name where ud.system_date =@[User::Date] and... }

I have tried different formats like enclosing that between quotes(shows same error), then used to_Date() in oracle again shows same error.

If i hard code the value instead of @[User::Date] means its working well. 

SomeOne please help me why that error is showing. I cant able to figure out. trying for whole day. PLEASE.

Thanks,

Mahalakshmi


mahalakshmi

Unable to open SSIS packages in designer mode

$
0
0

Hi All,

It seems somebody has uninstalled BIDS from a machine. I can no longer see BIDS in Sql server 2008R2 components in Programs menu. Also unable to open packages in designer mode. When running setup to add it we are getting Registry configuration check error. We need to add BIDS to existing installation by bypassing registry check. Kindly suggest.

Regards

Rahul

SQL Script to loop

$
0
0

Hi Guys,

At the moment I want to send an email to each supplier with outstanding orders. I have got the loop setup correctly in SSIS but I have an issue with my script.

Here's the script Below.

USE db

SELECT *

FROM

(

                SELECT d.email,

                o.identity,

                STUFF((SELECT ',' + stats + ' ' + parts

                                FROM orderits

                                WHERE orderid = o.identity

                                AND DATEDIFF(d, CURRENT_TIMESTAMP  , duedate) = 8

                                FOR XML PATH(''), TYPE).value('.', 'NVARCHAR(MAX)'), 1, 1, '')

                                AS items

                FROM orders o

                INNER JOIN traders t

                ON o.traderid = t.id

                INNER JOIN email d

                ON t.id = d.traderid

                GROUP BY o.identitfication, d.email

) AS x

WHERE x.items IS NOT NULL

So at the moment I am getting seperate rows per order. So when I run the loop I Email per order. How would I concatenate orders so it could be one email per supplier, with all the order info.

So my output looks like this at the moment

email                                     order                                   items

test@123.com                         123                                  STAMP, LETTER ETC

test@123.com                        124                                   PEN Pencil

test@123.com                            125                                    RULER

So ideally want a single line for the email with the order column and items columns joined so looks like the following..

email                                     order                                   items

test123.com                           123,124 125                           STAMP, LETTER ETC pen pencil ruler

Any ideas? Thanks

Not able to execute Package from WCF service hosted in IIS

$
0
0

Dear team,

I have very simple SSIS package(Source- Excel, Destination : SQLserver using SSPI).
I am able to run execute the package and able insert records in DB via directly SSIS project or referring SSIS project in WCF/console application.

But when I refer this package in WCF service and host it to IIS package , am not any getting error while executing service or package NOT able insert records to DB.

Tried with windows, Anymous acess and Custom account for application pool in IIS.

Kindly assist me.

Thanks


SSIS and Enetrprise Libraray 4.0

$
0
0

Hi,

I am trying using enterprise libray from a script component to log errors in database.

I am getting the following error when it tries to log data

Windows cannot find ‘Microsoft.Practices.ServiceLocation.ActivationException was
unhandled by user code HResultt-2146233088 MessagezActivation error occured while
trying to get instance of type LogWriter, key “? Source=Microsoft.Practices.ServiceLocation
StackTrace: at
Microsoft.Practices.ServiceLocation.ServiceLocatorlmplBase.Getlnstance(Type serviceType.
String key) at
Microsoft.Practices.ServiceLocation.ServiceLocatorlmplBase.Getlnstance[TService]O at
ScriptMain.Input0_ProcesslnputRow(Input0Buffer Row) in
c:\Users\Administrator\AppData\Local\TempU\VstaU5Oc5bdfd83l4l33b336fl3b6d4eb...:line
131 at UserComponentJnput0_Processlnput(InputoBuffer Buffer) in
c:\Users\Administrator\AppData\Local\Temp\1\VstaU5Oc5bdfd83l4l33b336fl3b6d4eb...:line
36 at UserComponent.Processlnput(1nt32 InputlD, String InputName, PipelineBuffer Buffei
OutputNameMap OutputMap) in
c:\Users\Administrator\AppData\Local\TempU\VstaUSOc5bdfd83l4l33b336fl3b6d4eb...:line
27 at Microsoft.SqlServer.Dts.Pipeline.ScriptComponent.Processlnput(1nt32 InputlD,
PipelineBuffer buffer) at
Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost.Processlnputønt32 inputlD,
PipelineBuffer buffer) InnerException: Microsoft.Practices.Unity.ResolutionFailedException
HResult= -2146233088 Message= Resolution of the dependency failed, type =
“Microsoft.Practices.EnterpriseLibrary.Logging.LogWriter, name = “(none)”.Exception
occurred while: while resolving.Exception is: InvalidOperationException - The type LogWriter
cannot be constructed, You must configure the container to supply this
value. At the time of the exception, the container
was: Resolving Microsoft.Practices.EnterpriseLibrary.Logging.LogWriter,(none)
Source= Microsoft.Practices.Unity TypeRequested= LogWriter StackTrace: at
Microsoft.Practices.Unity.UnityContainer.DoBuildUp(Type t, Object existing, String name,
IEnumerable’l resolverOverrides). Check the spelling and try again.

I have registered the dlls in GAC as well as places in the DTD\BINN folder.

Am i missing any part.

Thanks.


Thanks and Regards, Saket Kadam


how to get select * in DFT

$
0
0

hi

in my data flow task , i need to get value like 'select clientid from client where name ='xyz' ' into one column. which i need to add as  a nee column. so here the result will be static.

i tried look up ,but i dont hv any column to join , so i cannot use it.

i tried derived column but not working.

also this is int into table .

any help

look up

$
0
0

i m using lookup in my ssis package,

the issue is table have more than 1 value matching

example

ID        perid

45           1234

45           3456

so in the above case if same id match to more than 1 distinct perid then i need to remove that rows from my table.

before i use look up , so that look up can match 1 to 1 . how to do it in data flow task

Can not edit a "Script task" with error message

$
0
0

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

I try to edit the vb.net script in script task that I developed and get this message.

Any idea what happen and how to fix this.

Cannot show Visual Studio 2008 Tools for Applications editor.

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

Failed to create project at location "C:\Documents and Settings\pchen\Local Settings\Temp\2\SSIS\78a8360ded6b4c719c8aae52ac7483bb"! (Microsoft.SqlServer.VSTAScriptingLib)

------------------------------

The given path's format is not supported. (mscorlib)

 

using ssis to transfer data from sql server to excel

$
0
0

Hello,

I created an ssis package to transfer data from sql server to excel.  I used the data conversion tool to do some conversions. I ran the ssis package. The package ran successfully but the rows were outputted half way down the page. I also get the following error messages. Please can someone help?  Thanks dee

SSIS package "Appointments.dtsx" starting.

Warning: 0x0 at Preparation SQL Task: Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.

Warning: 0x0 at Preparation SQL Task: Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.

Information: 0x4004300A at Data Flow Task, SSIS.Pipeline: Validation phase is beginning.

Warning: 0x800470C8 at Data Flow Task, Excel Destination [3117]: The external columns for component "Excel Destination" (3117) are out of synchronization with the data source columns. The external column "Name" needs to be updated.

The column "DateOfBirth" needs to be added to the external columns.

The external column "Sex" needs to be updated.

The external column "Language" needs to be updated.

The external column "CustomerReference" needs to be updated.

The external column "CustomerInternalKey" needs to be updated.

The external column "HomePhone" needs to be updated.

The external column "ContactPhone" needs to be updated.

The external column "ContactDescription" needs to be updated.

The external column "MobilePhone" needs to be updated.

The external column "EmailAddress" needs to be updated.

The external column "FaxNumber" needs to be updated.

The external column "Address" needs to be updated.

The external column "Postcode" needs to be updated.

The external column "CustomerAgent" needs to be updated.

The external column "Location" needs to be updated.

The external column "CustomerInternalData" needs to be updated.

The external column "Type" needs to be updated.

The external column "TimeOfDay" needs to be updated.

The external column "Date of Birth" (3134) needs to be removed from the external columns.

Error: 0xC004706B at Data Flow Task, SSIS.Pipeline: "component "Excel Destination" (3117)" failed validation and returned validation status "VS_NEEDSNEWMETADATA".

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 "Appointments.dtsx" finished: Failure.

The program '[5680] Appointments.dtsx: DTS' has exited with code 0 (0x0).

export data to micro enable excel using ssis 2008

$
0
0

Hi

i ahve excel spreadsheet with micro enable and file extension is .xlsm. now i want to export data to this file using ssis 2008 and also i want to overwrite the data every time i export .belwo is the format.

pleaes advise any suggestions and ideas.

Viewing all 24688 articles
Browse latest View live


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