Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SSIS and Import/Export (2005)
 Data connection

Author  Topic 

ZachM
Starting Member

28 Posts

Posted - 2007-10-04 : 11:58:25
How can I create a OLEDB connection parameter that would ask the user to enter the server name when the package is executed?

I have a ssis package that import/export data. I want this package to do that without hard coding the server name. Thus, the package will needs to ask the user to enter the server name for source and destination and then import/export data.

Thanks

nr
SQLTeam MVY

12543 Posts

Posted - 2007-10-04 : 13:32:55
I would create an app to prompt the user and then run the package using dtexec with the values as variables.


==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

igorblackbelt
Constraint Violating Yak Guru

407 Posts

Posted - 2007-10-04 : 15:23:24
Nigel,

Were you ever able to populate the OLE DB Connection (on a OLE DB Source of course) from variables or from expression?
I can get the query to use values from variable but not the database connection, let me know if you can think of anything, I need that one too, basically we want to run the same package on 2 different servers, my idea was passing the server+db names to the ssis package and that would be used as a connection.
Go to Top of Page

igorblackbelt
Constraint Violating Yak Guru

407 Posts

Posted - 2007-10-04 : 17:12:41
I think I got this, it was actually bugging me and this is how I got it.

I dragged a "OLE DB Connection" to my Data Flow, created a connection to just any server and any database, which created the following connection string:

ConnectionString: Data Source=Server1;Initial Catalog=DB1;Provider=SQLNCLI.1;Integrated Security=SSPI;Auto Translate=False;

Now, I can modify the server name on this connection string programmatically using an expression. I'll test this out tomorrow. Cool stuff!

Go to Top of Page
   

- Advertisement -