Hi! Welcome to satish24k - It's Not Just Central Government Employeees News, but We Strive To Present You Whatever You Might Be Interested In.......................Chief Editor - kavitaSatish, Just a COMMON MAN with UNCOMMON DREAMS.......... LIFE IS NOT WHAT WE GET FROM BIRTH, IT IS WHAT WE MAKE OUT OF EVERY MOMENT WE LIVE; SO MAKE BEST OUT OF IT.......HAVE A GREAT LIFE

Saturday, May 5, 2012

How to merge data in two different databases?



Problem: There is data in two different servers; how to merge data in two different databases?


Solution: If you have two databases with the same schema, and then you could use SQL Server Import and Export Wizard to import the data from one database to another one. To merge the two databases, you can select Append rows to the destination table option for Column Mappings when importing the tables or views.
For more information about SQL Server Import and Export Wizard, please see http://msdn.microsoft.com/en-us/library/ms140052.aspx. The same is reproduced below:


Run the SQL Server Import and Export Wizard
SQL Server 2012
Other Versions

2 out of 6 rated this helpful - Rate this topic
The SQL Server Import and Export Wizard provides the simplest method of copying data between data sources and of constructing basic packages. For more information about the wizard, see SQL Server Import and Export Wizard.
For a video that demonstrates how to use the SQL Server Import and Export Wizard to create a package that exports data from a SQL Server database to a Microsoft Excel spreadsheet, see Exporting SQL Server Data to Excel (SQL Server Video).
To start the SQL Server Import and Export Wizard
On the Start menu, point to All Programs, point toMicrosoft SQL Server , and then click Import and Export Data.
—or—
In SQL Server Data Tools (SSDT), right-click the SSIS Packages folder, and then click SSIS Import and Export Wizard.
—or—
In SQL Server Data Tools (SSDT), on the Project menu, click SSIS Import and Export Wizard.
—or—
In SQL Server Management Studio, connect to the Database Engine server type, expand Databases, right-click a database, point to Tasks, and then clickImport Data or Export data.
—or—
In a command prompt window, run DTSWizard.exe, located in C:\Program Files\Microsoft SQL Server\100\DTS\Binn.
  Note
On a 64-bit computer, Integration Services installs the 64-bit version of the SQL Server Import and Export Wizard (DTSWizard.exe). However, some data sources, such as Access or Excel, only have a 32-bit provider available. To work with these data sources, you might have to install and run the 32-bit version of the wizard. To install the 32-bit version of the wizard, select either Client Tools or SQL Server Data Tools (SSDT) during setup.
To import or export data by using the SQL Server Import and Export Wizard
1. Start the SQL Server Import and Export Wizard.
2. On the corresponding wizard pages, select a data source and a data destination.
The available data sources include .NET Framework data providers, OLE DB providers, SQL Server Native Client providers, ADO.NET providers, Microsoft Office Excel, Microsoft Office Access, and the Flat File source. Depending on the source, you set options such as the authentication mode, server name, database name, and file format.
  Note
The Microsoft OLE DB Provider for Oracle does not support the Oracle BLOB, CLOB, NCLOB, BFILE, and UROWID data types. Therefore, the OLE DB source cannot extract data from tables that contain columns with these data types.
The available data destinations include .NET Framework data providers, OLE DB providers, SQL Server Native Client, Excel, Access, and the Flat File destination.
3. Set the options for the type of destination that you selected.
If the destination is a SQL Server database you can specify the following:
Indicate whether to create a new database and set the database properties. The following properties cannot be configured and the wizard uses the specified default values:
Property Value
Collation Latin1_General_CS_AS_KS_WS
Recovery model Full
Use full-text indexing True
Select whether to copy data from tables or views, or to copy query results.
If you want to query the source data and copy the results, you can construct a Transact-SQL query. You can enter the Transact-SQL query manually or use a query saved to a file. The wizard includes a browse feature for locating the file, and the wizard automatically opens the file and pastes its content into the wizard page when you select the file.
If the source is an ADO.NET provider you can also use the option to copy query results, providing the DBCommand string as the query.
If the source data is a view, the SQL Server Import and Export Wizard automatically converts the view to a table in the destination.
Indicate whether the destination table is dropped and then re-created, and whether to enable identity inserts.
Indicate whether to delete rows or append rows in an existing destination table. If the table does not exist, the SQL Server Import and Export Wizard automatically creates it.
If the destination is a Flat File destination you can specify the following:
Specify the row delimiter in the destination file.
Specify the column delimiter in the destination file.
4. (Optional) Select one table and change the mappings between source and destination columns, or change the metadata of destination columns:
Map source columns to different destination columns.
Change the data type in the destination column.
Set the length of columns with character data types.
Set the precision and scale of columns with numeric data types.
Specify whether the column can contain null values.
5. (Optional) Select multiple tables, and update the metadata and options to apply to those tables:
Select an existing destination schema or provide a new schema to which to assign tables.
Specify whether to enable identity inserts in destination tables.
Specify whether to drop and re-create destination tables.
Specify whether to truncate existing destination tables.
6. Save and run a package.
If the wizard is started from SQL Server Management Studio or the command prompt, the package can run immediately. You can optionally save the package to the SQL Server msdb database or to the file system. For more information about the msdb database, see Package Management (Legacy SSIS Service).
When you save the package you can set the package protection level, and if the protection level uses a password, provide the password. For more information about package protection levels, see Access Control for Sensitive Data in Packages.
If the wizard is started from an Integration Services project in SQL Server Data Tools (SSDT), you cannot run the package from the wizard. Instead, the package is added to the Integration Services project from which you started the wizard. You can then run the package in SQL Server Data Tools (SSDT).
  Note
In SQL Server Express, the option to save the package created by the wizard is not available.
 See Also
________________________________________
Tasks
SQL Server Import and Export Wizard
Create Packages in SQL Server Data Tools

Share and Care
For Latest Updates Always visit http://satish24k.blogspot.in
For Beautiful Wallpapers Always visit http://24ksatish.blogspot.in
Print Friendly and PDFPrintPrint Friendly and PDFPDF


For Further Reading,
POSTAL TECHNOLOGY, TECHNOLOGY, TECHNOLOGY TIPS

0 comments:

By Blog Gadgets

Choose Your Subject

2013 WALLPAPERS 7th Pay Commission AADHAR ACCOUNTS AIPEU AIR INDIA AIRF AIRTRAVEL ALLOWANCES AMAGING AMAZING ANNA HAZARE ANOMALY ANTI CORRUPTION MOVEMENT AUTISM BABIES BANKING BIRDS WALLPAPERS BLOGGING BONUS BSNL BUDGET Cadre Restructure Calenders CANCER CASUAL LABOURS CAT CAT Orders CBSE CCL CCS CCS PENSION CCS(JT) Rules 1979 CGHS CHARTS CHILD CARE Child Care Allowance CHILDREN EDUCATION ALLOWANCE CHINA CIRCULARS Compassionate Appointment CONSUMER NEWS Conveyance Allowance Court Orders CPWD CREATIVITY CRICKET. SPORTS WALLPAPERS CSD CSS CVC Cycle Maintenance Allowance DA DA MERGER DEFENCE DEFENSE DIGITAL INDIA DIGITAL LIFE CERTIFICATE DISABLED DOPT DOWNLOAD DPE DRDO eCards ECHS EDUCATION eMO EMPLOYEES NEWS EMPLOYMENT NEWS ENTERTAINMENT EPFO ESTATES EX SERVICEMEN EXAMINATIONS FACEBOOK FAQs FDI FESTIVALS FIGHT FOR JUSTICE FINANCE BILL 2013 FINMIN FLOWERS FORMs FUNNY PICTURES g GADGETS Ganesha Wallpapers GDS GENERAL KNOWLEDGE GENERAL KNOWLEDGE - CURRENT AFFAIRS GOD WALLPAPERS GPF GREETINGS Group B HBA HEALTH HIGH DEFINITION WALLPAPER HOLIDAYS Hostel Subsidy Allowance HRA IAS IBA IDA INCOME TAX INCREMENT INDEPENDENCE DAY INDEX NUMBERS INDIA INSURANCE INVESTMENT IP/ASP IPO Exam ISLAM JOINING TIME KIDS KVS LATEST POSTAL NEWS Latest Releases from PIB LEAVE LOKAYUKTA LOVE LTC MACPS MAKE IN INDIA MEDICAL Meghdoot Millennium MHA MOBILE BANKING MOBILE WALLPAPERS MOF MOTHER MY CORNER NATURE WALLPAPERS NEGATIVE LIST NEWS NPS One Rank One Pension ORDERS ORDINANCE PARLIAMENT NEWS PENSION People you must know PERSMIN PERSONALITY DEVELOPMENT PERSONOLITY DEVELOPMENT PFRDA POLITICS POSTAL TECHNOLOGY Postings PPF Promotions QUESTION PAPERS QUOTES RAILWAY NEWS RAJYASABHA NEWS RBI RECRUITMENT REIMBURSEMENT RELIGION REPUBLIC DAY RESERVATION RESULTS Retirement Age RTI SANATANA DHARMA Sanchaya Post SAPOST SBCO SC SCIENCE SCOVA SECULAR SEXUAL HARASSMENT SKIN CARE SLEEP SMS SMS-GOODNIGHT SPEEDNET ST Study Material TATKAL TEACHERS TECHNOLOGY TECHNOLOGY TIPS TERRORISM TRANSFER TRAVEL Travelling Allowance Troubleshooting Problems in Postal Applications UNION NEWS UPSC VIDEOS Virus Wallpapers Washing Allowance WILD PHOTOGRAPHY WOMAN ಕನ್ನಡಿಗ

Popular Posts of the Month

All Time Popular Posts

 
Blogger Wordpress Gadgets