Thanks Pedro,
Actually, I have already done this. but still the same.
Main Topics
Browse All TopicsHi Everybody,
I have created a very simple SSIS Package which gets the sql records and put into Excel file. It is working fine in my development server with window authentication. But I want to use sql authentication in my sql connection. So I am passing variables (password and server) to sql connection string in expression property like following:
"Data Source=" + @[User::Server] + ";User ID=adaptuser;Password=" + @[User::Password] + ";Initial Catalog=ADAPT;Provider=SQL
And I am calling this package from my stored procedure. The problem is it is not overwriting the password value in the configuration even If I put wrong password still it is working which means it is not taking values from variable. But if i change the Server variable value to wrong values then it gives me error. Now can someone explain me or tell how to force package to use password value from variable because I can not edit package everytime while deplying this package on the live server. I am using the following code in the stored procedure to run the package:
Declare @Cmd varchar(5000), @returncode int
Select @Cmd = 'dtexec /F "' + @SSIPath + '"'
Select @Cmd = @Cmd + ' /SET \Package.Variables[User::S
Select @Cmd = @Cmd + ' /SET \Package.Variables[User::P
EXEC @returncode = xp_cmdshell @Cmd
Select @returncode
I hope above explain enough that what is the problem.
Please help me on this issue.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Hi Pedro,
Thanks for your help. But that one solved now. Actually I was passing the whole connection string which I did not have to do. Now its working now. But now I got two more following problems:
1. How to map the columns dynamically Because In my package first I am generating Excel Sheet and then inserting data into it from sql. Now the problem is excelsheets columns are dynamic, they are changing with the different worksheet. Is there any way that i can just map the index of the columns rather than column name.
2. To work with Excel component we have to install excel. but what if on the production server excel is not install. Is there any way to work without installing excel. Because I will generate the excel file on the server and then user will download the excel file onto their local to open it.
If you can help me on these two issues that would be great.
Thanks
RkVerma
Business Accounts
Answer for Membership
by: PedroCGDPosted on 2009-03-16 at 04:10:28ID: 23896348
Inside SSIS package try to set your connection to delayValidation=true.
Helped?
regards,
Pedro