'Export and Import Wizard' from BIDS

To implement the same functionality of 'Export and Import Wizard' in BIDS as a package, is there a way to simplify by doing something for all tables, in one shot, instead of creating a flow for each table?

thanks
LVL 6
anushahannaAsked:
Who is Participating?
 
Reza RadConnect With a Mentor Commented:
Hi,
as you see in your screenshot, you have only two OLEDB connections in connection managers section,
one for Source, another for Destination,
you should right click on them , go to properties window, then find expression property,
click on it and property expression editor will open, then you can set Connection string, servername, username ,... with variables.

this will let you to change source and destination connections by changing variable values simply even outside of package.

does it make sense now?




0
 
vdr1620Connect With a Mentor Commented:
NO..
If you are not using any Advanced Transformations.. then Use Import/Export wizard and Select all your Source/destination Tables and In the Last window Check the Box - SAVE AS SSIS PACKAGE and later open with BIDS, to make changes if necessary or for rerunning the same ETL
0
 
Reza RadConnect With a Mentor Commented:
As I understand from your question you need Dynamic Data Flow. you want to create a data flow which can be run for every source and destination table/database/server. Am I right?
if yes, there are hints to consider:
1- SSIS has ability to do a level of dynamic data flow. but in this level your source and destination should be in same structure at all. when I talk about same structure, I mean same fields, same number of fields, same data types. if you want to designed a data flow to transfer data from source table to destination table, the Meta data of columns in data flow is Static, so if you want to use it for another source/destination, fields of this new source/destination should be exact same previous source/destination.
If you meet this conditions, then you can create dynamic data flow, simply by using EXPRESSIONS to set connection string of source and destinations. probably people do this with a foreach loop, loop through sources and destinations and set data flow connection strings dynamically there.

2- If first way isn't proper for you, this means that if data structure of your source/destinations is different, you should try another ways, maybe creating insert into statements dynamically can be a way, and running them by execute sql task ( source and destination needs to be linked in this way ) . OR you can use Transfer sql server objects task and select only tables ( source and destination needs to be on sql server in this way ) . and any other ways you can use for this.

did you mean this exactly? let me know if you mean anything else

0
Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

 
anushahannaAuthor Commented:
vdr1620, Import/Export wizard has an issue for me. that is why i needed to avoid it, and try another option in ssis directly.

thanks
0
 
anushahannaAuthor Commented:
reza_rad, in my case, the first situation fits. would you have any example you have already done for the foreach/EXPRESSIONS idea,.

thanks
0
 
Reza RadConnect With a Mentor Commented:
I can provide an example but this is strongly based on what you want to do exactly?
dose your source and destination databases are same at all but only table names change?
or table names are same but source/destination databases change?
or both change?
please tell me what exactly you want to do and I will help you in detail.
0
 
Jason Yousef, MSSr. BI  DeveloperCommented:
anushahanna: what's your issue with the Export and Import Wizard, perhaps you need to address any problems, it could be easy and saves you the hassle...

do you get and error msg?
0
 
anushahannaAuthor Commented:
reza_rad, thanks for your help:

source and dest DB schema are exactly identical, but names are also same, but are on 2 different servers. table/column names are same too, only data may differ.
0
 
anushahannaAuthor Commented:
huslayer, this is in relation to
http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/Q_26360883.html

because i do not get access to the box with SSIS installation easily, I am delayed in implementing this quicker. but will get to it very soon.
0
 
Reza RadConnect With a Mentor Commented:
so I suggest to :
start with an import / export wizard, set source and destination, select all tables to transfer, set mappings.
all of this was like before, except this one:
save your packages at last steps to a file location.
then open this saved file with BIDS, after creating a ssis project,
right click on ssis packages folder, and select add existing package, select saved package from there.
then you can see that wizard created ssis package for you. please take an screenshot of the package and put here, I will help you in next steps then

0
 
Jason Yousef, MSConnect With a Mentor Sr. BI  DeveloperCommented:
OK, from the other referenced question... you said

in Database1, the Identity PK was 1,2,3,5
In Database2(Destination), the PK is being populated as 1,2,3,4

start with an import / export wizard, set source and destination, select all tables to transfer.

in the mapping, ignore the ID column, you can't import an ID.
see attached...

hope that helps.

ID.jpg
0
 
anushahannaAuthor Commented:
Thanks very much for your patience.. got a few minutes on this box.. see attached..
SSIS.bmp
0
 
anushahannaAuthor Commented:
huslayer,

why ignore it?

>>
in Database1, the Identity PK was 1,2,3,5
In Database2(Destination), the PK is being populated as 1,2,3,4

we need same order- if you ignore it we will get 1,2,3,4 which is what is happening now (is identity field)
0
 
anushahannaAuthor Commented:
got your point- thanks very much.
0
 
Reza RadCommented:
glad to help
Regards,
0
All Courses

From novice to tech pro — start learning today.