Dynamic Database Connection - EXCEL To SQL Server

Feb 5, 2007

Hi *, is there a way to connect Excel to SQL Server so that Excel serves as a frontend to SQL Server? I heard rumors that this is possible with the 2007 release.

I'm looking for a product that helps me storing massive data outside an Excel file. Right now, I'm using Palo (open source multidimensional database).

Regards,
Steve

View 7 Replies


ADVERTISEMENT

HELP - Cannot Use Dynamic Connection String With Excel?

Aug 23, 2007

This method has worked beautifully for all my SSIS pkgs thus far.

Basically, I use a Script Task to derive the name of the newest file in a local directory. Then I save the name of the file to user a user variable, e.g. User::File.

Then, in my flat file properties > Expressions, I set "ConnectionString" to reference User::File.

However, when attempting to use this method with an Excel source, I get this error message:

Error at myPkg [Connection manager "Excel Connection Manager"]: The connection string format is not valid. It must consist of one or more components of the form X=Y, separated by semicolons. This error occurs when a connection string with zero components is set on database connection manager.
Error at myPkg: The result of the expression "@[User::Folder]+ @[User::File]" on property "ConnectionString" cannot be written to the property. The expression was evaluated, but cannot be set on the property.


HELP......... I need this to work!

Thanks

View 18 Replies View Related

Dynamic Connection String In Excel Source

Apr 14, 2008

Hi all,
I am able to set dynamic source for the text file(flat file) but i want to set the connection string (file name) to excel source dynamicaly. I have tryied lots of time by taking a variable in foreachloop container . Variable is itself able to pick the file name dynamicaly but whern i am tying to set connectionstring to excel source it gives error.

Steps that i have done: -

1) Drag foreachloop container
2) set directory,FileNameRetrieval,FileSpec
3) Made VariableMapping

4) Now drag a dataflow task in the foreachloop container
5) select excel source
6) When i am selecting varaible as connectin string from properties of excel connectin manager, i am getting this error : -


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

Error at Package3 [Connection manager "Excel Connection Manager 2"]: An OLE DB error has occurred. Error code: 0x80040E4D.

Error at Data Flow Task [Excel Source [1]]: The AcquireConnection method call to the connection manager "Excel Connection Manager 2" failed with error code 0xC0202009.



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

Exception from HRESULT: 0xC020801C (Microsoft.SqlServer.DTSPipelineWrap)

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

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

Please help me, whats the problem? can i set connectionstring via variable to excel source

View 6 Replies View Related

Dynamic Connection String In Excel Source

Apr 14, 2008



Hello,

Kindly give me the solution ASAP how to do Dyanmic Connection in ExcelConnection manager.

Thanks
Thiru

View 1 Replies View Related

Error In Excel Source With Dynamic Connection

Apr 14, 2008



Hi SSIsians,

I have a package with Excel Destination with dynamic connection.
I did ExcelFilePath = [@user::VarSourceFolder]+[@user::VarSourceFileName]
then i changed the Delayvalidation = True.

When i try to run the package in BIDS it gives the error.
ERROR:
[Excel Source [30501]] Error: An OLE DB error has occurred. Error code: 0x80040E37.
[Excel Source [30501]] Error: Opening a rowset for "DailySheet" failed. Check that the object exists in the database.

It saying there is no sheet in the name of "DailySheet" but when i removed the expression in connection manager property it is working fine.


Please let me know what is the problem OR how to configure the dynamic connection in ExcelSource.

Thanks
Thiru
SE - SSIS
Chennai

View 5 Replies View Related

Dynamic Database Connection In SSIS Without Using A Config File

May 1, 2008

I'm a newbie to SSIS so this question may cause people to point and laugh. I apologise if that's the case.

I have a configuration database that holds connection details to a remote database. I want to use these connection details to dynamically create a new connection to some remote database.

I usually work in with C# where this would be simple but I can't find how to do this using SSIS.

I have found people using configuration files but as I already have my connection data in a table I don't really want to strip it out. (Also, is it a security risk to have database connection strings stored in a config file?)

I have been able to implement a custom script object to build the connection string and assign it to a user variable within the package but can't find any way to then use that variable to connect to the remote database.

Can anyone help?

View 6 Replies View Related

Importing Excel Sheet Which Have Dynamic Column Name And Dynamic Number Of Columns

Aug 25, 2007

Hi Craig/Kamal,

I got your email address from your web cast. I really enjoyed the web cast and found it to be
very informative.

Our company is planning to use SSIS (VS 2005 / SQL Server 2005). I have a quick question
regarding the product. I have looked for the information on the web, but was not able to find
relevant information.

We are getting Source data from two of our client in the form of Excel Sheet. These Excel sheets
Are generated using reporting services. On examining the excel sheet, I found out that the name
Of the columns contain data itself, so the names are not static such as Jan 2007 Sales, Feb 2007 Sales etc etc.
And even the number of columns are not static. It depends upon the range of date selected by the user.

I wanted to know, if there is a way to import Excel sheet using Integration Services by defining the position
Of column, instead of column name and I am not sure if there is a way for me to import excel with dynamic
Number of columns.

Your help in this respect is highly appreciated!

Thanks,


Hi Anthony, I am glad the Web cast was helpful.

Kamal and I have both moved on to other teams in MSFT and I am a little rusty in that area, though in general dynamic numbers of columns in any format is always tricky. I am just assuming its not feasible for you to try and get the source for SSIS a little closer to home, e.g. rather than using Excel output from Reporting Services, use the same/some form of the query/data source that RS is using.

I suggest you post a question on the SSIS forum on MSDN and you should get some good answers.
http://forums.microsoft.com/msdn/showforum.aspx?forumid=80&siteid=1
http://forums.microsoft.com/msdn/showforum.aspx?forumid=80&siteid=1

Thanks



Craig Guyer
SQL Server Reporting Services

View 12 Replies View Related

Integration Services :: Dynamic Database For OLEDB Connection Manager In SSIS

Nov 10, 2015

I am trying to dynamically change my initial catalog in a SSIS project. Each day I get a snapshot of data from the production server. I am performing ETL on that database and loading it into my warehouse. I am trying to put something together so that each day I get the latest snapshot and if its newer then my most recent one I pass that new catalog into the connection manager. I can already run the sql script to compare the two catalogs but I can't populate the connection manager.

View 3 Replies View Related

SSIS - DataFlowTask - Excel Source - Dynamic Excel Template

Mar 13, 2008



Hi,

I am creating an SSIS package witha a Dataflow task, which reads from an Excel source and then uses script component to dumpt the data to multiple tables in Sql Server database

I need to some how make my Excel source dynamic, that is my excel template which i would be using to map the excel columns to script component's input columns would be dynamic..

In other words, I should be able to define the Excel Source, Column Mapping Information, Precedence constraint to the Script component dynamically

Please suggest how could i accomplish this


Regards,
Kalyan

View 8 Replies View Related

How To Present Database In Excel File Using ODBC Connection In ASP.NET

Dec 6, 2007

Hi All, Please help me how to proceed from this situation, my requirement is to present (load) data in excel file and need to access (update/delete) it, the data which is in remote server; I want to connect database using odbc connection through ASP.NET. Please suggest me how to continue.
Thanks to all in Advance.
kolags@hotmail.com
 

View 1 Replies View Related

SQL 2012 :: Excel Spreadsheet Data Connection To Read-only Database

Aug 10, 2015

I've created an excel spreadsheet with a data connection. This data connection uses a query that runs against a read-only database.

The issue I'm having is that the query never seems to finish running against the database, whether I open the Excel spreadsheet to view the data or run the query in SSMS.

I created the connection on the Data ribbon by going to From Other Sources --> From SQL Server and using the Data Connection Wizard.

Is there some kind of setting or property I'm missing that would allow this query to finish running?

View 6 Replies View Related

SQL Server 2012 :: Read Dynamic Columns From Excel File Into SSIS

Nov 11, 2014

I have an excel file which has dynamic columns

i.e. Col1, Col2, Col3 this week. next week i will have a new Col4 in the sheet. This will keep on adding every week.

My problem is to Unpivot the data

Date 8/2/2013 8/9/2013 8/16/2013

Stock 1,561 1,661 1,761

i.e. the abobe table should become as

Date Stock

8/2/2013 1561
8/9/2013 1661
8/16/2013 1,761

How can I unpivot the dynamic columns given that the columns will keep on increasing every week.

View 1 Replies View Related

Connection To SQL Server 2005 Excel VBA / Active D

Jul 17, 2007

Hi,

Currently I am trying to connect to SQL Server 2005 via Excel VBA. I would like to create a connection to the server as I have previously done with my 2000 server. However, the diffence this time is that I am using Active Directory so there are no specific log-in's for SQL per se just Windows Users that are part of groups, any of which could use this spreadsheet. So where-as previously I included the username and password for SQL Server in the connection string I would now like to use the credentials currently logged onto the particular machine.

My previous code was this

Public Function getConnection() As ADODB.Connection

' Create a connection object.
Dim Conn As ADODB.Connection
Set Conn = New ADODB.Connection

' Provide the connection string.
Dim strConn As String

'Use the SQL Server OLE DB Provider.
strConn = "Network Library=DBMSSOCN;PROVIDER=SQLOLEDB;"

'Connect to the Pubs database on the local server.
strConn = strConn & "DATA SOURCE=SQL02,1433;INITIAL CATALOG=dbDataWareHouse;"

'Use a login.
strConn = strConn & " Uid=*******;Pwd=******;"

'Now open the connection.
Conn.ConnectionString = strConn

Conn.Open

Set getConnection = Conn

End Function

Would anyone be able to point me in the eight direction ? Your help would be much appreciated

Many Thanks

James

View 1 Replies View Related

SQL Server Job Fails When SSIS Package Is Having Excel Connection On 64 Bit Machine

May 29, 2008

Hello,

I've SQL Server running on 64 bit. When I schedule a package to run every night which has excel data transformation, it fails. Initally I had a problem running through BIDS also but then I found in project properties you can switch this off by specifying property Run64BitRuntime by false. After going through some forums, many have suggested that when scheduling a package, modify the command arguments to run as 32bit runtime. These command argumnents can be generated from making use of tool DTExecUI.exe Even after using generated command arguments from this tool, it doesn't help.

Below is my command argument and the error message generated.

/FILE "D:DevDWLoadAll.dtsx"
/CONFIGFILE "D:DevDWdevCongig.dtsConfig"
/CONNECTION "customers.dtsx";"D:DevDWcustomers.dtsx"
/CONNECTION "Addresses.dtsx";"D:DevDWAddresses.dtsx"
/CONNECTION "Counties.dtsx";"D:DevDWCounties.dtsx"
/CONNECTION "Countries.dtsx";"D:DevDWCountries.dtsx"
/CONNECTION "ExcelLoad.dtsx";"D:DevDWExcelLoad.dtsx"
/CONNECTION Test;""Data Source=TestDW;Initial Catalog=TestStagingDW;Provider=SQLNCLI.1;Integrated Security=SSPI;Auto Translate=False;"" /MAXCONCURRENT " -1 " /CHECKPOINTING OFF /REPORTING E



Message
Executed as user: DWUserSQLServiceAcc. ...0.3042.00 for 64-bit Copyright (C) Microsoft Corp 1984-2005. All rights reserved. Started: 00:05:00 Error: 2008-05-28 00:06:02.31 Code: 0xC0202009 Source: Excel Load Connection manager "Excel Connection Manager" Description: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040154. An OLE DB record is available. Source: "Microsoft OLE DB Service Components" Hresult: 0x80040154 Description: "Class not registered". End Error Error: 2008-05-28 00:06:02.31 Code: 0xC020801C Source: Copy Data Excel Source [5052] Description: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "Excel Connection Manager" failed with error code 0xC0202009. There may be error messages posted before this with more information on why the AcquireConnection method call failed. End... The package execution fa... The step failed.

Any suggestions???

Circuit

View 3 Replies View Related

Dynamic Excel Destination In DTS

Jan 29, 2004

Hello everybody .
I am building DTS transfer data from
SQL server into Excel file

source query constant ,but destination will be supplied by parameter

At design time I created destination
excel file and saved a copy of it like
C: empl_excel.xls

presently dts work in following order
1. set datasource of destination
from global varaibale(@@X)
2. execute xp_cmdshell to copy
C: empl_execel.xls to file in @@X
3.Run transformation

How to eliminate step 2 ?
If I run step 1 and 3 ,I get error "table does not exist"
How dynamicly create table in excel and map columns for transfer

Thank you

alex

View 3 Replies View Related

Dynamic Excel Sources

Feb 13, 2006

Please help....

I have different files that are sent from our vendors. Some are TXT and some are XLS. Some will have the same structure. I plan on grouping these together as best as I can.

My main problem is that I would like to go from one source that matches a group of files to a single SQL table. I'm still learning about SSIS and its capabilities. If I can get pointed in the right direction or have an example to work from, that would be great.

I've tried googl'ing to find some step by step, examples, and hints to do this right, but so far I'm at a bit of an impasse.

Thanks,
Dave

View 4 Replies View Related

SSIS - Dynamic Excel File Name

Feb 13, 2007

I have a SSIS Package that exports data from Sql Server to an Excel file.
I need help figuring out how to have the file name be "Report_02132007.xls".  Basically I want to append the date to the file name.
Any ideas?

View 1 Replies View Related

Dynamic Excel Creation In SSIS

Feb 26, 2008

Hi All, i've been reading this article http://rafael-salas.blogspot.com/2006/12/import-header-line-tables-_116683388696570741.html

in regards to creating an excel spreadsheet dynamically in SQL Server 2005 SSIS. However, i'm constantly getting an where the tab is created but not being populated. Can somebody post up a clearer example?

The problem I'm trying to solve is to automate the export of a query onto a new dynamic spreadsheet each time I run this SSIS package.

Any help would be greatly appreciated.

Thank you.

View 3 Replies View Related

Dynamic Path To Excel Files

Nov 5, 2007

Hi,
Trying to dynamically set the connectionstring property of the excel source.
This is what I enter instead of the hardcoded excel file paths:
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + @[User::FileName] + ";Extended Properties=Excel 8.0;HDR=YES"


I get this error, every time I set the delay validation property of the dataflow tab to true.
Cannot detach from one or more processes.
The object invoked has disconnected from its clients
Do you want to terminate them instead?

Thanks

View 3 Replies View Related

SSIS - Excel Source Dynamic

Jan 2, 2008

Dear Friends,
I currently have my excel source dynamic for the connectionstring. Using a global variable with the filename and using the expressions of this control to dynamically have the connecttionstring. My problem is that i need tto read always the first workseet and the name changes frequently and generates an erro in SSIS.
how can I set the excel source to goes only for the first sheet independently of the worksheet name?!
Regards!!

View 5 Replies View Related

Creating A Dynamic Excel File

Nov 17, 2006

Is it possible that i can create a dynamic excel file (destination)



ex, i want to create a Dyanamic Excel destination file with a filename base on the date

this will run on jobs. Is this possible?

11172006.xls, 11182006.xls

View 43 Replies View Related

Help With Dynamic Import Of Data Into Excel.

Apr 3, 2008

I set up a external data connection to a reporting services report via excel but because my report is paginated it will only retrieve data for the first page. Is there a way to make the report render on 1 page only?

or is there an easier way to do what i'm trying to do?

View 1 Replies View Related

HOW TO: Create Dynamic Excel Destinations

Jun 22, 2006

I have a ForEach Loop Container that is running from a Foreach ADO Enumerator with records telling me which companies have records to export. As I loop through I use a data flow task to export the records to Excel, I want to create separate Excel files using some of the parameters from my recordset as parts of the name.

I have DelayValidation=True for my DFT and my Excel Connection Manager, ValidateExternalMetaData=False for my Excel Destination Adapter, and an expression setting the ExcelFilePath and ServerName properties to the dynamic path & file name from variables.

The layout will be the same (i.e. metadata) for each file. The files are just getting broken up by company and service type and I want to use that in naming the files.

I am currently getting the following errors:

[EX_DST New Enrollments File [238]] Error: An OLE DB error has occurred. Error code: 0x80040E37.

[EX_DST New Enrollments File [238]] Error: Opening a rowset for "NewEnrollments$" failed. Check that the object exists in the database.

[DTS.Pipeline] Error: component "EX_DST New Enrollments File" (238) failed the pre-execute phase and returned error code 0xC02020E8.

What do I have to do to create the new Excel File? I thought it would do it when the properties were set. Do I have to create the "table" for the worksheet named "NewEnrollments"? If so, how do I accomplish it.

Thanks in advance.

sk

View 1 Replies View Related

Cannot Set Connection Property Of Backup Database Task If Connection String Is Customized In Connection Object

Aug 23, 2006

I added a connection (ADO.NET) object by name testCon in the connection manager - I wanted to programmatically supply the connection string. So I used the "Expressions" property of the connection object and set the connectionstring to one DTS variable. The idea is to supply the connection string value to the variable - so that the connection object uses my connection string.

Then I added a "Backup Database Task" to my package with the name BkpTask. Now whenever I try to set the connection property of BkpTask to the testCon connection object, by typing testCon, it automatically gets cleared. I am not able to set the connection value.

Then after spending several hours I found that this is because I have customized the connection string in testCon. If I don't customize the connection string, I am able to enter the "testCon" value in the connection property of the BkpTask.

Is this an intrinsic issue?

View 2 Replies View Related

Export Dynamic Pivot Table To Excel

Feb 26, 2015

I know that this is an Excel question, but I guess it is much more likely that an SQL person using dynamic pivot tables had stepped on this, rather than any advanced Excel user.

I am exporting a dynamic pivot table to Excel through a Stored Procedure. If the Stored Procedure that executes the dynamic pivot table returns 7 columns in one run, and 4 columns in the following update, then I have 3 orphaned columns that are still displayed in the spreadsheet. There isn't any content related to them, but the empty columns with their headers are bothering enough.

I've been trying to play with the data connection properties, but nothing deletes unused columns from former data executions.

View 1 Replies View Related

Dynamic Multi-sheet Excel Destination

Feb 4, 2008

I need to take 5 or 6 select statements to excel. Here are my limitations...

- each of the queries (thankfully) have the same data format
- each of the queries could return more than 65k, so a new worksheet needs to be generated dynamically.
- the names of the excel worksheets need to be custom, but a naming scheme would have to be developed for queries that ran over into multiple worksheets.

What's the smartest way to do this?

I'm having a hard time getting my head around this. I would love any help... I know I'm not breaking any new ground here. I've found pieces of what I'm doing on lots of forums, but never the exact thing. The complexities compound quickly when dealing with dynamic excel worksheets. =)

View 3 Replies View Related

Do You Know The Road To Dynamic Excel SSIS Goodness?

Dec 13, 2007

Hi all,

I did a few searches but did not find this specific scenario. Can anyone state with confidence whether this is possible (and if so, how)? Scenario:

-One table with a couple million rows (one column indicates which Country the record belongs to)

-Need to create an Excel 2007 file dynamically (for each Country) using SSIS 2005. Filename should include the Country Name (Sweden_Affliliated.xlsx). I have a table that contains a distinct list of all the countries. Each worksheet will have the same structure / schema across all files.

What seems to be working:

**I understand how to use an Execute SQL task to get the list of Country Names and bind to an object variable.
**I understand how to set variable mappings for a String variable to contain the "current Country" in a ForEach Loop.
**I understand how to set the OLE DB Data Flow Source to use a SQL command from a String variable that has the CountryName dynamically embedded within it.
**I understand I need to convert my varchar to Unicode using a Data Conversion task in my scenario.
**I understand that in order to write to an Excel 2007 file I need to use an OLE DB Destination with an Extended Property value of "Excel 12.0" and the ServerName property should contain a path to the file with no quotation marks.

Problems I have:

**OLE DB Destination: How do I set up the mappings when the file does not exist yet?

What I want to avoid, is having to create a template source XLSX file and using a File Copy task (I have gone this route before, but it would be best if I did not require a template). Is there a way to configure the SSIS package without using a File Copy Task? Creating the Excel file on the fly?

Thanks for any assistance in advance,

Brian

View 9 Replies View Related

Dynamic Source For Excel File At Runtime

Aug 23, 2006

Hi,

I've seen a number of posts similar to this but i still cannot figure out what i need to do to get it working. So here goes with a couple of newbie questions.

Question 1:
Once created how do i go about executing a SSIS package. I want to be able to call it from a C# application from which i pass in a couple of parameters?

Question 2:
How do i go about setting the file path of my Excel source to a dynamic value passed at runtime. I want to be able to loop through a number of Excel files and do some processing on them. I've set up a variable (which i think i need to do) after that i get stuck however. Some other posts suggest configuration packages but i cannot get my head around how they work?

Any help on this matter would be gratefully recieved.

Thanks in advance,

Grant

View 5 Replies View Related

Dynamic Header Column Names In Excel

Jul 3, 2007

Folks,



I am running into an issue while trying to export data to a spreadsheet. I actually don't know how to do it... Considering I only know the column names by the time I execute my procedure, I can't use the Excel Destination to export data.

With DTSs I would create an ActiveX script to execute the procedure which loads the results into a temp table. After that I would select everything from this temp table and load the results into a record set, looping through this record set to create the destination spreadsheet with the dynamic column names.

When it comes to SSIS we are advised to write vb.net scripts instead of ActiveX... These ones do not have records set's but dataset's, which at first glance are only applicable to xml and not xls files (when I try to define a variable as a dataset in my vb.net code, I face a message saying: Missing reference required to assembly System.Xml...).

How I would create this spreadsheet using a vb.net code in SSIS packages? Please, help...

Thank you.



View 5 Replies View Related

Dynamic Excel File Path During Deploy

Jan 23, 2008

Hello, I have a situation in which I need to use a foreach iterator that will perform a transformation on each excel file in a directory. The file names will change, but the structure will stay the same.

I was able to get this working by assigning the file path for each iteration to a variable, and then using that variable to set the excelfilepath in the Excel connection manager. However, for this to work I have to assign the variable to a default file.

Because of this, when I try to deploy the package I need to also add a configuration property for the variable, otherwise the first run will fail. The dummy file doesn't even really need to exist - I just have to put in a valid path, and then use any name that has an .xls extension. After that it runs fine regardless of what is in the directory.

This seems odd that I would need to do this - am I missing something? Apart from creating the Excel Connection Manager programatically (which I'm guessing might solve this), is there a way to avoid having to specify this dummy file?

Thanks

View 7 Replies View Related

The AcquireConnection Method Call To The Connection Manager Excel Connection Manager Failed With Error Code 0xC0202009

Mar 24, 2008

I am using SSIS 2005 on Windows 2003 server. Using Excel Source to dump the data for staging database.
I am getting following error while I execute it through BI studio's execute button.

Please help.

- Sachin

View 2 Replies View Related

The AcquireConnection Method Call To The Connection Manager Excel Connection Manager Failed With Error Code 0xC0202009

Mar 11, 2008

I have deployed my packages into Sql Server and I am using Configuration File. As my Data Source is Excel, I have changed the connection string during deployment with Server Path. But I am getting the following errors. Actually the File Exist in Path. May I know What is cause of the issue? Do I need to give any permission to execute the package.



SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "Excel Connection Manager" failed with error code 0xC0202009. There may be error messages posted before this with more information on why the AcquireConnection method call failed.



component "Excel Source Service Contract Upload" (1) failed validation and returned error code 0xC020801C.

One or more component failed validation.



There were errors during task validation.

DTS_E_OLEDBERROR, Error Code: 0x80004005 Source: "MS JET DB Engine" Description : Path is not valid


View 27 Replies View Related

Dynamic Excel Destination Depend On Dataflow Data

Jul 10, 2007

I created a data flow with complaicated SQL. There is "type" field in the output column.

I would like to created excel files for each "type" value

E.g. If there is 3 "type" values (A, B, C), I would like to create 3 excel files to store type A, type B, and type C data respectively.



Since the number of possibe value of "type" field is various, how can I create the xls destination dynamic and move the correct type to the corresponding excel file?



The conditional split has fixed conditions, it is not suitable for by dynamic number of value

For Loop condition is not a good choice because I need to run the complicated SQL for many time.



Thanks.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved