?
Solved

'Export and Import Wizard' from BIDS

Posted on 2010-08-16
15
Medium Priority
?
471 Views
Last Modified: 2013-11-10
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
0
Comment
Question by:anushahanna
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 5
  • 2
  • +1
15 Comments
 
LVL 16

Assisted Solution

by:vdr1620
vdr1620 earned 336 total points
ID: 33449068
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
 
LVL 30

Assisted Solution

by:Reza Rad
Reza Rad earned 1384 total points
ID: 33450883
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
 
LVL 6

Author Comment

by:anushahanna
ID: 33589358
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
What Is Blockchain Technology?

Blockchain is a technology that underpins the success of Bitcoin and other digital currencies, but it has uses far beyond finance. Learn how blockchain works and why it is proving disruptive to other areas of IT.

 
LVL 6

Author Comment

by:anushahanna
ID: 33589366
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
 
LVL 30

Assisted Solution

by:Reza Rad
Reza Rad earned 1384 total points
ID: 33605589
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
 
LVL 21

Expert Comment

by:Jason Yousef, MS
ID: 33629917
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
 
LVL 6

Author Comment

by:anushahanna
ID: 33747343
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
 
LVL 6

Author Comment

by:anushahanna
ID: 33747364
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
 
LVL 30

Assisted Solution

by:Reza Rad
Reza Rad earned 1384 total points
ID: 33751774
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
 
LVL 21

Assisted Solution

by:Jason Yousef, MS
Jason Yousef, MS earned 280 total points
ID: 33753341
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
 
LVL 6

Author Comment

by:anushahanna
ID: 33863565
Thanks very much for your patience.. got a few minutes on this box.. see attached..
SSIS.bmp
0
 
LVL 6

Author Comment

by:anushahanna
ID: 33863572
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
 
LVL 30

Accepted Solution

by:
Reza Rad earned 1384 total points
ID: 33863700
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
 
LVL 6

Author Comment

by:anushahanna
ID: 33947558
got your point- thanks very much.
0
 
LVL 30

Expert Comment

by:Reza Rad
ID: 33949841
glad to help
Regards,
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question