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)
 Transfering all global variables???

Author  Topic 

papillon2811
Starting Member

18 Posts

Posted - 2007-01-30 : 07:13:27
Hi

I have created two SSIS packages one is development and another is test. I used near about 15 global variables in my test SSIS package.Both development and test package working on transfering data from database and put into text files now i want to implement all these variables into development package
how i will do that wheather i have to create all these variables in development package also or there is way to transfer these variables from one package to another

Please help me out

nr
SQLTeam MVY

12543 Posts

Posted - 2007-01-30 : 07:38:51
You can save them as files then try copying the relevant xml entries.
Might be quicker to just create them in the gui.

You can cut and paste the names then set the type (highlight type an hit "s" three times for string - most of my variables are string).
I assume you are getting values from a config file or load statement?

==========================================
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

papillon2811
Starting Member

18 Posts

Posted - 2007-01-30 : 07:52:18
hi

i am not clear :( :(

These global variables are text file names and i am using another variable that takes my path where my text files going to save i.e Flat File Destinations.I am using command prompt to run package and every time i am giving new path so that my new text files are not over write previous ones.

like @Path+@TextFileName(s)

thanks.
Go to Top of Page

nr
SQLTeam MVY

12543 Posts

Posted - 2007-01-30 : 11:22:35
Just create a load of new variables in the new package.
Have both packages open.
Copy and paste the variable names from the old package to the new.
Set all the datatypes to string
Copy all the text values as above.


==========================================
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

papillon2811
Starting Member

18 Posts

Posted - 2007-01-31 : 01:40:19
hi

thats work fine and save time also!!!

Thanks
Go to Top of Page

papillon2811
Starting Member

18 Posts

Posted - 2007-02-06 : 03:48:42
hi

i a facing another problem while importing my text files. here again i created global variable that take dynamically value through command prompt as Path but i am getting error like
Source: Import Flat File Source [1]
Description: Cannot open the datafile "C:\temp\CurrentLoad.txt".

can any body help me out please

Thanks
Go to Top of Page

nr
SQLTeam MVY

12543 Posts

Posted - 2007-02-06 : 04:06:13
That path will on the machine you are running the package not the server as ssis is a client application.
Otherwise check if the file exists and you have permission on it.

==========================================
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

papillon2811
Starting Member

18 Posts

Posted - 2007-02-06 : 04:14:21
Hi

That path is on my machine where i created SSIS package..so how can i come out this problem????

see what i did i created two SSIS packages one export data and another import. exporting data is working fine i am getting all records from database to text file that is on my machine only and suppose i wanna to change some data from text file and same i want to import that time i am getting above said error...is there setting for importing flat file source?????


help me out
Go to Top of Page

papillon2811
Starting Member

18 Posts

Posted - 2007-02-06 : 04:27:05
hi
i am importing files:)
but i have to write path like
C:\temp\CurrentLoad.txt.txt

why that ???? is there something i did wrong???

Thanks
Go to Top of Page

nr
SQLTeam MVY

12543 Posts

Posted - 2007-02-06 : 07:13:32
That would be because the file name is CurrentLoad.txt.txt not CurrentLoad.txt


==========================================
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
   

- Advertisement -