Solved

Append /Update SQL with .mdf file

Posted on 2006-11-02
4
398 Views
Last Modified: 2008-03-17
I have SQL Server with Old Database (till Specific Date), and i have updated (.mdf & .ldf) files from the same SQL Server after that date. i want to merge or update the old Server with the new DB. how can i do that pls??

note: the two DB is identical (not in entries but in design).
0
Comment
Question by:vangeliseg06
[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
  • 2
  • 2
4 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 125 total points
ID: 17856255
you have to attach the "old" .mdf with another name, and perform the necessary insert/update/delete statements based on the design.
0
 

Author Comment

by:vangeliseg06
ID: 17856292
i'm new in SQL, so please tell me how can i move all the data after attaching it with different name! while the two db have the same tables and everything! the different only in the date of entries, First one from 2000 to 2003 and the new fom 2004 till now.
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 17856307
you can insert from 1 database to another like this:

insert into new_db.dbo.tablename ( <field list> )
  select <field list> from old_db.dbo.tablename

similary you can update and delete cross databases...
0
 

Author Comment

by:vangeliseg06
ID: 17856451
Thanks so much
0

Featured Post

Transaction Monitoring Vs. Real User Monitoring

Synthetic Transaction Monitoring Vs. Real User Monitoring: When To Use Each Approach? In this article, we will discuss two major monitoring approaches: Synthetic Transaction and Real User Monitoring.

Question has a verified solution.

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

Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

688 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