Assigning Passwords To Connection Managers Using Expressions
May 2, 2007
Hi Experts here,
Sorry if this query had been raised earlier. While In DTS Packages we retrieve connection details for all Connections in a Package from a table and then assign them to the following global Variables
Finally we reassign these variables to repective Connection Properties using Dynamic Properties Task. After Migrating to SSIS though we are able to assign almost all variables to Properties of Connection Managers via Expression except the Password which we donot find in the drop down list in order to assign gv_Source_Pwd.
Is there any work around to assign passwords dynamically?
I€™m new at SSIS and would like to try the follow easy function. Just get some data from my database und put into a text-file. All function going well. Right now I€™ve got just one problem I can€™t resolve. At the window €œConnection Managers€? are the connections I used in my project. But how can I make this connection more dynamical? E.g. I have a connection.txt file and the Connection Manager should set his properties after read this txt-file. Have someone an idea?
I am unsure if i am managing my connections in the correct way... but as it stands we have them in a .dtsConfig file that each package references in order to get the relevant details..
This is working fine, except that in total our ETL project uses 6 different connections, and none of the packages utilise all 6.
This leads to an error message upon opening up EVERY package stating that there are connection strings in the .dtsConfig that are unused, yeah, thats the idea!
The way i have gotten around this, is to just include all 6 connection managers in every package, but my question is, is there a better way to achieve this same result??
are we going about this in a bit of a cackhanded way?
I'm trying to create a new package and keep getting different errors. The package uses the same .NET ODBC provider as another package.
I can test the connection fine.
When I add a DataReader Source and select my connection I get the following warning:
Not all connection managers have been set. Set all connection managers.
If I click the refresh button I get this warning message:
Error at Data Flow Task [DataReader Source [6338]]: The runtime connection manager with the ID "" cannot be found. Verify that the connection manager collection has a connection manager with that ID.
All my collections have ID's and they are all read only.
If I ignore those warning I can enter my SQL command and go to the column mappings tab and see all the columns I selected but I then see several warnings all saying the same thing.
Driver does not support this function
I'm not able to close the Advanced Editor at this point.
I'm trying to create a custom connection manager and I have ConnectionType in the DtsConnection attribute set to "MSMDM". When I tried to create one in a package I got:
The connection type "MSMDM" specified for connection manager "{A8543B4B-41D9-4E69-9580-3D1A491AD719}" is not recognized as a valid connection manager type. This error is returned when an attempt is made to create a connection manager for an unknown connection type. Check the spelling in the connection type name. (TestHarness1)
So, a few questions:
What are the valid connection manager types?
Why can I not create a new connection manager type of my own?
If I cant create new connection manager types then the purpose of being able to build custom connecton managers is defeated. Hence, what's the point in giving us the ability to create custom connection managers? -Jamie
This is probably a silly question but what exactly is the purpose of creating Data Sources when it is possible to set up individual connection managers?
I am not seeing an option to use the OraOLEDB.Oracle driver when defining connections in ssis. This driver shows up in management studio when trying to create linked servers so I don't know why it wouldn't show up here. All the client tools are installed fine and the linked server works. Any ideas?
When I brought up the BI DEV studio first tiem the Connection Managers area showed up, but after I closed it by mistake from next time on wards it is not coming up.
Can some one from this form help me how to get the Connection Managers area(pane) back?
Is there a way to dynamically create a connection manager @ run time? I would like to do this from a data set of connection strings so I can link them into a union all component.
We are using a €œFlat File Connection Manager€? in our SSIS package.
The package fails occasionally while loading in the validation phase with the error
€œ-1073659899,0x,The connection type "FLATFILE" specified for connection manager "<some name>" is not recognized as a valid connection manager type. This error is returned when an attempt is made to create a connection manager for an unknown connection type. Check the spelling in the connection type name.
This error is not returned always. Also I feel €œFLATFILE€? is a valid type of connection manager. This value €œFLATFILE€? is inserted by the editor and not manually typed. This is a weird behavior of SSIS. Sometimes I get this error with respect to some other connection manager used in the package as well. €œOLEDB€? is the type of that other connection manager.
Has anybody faced similar issue earlier?
Please let me know some thoughts, suggestions, and possible work-arounds to avoid this error as this is very critical for us.
It looks like you can only extended connection managers for data flow sources.
Is there anyway to develop a custom connection manager for the SQL destination in the data flow destinations?
I can€™t use hardcoded connection strings. I can€™t use configurations because they are not encrypted. I already have managed code that will give the corrected connection string. I already have a custom connection manager that I use from the data flow sources. I just need one for data flow destinations but I can€™t see a way to extend into the OLE DB?
I'm trying to use an OLE DB connection manager from inside a custom log provider, but can't get the code to work - I get an exception "A first chance exception of type 'System.InvalidCastException' occurred in SSEALogProvider.dll" on the last line of the code below.
I know the connection is OLE DB from looking at .CreationName.
I've tried both with & without ToConnectionManager90(), but appearently not in the right way, both cases gives the same exception.
Any tips on what I'm missing? All the examples I've seen are either creating (instead of using) connection managers, or are file based connection managers. Any and all help much appreciated!
Thanks/Kristian
if (this.ConfigString.Length == 0 || connections.Contains(ConfigString) == false ||
infoEvents.FireError(0, "SSEALogProvider", "The ConnectionManager " + ConfigString + " specified in the ConfigString property cannot be found in the collection, or is of the wrong type (expected CreationName='OLEDB'.)", "", 0);
If I have 6-8 queries running in parallel, Whether having a Single connection Manager (for the same source) for all the Extract performs faster or having Distinct Connection Manager for each of the extract performs faster ?
I created my SSIS package with connections to server databases. When I move the SSIS file to another machine it loses the password that is save in the connection. Is this a security feature? Is there a way to make it keep the passwords?
I am having a strange problem in that when ever I create a connection to an OLE db source and use SQL Server authorization and save the password, the connection manager seems to "forget" the password. That is, when I click the 'save password' check box, and do a test connection, it connects fine. But as soon as I close that connection window, and reopen it, the password box is empty, and the 'save password' box is still checked. Even if I do a test connection at this point, it wont connect because it does not have the password.
I'm new to SQL 2005. I am setting up some SSIS packages which will connect to an Oracle database and copy some tables from it. These packages will then be scheduled to run on a daily basis. Because they will run automatically, it is required that passwords be saved along with the connection string. However, even though the password is saved (and encrypted, I checked the .dtsx in notepad), when I run the package, the connection to Oracle fails. Only if I respecify the password does it run correctly. How can I correctly save this password so that I can schedule automatic execution? Thanks for any info.
We run some VB scripts to extract data from our SQL server. Within these scripts we reference a 'read only' SQL userid and it's password in the connection string.
What I want to do is remove the references to the 'read only' user and it's password from the scripts.
Could we add the user that is running the script as a SQL authenticated user (that has read only access) thereby not have to reference any passwords in our script ?
Attempting to create a data flow task to copy data from AS/400 (DB2) to SQL2005, using an existing System DSN ODBC connection defined on the SQL2005 host.
Problem:
When adding the DataReader Source component to the package, I cannot assign the Connection Manager. Designer issues the error message:
"The runtime connection manager with the ID "" cannot be found. Verify that the connection manager collection has a connection manager with that ID."
Editing the DataReaderSrc component shows only one row under the Connection Managers tab:
The datareadersrc component editor displays the warning message: "Not all connection managers have been set. Set all connection managers.". Clicking the Refresh button causes the error message to be displayed "The runtime connection manager with the ID "" cannot be found. Verify that the connection manager collection has a connection manager with that ID."
I am prevented from assigning my Connection Manager object the DataReaderSrc.
The package already contains one Connect Manager object:
Provider: .Net Providers/Odbc Data Provider System DSN
I'm learning SSIS, and just started to use SSIS Package Configurations. I want to be able to switch between a dev and prod instance of our database.
I did not specify the password in the Configuration file (XML), figuring it would get it from the package itself. (That will be the same between dev and prod). But once I set up to use the Configuration, I started to get a "Login failed..." message. I added the password to the configuration, and it's the same. I quit using the configuration file at all, and then it works again.
This may be related, but when I show the properties on my connection, it shows stars for the password. When I go to the editor, the password field is blank, and if I test the connection, it fails. I type in the password, and then the connection works. I have the "Save my password" checked, but every time I go back, the password is blank. In fact, if I type in the password for the connection in the editor, and then go to the "All" page, the password is blank. It may be a red herring, but it sure looks like it's not really storing the password, and thus the Configuration file can't connect when it tries to get it. I can type in the password, test the connection (it works), close the editor dialog, open the editor dialog, test the connection again, and since the password is now blank, the connection fails.
What do I have to do to make that password actually stick!?
Without the Configuration file, when I save the package to SQLServer, it will run as a job, in spite of the password appearing to not stick. With the configuration file, it's not even running while still in Studio.
Here are at least some of the version information, which may or may not be useful.
Microsoft Visual Studio 2005 Version 8.0.50727.42 Microsoft .NET Framework Version 2.0.50727
Installed Edition: Professional
Microsoft SQL Server Analysis Services Designer Version 9.00.3042.00
Microsoft SQL Server Integration Services Designer Version 9.00.3042.00
Microsoft SQL Server Reporting Services Designers Version 9.00.3042.00
SQL Prompt 3.5
Thank you for any help you can provide. -thursday's geek
I have a question regarding which expressions need to be set to have the excel connection manager be able to create/update a file dynamically. I'm reading a path in from a database and storing it in a variable. The path is just the location of an excel file. What I would like to have happen is that the excel connection manager be dynamic so that if I wanted to change where this file went or the name I could simply change the value in the database.
I've tried setting the expressions, in the Excel connection Manager: ConnectionString,ExcelFilePath, and Servername to the variable \pathfolderfile.xls with no luck. The ConnectionString seems to be a little funny because it contains Provider=Microsoft.Jet.OLEDB.4.0;Data source = ; Extended Properties =; HDR=YES", so I don't know if I can just use that expression and ignore the others or what.
I have been writing a custom source adapter that uses a file connection within the connection manager. If I hard-code a specific file then the component works. However if I use a file connection that has an expression defined which updates the connection, for example when you have a for-each loop looping over a set files. The file connection doesn€™t seem to re-evaluate expression each time you access the file connection via the code. Is there something that I am missing or is there a bug?
I have written a script source component and attached a flat file connection. The connection string of which is defined by an expression.
However when I get the connectionstring from the connection in the script it has the default filename value of flat file not the value of the expression. This is proved by passing in the filename variable, and comparing the 2.
The flat file has an expression on the ConnectionString of @[User::filename]
I have dozens of packages that work as follows (high level... not listing all the steps just those relevant to this question)
- Get list of files in directory
- Join list to list of already imported files
- Those not imported put into an ADO.Net object
- Loop through ADO.Net record (which contains the filename) and import each file.
I just set the connection string of the flat file to be the variable in the loop (expressions.. connection string). Pretty standard stuff. Now I tried to do the same with a file connection (not a flat file) becuase I have a source that is from a mainframe and I had to write a custom source script and its not working. Basically the source script uses
And it opens the same file over and over (not ever changing as the ConnectionString expression changes like it does for flat files) and imports it even though I have verified the loop is correctly looping through all the different files.
I want to have this query insert a bunch of XML but i get this error...
Msg 128, Level 15, State 1, Procedure InsertTimeCard, Line 117
The name "ExpenseRptID" is not permitted in this context. Valid expressions are constants, constant expressions, and (in some contexts) variables. Column names are not permitted.
Msg 128, Level 15, State 1, Procedure InsertTimeCard, Line 151
The name "DateWorked" is not permitted in this context. Valid expressions are constants, constant expressions, and (in some contexts) variables. Column names are not permitted.
What am i doing wrong...Can anyone help me out!! Thanks!!
p.s I know this query looks crazy...
Code Block
IF EXISTS (SELECT NAME FROM sysobjects WHERE NAME = 'InsertTimeCard' AND type = 'P' AND uid=(Select uid from sysusers where name=current_user)) BEGIN DROP PROCEDURE InsertTimeCard END go /********************************************************************************************************* ** PROC NAME : InsertTimeCardHoursWorked ** ** AUTHOR : Demetrius Powers ** ** TODO/ISSUES ** ------------------------------------------------------------------------------------ ** ** ** MODIFICATIONS ** ------------------------------------------------------------------------------------ ** Name Date Comment ** ------------------------------------------------------------------------------------ ** Powers 12/11/2007 -Initial Creation *********************************************************************************************************/ CREATE PROCEDURE InsertTimeCard @DateCreated DateTime, @EmployeeID int, @DateEntered DateTime, @SerializedXML text, @Result int output as declare @NewTimeCardID int select @NewTimeCardID = max(TimeCardID) from OPS_TimeCards -- proc settings SET NOCOUNT ON
-- local variables DECLARE @intDoc int DECLARE @bolOpen bit SET @bolOpen = 0 --Prepare the XML document to be loaded EXEC sp_xml_preparedocument @intDoc OUTPUT, @SerializedXML -- check for error IF @@ERROR <> 0 GOTO ErrorHandler --The document was prepared so set the boolean indicator so we know to close it if an error occurs. SET @bolOpen = 1
--Create temp variable to store values inthe XML document DECLARE @tempXMLTimeCardExpense TABLE ( TimeCardExpenseID int not null identity(1,1), TimeCardID int, ExpenseRptID int, ExpenseDate datetime, ProjectID int, ExpenseDescription nvarchar(510), ExpenseAmount money, ExpenseCodeID int, AttachedRct bit, SubmittoExpRep bit ) DECLARE @tempXMLTimeCardWorked TABLE ( TimeCardDetailID int not null identity(1,1), TimeCardID int, DateWorked DateTime, ProjectID int, WorkDescription nvarchar(510), BillableHours float, BillingRate money, WorkCodeID int, Location nvarchar(50) ) -- begin trans BEGIN TRANSACTION insert OPS_TimeCards(NewTimeCardID, DateCreated, EmployeeID, DateEntered, Paid) values (@NewTimeCardID, @DateCreated, @EmployeeID, @DateEntered, 0) -- check for error IF @@ERROR <> 0 GOTO ErrorHandler
--Now use @intDoc with XPATH style queries on the XML INSERT @tempXMLTimeCardExpense (TimeCardID, ExpenseRptID, ExpenseDate, ProjectID, ExpenseDescription, ExpenseAmount, ExpenseCodeID, AttachedRct, SubmittoExpRep) SELECT @NewTimeCardID, ExpenseRptID, ExpenseDate, ProjectID, ExpenseDescription, ExpenseAmount, ExpenseCodeID, AttachedRct, SubmittoExpRep FROM OPENXML(@intDoc, '/ArrayOfTimeCardExpense/TimeCardExpense', 2) WITH ( ExpenseRptID int 'ExpenseRptID', ExpenseDate datetime 'ExpenseDate', ProjectID int 'ProjectID', ExpenseDescription nvarchar(510) 'ExpenseDescription', ExpenseAmount money 'ExpenseAmount', ExpenseCodeID int 'ExpenseCodeID', AttachedRct bit 'AttachedRct', SubmittoExpRep bit 'SubmittoExpRep') -- check for error IF @@ERROR <> 0 GOTO ErrorHandler
-- remove XML doc from memory EXEC sp_xml_removedocument @intDoc SET @bolOpen = 0
-- commit transaction, and exit COMMIT TRANSACTION set @Result = @NewTimeCardID RETURN 0
-- Error Handler ErrorHandler: -- see if transaction is open IF @@TRANCOUNT > 0 BEGIN -- rollback tran ROLLBACK TRANSACTION END -- set failure values SET @Result = -1 RETURN -1
I have an Execute SQL Task that executes "select count(*) as Row_Count from xyztable" from an Oracle Server. I'm trying to assign the result to a variable. However when I try to execute I get an error: [Execute SQL Task] Error: An error occurred while assigning a value to variable "RowCount": "Unsupported data type on result set binding Row_Count.".
Which data type should I use for the variable, RowCount? I've tried Int16, Int32, Int64.
CREATE TABLE employees ( employee_number char(6) NOT NULL , known_as char(20) , surname char(20) , job_title char(20) , manager_number char(6) NULL , unique_identifier char(6) NOT NULL PRIMARY KEY ) --unique_identifier is in the format 000123456789
Now I have a conundrum when trying to create organization charts in Visio, so I figured I'd try reproduce the format that a bunch of walkthroughs suggest, which is with the first column being an int identity(1,1) column as the employeeID with the managerID being an int column also, referencing the employeeID. Hope I've not lost you just yet ;) So here's what I figured - create a new table with the new integer columns, slap my current data into it and then update the managerID as necessary...
Except I can't work out the update statement for this!
CREATE TABLE gvVisioTest ( employeeID int identity(1,1) , employee_number char(6) , job_title char(40) , department_reference char(10) , managerID int , manager_number char(6) ) GO
INSERT INTO gvVisioTest(employee_number, job_title, department_reference, manager_number) SELECT employee_number, job_title, department_reference, manager_number FROM employees GO
--Update managerID with relevant employeeID GO
DROP TABLE gvVisioTest
Any ideas?
Oh and this is legacy so the design is flawed, modified over time (the manager field is a bodge put in 5 years ago), so yeah unfortunately I have to work with what I've got :(
Hello,I'm facing with a problem though it may look very simple for many ofu it is a bit complicated for me So kindly please help me outi have a table emp with employee id,name and mgridI need to display the managers and the employee working under thatmanager . How should this be done.Thanking uBroken Arrow