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

WMI and UNC paths from SSIS pacakge

$
0
0

HI, I want to listen the creation of a new file in a remote folder from my SSIS package but it does not work.

Does the scope is missed?

Using either of the following approaches:

1)

By using xp_cmdshell I am doing the mapping to Y: drive

exec master..xp_cmdshell ' net use Y: \\myserver\L$ /user:myADaccount mypassword /PERSISTENT:YES '


In spite of no errors, the Y: drive is not really created in the server


2)By using the "Execute Process Task" with exe = CMD.exe and params as follows:


NET USE Y: \\myserver\L$  /user:myADaccount mypassword  /PERSISTENT:YES

Here raises a DOS window with the prompt linked to my VS PRoject: C:\AdminSql\folder\folderIntegration Services Project1>

After the assignment the idea is run the second step:


Just call the WMI Event Watcher Task calling my SSIS variable. My understanding is WMI will not recognize a path out of the own caller for that reason I am trying to create a map drive...

My SSIS variable contains:

SELECT * FROM __InstanceCreationEvent WITHIN 10

WHERE TargetInstance ISA 'CIM_DataFile' AND TargetInstance.Name = 'Y:\\myfolder\\subfolder\\PromoTest.xls'


In visual studio, some SSIS tasks send text to the output window. Others don't, Why?

$
0
0

Hi,

When I am executing a package in Visual Studio, Information appears in the Output window for some SSIS tasks but not others.

In fact it appears to stop altogether following one particular task.Is there a setting somewhere which controls this?

Thanks

Loop through Servers stored in Config table and construct SELECT query with values from same table and run the select statement

$
0
0
CREATE TABLE #TableConfig (ID int identity(1,1), ServerName varchar(100), DatabaseTable varchar(100), KeyColumn varchar(50), WhereFilter varchar(200))
INSERT INTO #TableConfig ( ServerName, DatabaseTable, KeyColumn, WhereFilter )
SELECT 'ServerUS1', 'DB1.dbo.ClaimInfo'	, 'ClaimNo'		, 'TermDt< dateadd(yy,-5,getdate())' UNION 
SELECT 'ServerUS2', 'DB2.dbo.MemInfo'	, 'MemNum'		, 'TermDt< dateadd(yy,-5,getdate())' UNION 
SELECT 'ServerUS3', 'DB9.dbo.CandInfo'	, 'CandNum'		, 'TermDt< dateadd(yy,-5,getdate())' UNION 
SELECT 'ServerUS4', 'DB8.dbo.ProvInfo'	, 'PRovNum'		, 'TermDt< dateadd(yy,-5,getdate())'  

SELECT * FROM #TableConfig tc

Just created this Temp as an example. My scenario, i have a physical table with hundreds of rows.

Requirement is to Loop through all the rows from this TableConfig table. 
Go to first row, look for ServerName value and then connect to that server and construct SQL like

" SELECT KeyColumn FROM DatabaseTable WHERE WhereFilter "  and run this and INSERT data into Target table.---- KeyColumn, DatabaseTable and WhereFilter are from same Configtable

Then go to 2nd,3rd and so on and do same thing..

Any help is appreciated. Thanks



How to declare global variables in SSIS 2017 that are visible to all packages in the project

$
0
0

I created a project in Microsoft Visual Studio - SSIS 2017 that contains 32 packages. 

I have 4 variables that I would like to declare that needs to be global to all packages.   I can create variables that are visible to one package. 

How can I make these variables global to all packages?   Is there a simple way to do so?

Thank you

AcquireConnection method call to the connection manager Source_Connection failed with error code 0x80004005.

$
0
0

Get below error when connecting to oracle connection using attunity connection. In conncection manager it shows the test connection successfull and even the preview works on the oracle source task. However when i run the package from ssdt it gives below error. I tried changing the connection host:port/servicename and even tried changing the configuration->debugging->debugoptions -> Run64bitruntime from true to false but still the same error.

[Oracle Source [328]] Error: The AcquireConnection method call to the connection manager Source_Connection failed with error code 0x80004005.  There may be error messages posted before this with more information on why the AcquireConnection method call failed.

SSIS format XML data

$
0
0

I have below sample data stored as XML document.

<List><FirstName>abc</FirstName><LastName>def</LastName></List>

I want to format the file in below format and save as XML document.

<List>
<FirstName>
     abc
</FirstName>
<LastName>
     def
</LastName>
</List>


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

Any help much appreciated.

Upgrade SQL Server 2008 R2 Standard Edition to SQL Server 2012 Standard Edition

$
0
0
Hi, I'm trying to upgrade an SQL Server 2008 R2 Standard to 2012 SP1 Standard and the check fails
"Upgrade Rules" in "SQL Server 2012 Feature Upgrade".

SSIS package to import W2 report

$
0
0

Good day, 

I'm working on a solution to create SSIS package to import SSA formatted files that employers would send. Project would use https://www.ssa.gov/employer/efw/19efw2.pdf#zoom=100  fixed file formatting and standards. I have created import process, tables and that's all working well and data is inserted. I have couple of issues I'm trying to overcome. Since RE record is the one that should link to RW and RS files how do I go about getting with EIN value or even better ID value (W2ReportID int) from a table (W2EFileRE) that RE record is inserted in. RW and RS rows don't have any EIN info.

Another issue is that there could be multiple RE rows in the fixed file that agency sends, and each RE row would indicate that records below it belong to the RE row above them (hopefully that makes sense). File looks kind of like this:

RA..... (agency that's reporting info)

RE..... (employer info)

RW.... (employee wages)

RS.... (employee state city reporting)

RE... (another employer info)

RW...

RS...

Thank you



The requested OLE DB provider Microsoft.Jet.OLEDB.4.0/failed to aquire connection for .xls excel file

$
0
0
Getting failed to aquire connection on an excel file running in an SSIS package in a sql agent job. the job step error states  The requested OLE DB provider Microsoft.Jet.OLEDB.4.0 is not registered. If the 64-bit driver is not installed, run the package in 32-bit mode, I have installed the ace 12.0 provider from microsoft accessdatabaseengine and I am running the ssis package in 32bit mode. The server is a 64bit, windows 2016 standard ed server with sql server 2014 standard ed installed. The packages are stored on the file system and running in an agent job. What am I missing here?

ssis vb script

$
0
0
how to use variable values in replace function using vb script.

one variable I am getting value 
variable name :address and getting values :bangawore
and another variable replvalue and values is l
outputvariabl: finalvalu and value should be come bangalore

I need to replace w to l using replace function 
Finaly output should be bangalore



dim address1 as string
dim replvalue1 as string
dim replace as string

address1= Dts.Variables("User::address").Value.ToString 

replvalue1=Dts.Variables("User::replvalue").Value.ToString 

Dts.Variables("User::finalvalu").Value=replace (address1,"w",replvalues1)

but above one is not replaceing the value

could you please tell me how to achive this task in ssis vb script.

SSIS: Package is missing from proj file

$
0
0

I'm making a new SSIS package for a project. I click "New Package" and new package file under the project is made with default name Package1.dtsx. The .dtproj project file is updated to include this package. Then I rename the package to the name it's supposed to have "Publish_File.dtsx" but the .dtproj file doesn't update with this new name. Then it fails at compile time because the package I made isn't in the scope of the project and so doesn't have the project-level connection managers. I can't directly edit the .dtproj file because it doesn't have any information until it's built. Does anyone know how to change the name referenced in the .dtproj file to be my file name instead of Package1.dstx?

Additionally I cannot undo changes to the .dtproj file. When I click undo changes nothing happens and it remains the changed files list preventing me from merging my master branch onto the feature.

SSIS Environment variables not considering while executing package from ssis catalog

$
0
0

Hi,

Issue: I had created my first package using Project deployment model, deployed package into sql server 2017 catalog. Package have project parameters InitialCatalog and ServerName. Created environment variables in Integration services catalog, added it in the references in the project properties. while executing package referred to the environment variables, execution is successful and also could see parameters are correctly referred as per the reports which are automatically generated. But i see no values are inserting in a table. The package is very simple just inserting into a table, which is successful during package execution on solution explorer.

Please help, i have watched many videos and followed same as they suggested, couldn't figure out. I have been trying all ways and checked many sites.



Use Uservariable for Filename

$
0
0
How can I use the value of a Uservariable "Filename" as destination in DestinationConnetctionFlatFile?

Jochen Rieseberg

Could not load file/assembly 'CustomMarshalers.dll' or process can not access file because it is using by another process.

$
0
0

Hi Team

SSIS Package is failing once in a while with "Could not load file/assembly 'CustomMarshalers.dll' or process can not access file because it is using by another process." issue. CustomMarshalers.dll is present in the GAC, I expect same DLL is used by some other package in same time.

Is it not possible to refer two different packages to same DLL ?

Could you please suggest how to overcome this issue ?

Thanks & Regards,

Sriram

Webservice not working as excpected

$
0
0

For the first time i’m trying to use a webservice in SSIS.

The webservice I’m trying to use is: http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl

To test this webservice I use: https://wsdlbrowser.com/

I want to use the function CheckVat. There are two input fields, countrycode and vatnumber. The method returns the requestdate, valid, name and adress.

Request XML:

<?xml version="1.0" encoding="UTF-8"?>

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:ec.europa.eu:taxud:vies:services:checkVat:types">

 <SOAP-ENV:Body>

   <ns1:checkVat>

     <ns1:countryCode>NL</ns1:countryCode>

     <ns1:vatNumber>801837236B01</ns1:vatNumber>

   </ns1:checkVat>

 </SOAP-ENV:Body>

</SOAP-ENV:Envelope>

Result:

<soap:Envelope

   xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

   <soap:Body>

       <checkVatResponse

           xmlns="urn:ec.europa.eu:taxud:vies:services:checkVat:types">

           <countryCode>NL</countryCode>

           <vatNumber>801837236B01</vatNumber>

           <requestDate>2020-01-20+01:00</requestDate>

           <valid>true</valid>

           <name>GEMINI TECHNIEK B.V.</name>

           <address>

METAALSTRAAT 00022

7483PD HAAKSBERGEN

</address>

       </checkVatResponse>

   </soap:Body>

</soap:Envelope>

After checking this I created a simple test SSIS Package.

At first I create an Execute SQL Task that executes this query:

select 'NL' as countrycode, '801837236B01' as vatnumber.

Resultset: full result set

The resultset name = 0 and the variable name is use is User::Relations

The next step is to create a foreach loop that loops through the recordset. (Foreach ADO Enumerator)

In the loop I’ll add the web service task. In this task I’ll create an new HTTP connection with server URL: http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl

I downloaded the WSDL file and stored this file in the projectfolder. When i choose to overwrite the WSDL file and click download: the specified web services description language file was downloaded successfully.

Then I defined the Inputs. So I selected CheckVatService as the service and i’ve chosen CheckVat as a method.

Instead of only the countryCode and the vatNumber, SSIS displays 5 input variables: countryCode, vatNumber, valid, name and adress. These are the output columns?!?

For this test I use a file connection as output.

The package does now look like this:


When I run the package I get an error:

[Web Service Task] Error: An error occurred with the
following error message:"Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebserviceTaskException:
Could not execute the Web method. The error is: Could not create an object of
the type ProxyNamespace.Boolean&. Check whether the default constructor
exists..   at
Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebMethodInvokerProxy.InvokeMethod(DTSWebMethodInfo
methodInfo, String serviceName, Object connection)   at
Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebServiceTaskUtil.Invoke(DTSWebMethodInfo
methodInfo, String serviceName, Object connection, VariableDispenser
taskVariableDispenser)   at
Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebServiceTask.executeThread()".

The first field that I didn’t map tot the input fields is of type boolean… If I map ‘dummy’ variables with no value to the remaining input fields I get no error, but no output either. The output file consist of only the xml header:

<?xml version="1.0" encoding="utf-16"?>

<dateTime>2020-01-20T00:00:00+01:00</dateTime>

Is there something I'm missing? or is the webservice not suitable to use in SSIS.


The new connection manager could not be created.

$
0
0

I had to reinstall the June CTP and now when I right click in the connection manager area and try to create a new OLEDB connection I get this message:

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

The new connection manager could not be created.

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

The connection manager 'OLEDB' is not properly installed on this computer. (Microsoft.DataTransformationServices.Design)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%u00ae+Visual+Studio%u00ae+2005&ProdVer=8.0.50215.44&EvtSrc=Microsoft.DataTransformationServices.Design.SR&EvtID=ConnectionManagerNotInstalled&LinkId=20476

I can however create MSMQ,WMI,SMO,SMTP connections.  (Coincidentally these are the ones defined in C:\Program Files\Microsoft SQL Server\90\DTS\Connections\Microsoft.SqlServer.ManagedConnections.dll

Can anyone help me fix this?

Thanks.

using import export wizard to export data as csv file from stored procedure

$
0
0

Hey ALL.

I have created a stored procedure which returns a table with 2 columns.

Is it possible to use import export wizard to export this table as a csv file?

What is the sql statement to use as the source query on the import export wizard?

Thanks!

SSIS Load to table results is different from SSMS query

$
0
0

I'm going to try to explain this odd results as best as I can.

Say I have an application server, it has an SQL database. I'm attempting to load details from a table from that application database to another server's database for reporting purposes. 

So, I have a SSIS package created. It pulls in all details for customer orders. Lets call this table Customer_Orders_Source.

In my Data Flow, for my Read From Data Source, I have my SQL query, it runs with no problem. 

I have my load to table, everything seems good. My package will load all details from Customer_Orders_Source from the application server, to a table called Customer_Orders_Rpts on the reporting server database. 

I run the package. It runs successfully. 

Now, from running my query on the application server, I know that for example customer_id '55110' has 6 unique transactions. 

However, after the package runs and I check my target table ' Customer_Orders_Rpts', only 1 row returns for this customer. Run the package again and still only one row returns, but another transaction. 

SO let's say the first time I ran the package, the result was for customer_id= 55110, transaction_id= '2'. The second time I run the package, the result would change to customer_id=55110, transaction_id='4'.

So the results are alternating, but why? Can anyone explain and assist me in finding a solution for why the results are less when I run the package as oppose to when I run my query directly in SSMS. 

I've tried recreating the package. 

A similar question suggested checking the permissions, although I'm not sure how or which permissions to check since I do have other packages running that seem to pull in all details. Same application server, same destination. 

Excel Connection manager for Office 365

$
0
0

I have office 365 and am trying to create an Excel connection manager for it.

The goal is to export data from a SQL Server 2014 table into MS Excel.

I am using Microsoft Visual Studio Community 2017 to create and configure the SSIS package.

I am in development environment.

I get the following error message:

TITLE: Microsoft Visual Studio
------------------------------
Could not retrieve the table information for the connection manager 'Excel Connection Manager'.
Failed to connect to the source using the connection manager 'Excel Connection Manager'
------------------------------
BUTTONS:
OK
------------------------------

In my Excel Connection Manager I do not see an Excel Version for Office 365.

The latest version is Excel 2016

This problem is a real difficult issue

Any help would be greatly appreciated

Thanks


Which project template to select

$
0
0

Hi everybody,

I'm pretty new to SSIS as I haven't been actively using it. I have 149 text files on the network I access using VPN and I also have access to the Azure databases and I created a new DB and a table to where I'd like to load data from all these 149 files.

I have VS 2019 Community and I installed Data Tools so now I have project templates to select from. And so my very first question is this one: for the task I outlined above which of the projects types should I select and does it matter?

Also, if you know a simple site that will guide me through the process of creating this project and running it, I'd appreciate it too.

The one I found so far and was about to follow is this one

https://www.sentryone.com/blog/how-to-loop-through-files-in-a-specified-folder-load-one-by-one-and-move-to-archive-folder-using-ssis

But right now I'm undecided as which project type to chose.

I have another problem which I'm not yet sure how to tackle - for a slightly different project I need to do something similar, but the files are PDF files. I need to somehow extract the info from them. Can you also suggest an approach for that?

Thanks in advance.


For every expert, there is an equal and opposite expert. - Becker's Law


My blog


My TechNet articles

Viewing all 24688 articles
Browse latest View live


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