moving large amounts of data from one db to another

I have a table that has millions of rows of data in it, which then 
references another table with millions of referenced (matching by foreign 
key constraints)... I need to move this data from database A to a new 
database B, is there any way to do this and preserve the identity columns 
and their referential integrity?) Thanks! 

0
Smokey
11/23/2009 2:58:10 PM
sqlserver.programming 1873 articles. 0 followers. Follow

1 Replies
981 Views

Similar Articles

[PageSpeed] 2

You can't have integrated RI across databases so that part is out. But you 
can certainly insert and keep the identities. Take a look at SET IDENTITY 
INSERT in BOL.

-- 

Andrew J. Kelly   SQL MVP
Solid Quality Mentors

"Smokey Grindel" <nospam@nospam.com> wrote in message 
news:21185A4B-4FE2-4B90-B7D5-D669877FC1B5@microsoft.com...
> I have a table that has millions of rows of data in it, which then 
> references another table with millions of referenced (matching by foreign 
> key constraints)... I need to move this data from database A to a new 
> database B, is there any way to do this and preserve the identity columns 
> and their referential integrity?) Thanks! 

0
Andrew
11/23/2009 3:52:17 PM
Reply:

Similar Artilces:

moving clip art into the correct folder
I have some GIFs, I'd like to drag and drop into Publisher 2007 so that come up in a search and are usable. Is this possible? If so, what folder/file would I use? thx Did you supply the .gif images with keywords? You can create a folder with your .gif images and let the Organizer find them. When you are in Publisher, Insert, Clipart, the Organizer will open, drag and drop from the created folder. Once the clip is in your Publisher document you can add it to the Content Library (Insert Menu). -- Mary Sauer http://msauer.mvps.org/ "RichardS" <RichardS@...

moving records to new business unit.
We only have one business unit. We have about 400 accounts. We want to create a new business unit and move some of the accounts to the new business unit. The president of our company wants to see ALL records from ALL business units. A salesperson wants to see ONLY records from her business unit. How can we create new business units and move exising account records to the new business unit? Lynn Lynn Business Units are containers for Users. When you create a Business Unit and add users to it, all the records (Accounts, Contacts, Activities etc) will automatically be associated with th...

Is there way to give project ownership to another user in bulk?
All I know right now is to go into PWA, edit the properties of each project and pick a new owner. Is there a programmatic way to do that for lots of projects at the same time? Thanks, Andy Novak UNT Hi Andy, I think you'd need to code this somehow. -- Regards, Ben. http://www.applepark.co.uk http://appleparkltd.spaces.live.com/ "anovak@unt.edu" wrote: > All I know right now is to go into PWA, edit the properties of each > project and pick a new owner. Is there a programmatic way to do that > for lots of projects at the same time? > >...

credit card signature only for charges exceeding amount
We are thinking about switching to a no signature policy for charges less than $25 - this is offered by M/C, VISA, and Amex for certain industries. I am not a programmer, but I was wondering if one can use XML to edit the receipt template so that a credit card signature slip is only printed for transactions in excess of $25? We use a fairly standard receipt format - I would think it would only be a couple of lines of code. I'd prefer not to have our cashiers try to remember that signatures are still required for these higher transactions. Thanks. The card associations (Visa &...

create chart from series grouped by value in another column
How to create a chart from series grouped by a value from another column? Example The sheet has these rows: A, DATE, 1 A, DATE, 6 A, DATE, 7 B, DATE, 3 B, DATE, 15 B, DATE, 6 B, DATE, 6 A{1,6,7} is a series and B{3,15,6,6} is a different series. I have around 2000 different series like that in my excel. How can I auto-create charts for each series (i.e. not selecting each series one by one)? Creat another Sheet with the data series in the order you wish to graph them. "HarCo" wrote: > How to create a chart from series grouped by a value from another column? > Example > ...

How do I merge similar data across different excel worksheets?
If you have a unique key value that's on each sheet, you could use =vlookup() or =index(match()). You could look at Debra Dalgleish's site: http://www.contextures.com/xlFunctions02.html and http://www.contextures.com/xlFunctions03.html MK wrote: -- Dave Peterson ...

Help to import data from reference workbook
I wasn't sure if this would require VB or not so I've put this in the General Question group. I have 2 workbooks where the first 3 columns of each row (after a title row) consist of an ID number, a North coordinate and an East Coordinate. Workbook A is complete in that every ID for our system is included along with the coresponding North and East coords. Workbook B includes a subset of the IDs and only some of the IDs have their coords in columns B and C. How do I import the coords into Workbook B without having to copy/paste a thousand or more times. Thanks in advance for a...

Check Stub adding Minus sign for debit amounts on stub
Have modified the check stub in report writer successfully to print Distribution accounts and have it showing the amounts distributed to each account ( Document ID 26649). Now they want to add a "-" before the Debit amount or encase the debit in < >. I've tried to add a calculated field using a String Constant and the CAT operator, but I seem to get an error when I try to run that report. "-" # PM_Distribution_WORK_OPEN.DebitAmount Any ideas? Why not change the Calculated FIeld to Currency and multiply by -1. The result will probably display as e.g. (1...

Move message to another conversation
Is there a way to move posted messages in a certain public folder to a different conversation within that public folder? We have a user that has been posting to new conversation every time but now wants to collate all previous messages into one conversation. Thanks, Grant no simple solution that I'm aware of. I'm sure you could write a script to rewrite the headers ... am crossposting to m.p.e.development in case someone has an idea. What version of Exchange are you running? D. "Grant" <gpsnett@hotmail.com> wrote in message news:eahSqiC9DHA.3648@TK2MSFTNGP11.ph...

Presenting data from database
I have an idea to allow users to enter data through web interface but I wish to have output in Excell file, normal table with sum values or just data from database. What is the easiest way to make something like this ? regards Peter ...

Advanced Data Validation
Dear all, I wonder how can I type the first letter of a word in a cell which has data validation on a list of names. For example, the list of data is "Apple, Banana, Bicycle, Orange...". If I type "b" in the cell, the 1st word starting with "b" will appear i.e. Banana. Therefore I do not need to scroll the down the arrow to choose "Banana". Hope someone can give advice. Louis Data|Validation doesn't work like this. But you could use a combobox from the control toolbox toolbar to get this effect. Louis.kk.lam@gmail.com wrote: > > Dear all...

Can a CMDIChildWnd to move outside its CMDIFrameWnd?
Hi, Is there a relatively easy way to allow an MDI child window to move outside its parent's frame window? Any suggestions appreciated. Don H. ...

Copy data into multiple workbooks
Within the QA Master workbook, the boss will have a list of questions (criteria) that will be mirrored in all employee workbooks and the QA Template. If the boss adds a criteria in the QA Master workbook, I need to add it to the QA Template workbook and all employee workbooks so he does not have to go through 80+ workbooks individually. If you can provide the code to do this for one cell in QA Master and place it in QA Template, I believe I can figure out how to get it to the employee workbooks. Also, will I need to open each workbook in order to place the new criteria int...

Copy from many cells and paste to one
I need to copy a range of cells (C7:C20) and past the contents into one cell (B4). the concatenate function is not the solution because I need the results to appear as separate lines in the cell (B4) when pasted. (leaving a "return" between lines) Weird I know but Ahem, "It's for a friend". ;) Thanks, Robert -- eoreality ------------------------------------------------------------------------ eoreality's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=24549 View this thread: http://www.excelforum.com/showthread.php?threadid=381448 ...

Merge two cells together without losing value of one cell
Is there any way to merge two cells together without getting one value deleted? As an example, I'd like to add ";" after a number, but when I do a merge the ";" would get deleted. Thanks. I have 300 cells with numbers to add ";" to. "Sharon" wrote: > Is there any way to merge two cells together without getting one value > deleted? As an example, I'd like to add ";" after a number, but when I do a > merge the ";" would get deleted. Thanks. On Aug 7, 10:00=A0am, Sharon <Sha...@discussions.microsoft.com&g...

Data available for plotting vs already plotted data
Hello -- This charting application has the following features: 1 - user can "import" a time series (into a set of columns in a worksheet); the app automatically adds a plot of the data to the chart 2 - user can delete from the chart a series which was plotted in 1; the source data is not deleted from the worksheet which holds it 3 - user can decide later to add to the chart a series deleted in 2 Problem: I want to present in a listbox the names/legends of the "imported but not plotted" series so the user can select one for 3 If I could use SQL in this app, the source ...

backing up emails to another computer
I have outlook express 6 -- I want to copy the file that has all my emails and burn the to a cd. How do i do this? PS this is for Windows XP Jay wrote: > I have outlook express 6 -- I want to copy the file that > has all my emails and burn the to a cd. How do i do > this? > > PS this is for Windows XP Go to http://support.microsoft.com Advanced search Search on "backup restore" (all words) for Outlook Express. Read the KB article. You are posting to the wrong newsgroup. This newsgroup is for Outlook. Outlook is a component of Microsoft Office. Outlook Expres...

How to copy Contacts data on my Notebook's Outlook 2007 to Addres Book of Outlook Express on desktop PC
I have entered most of my friends' data on my Notebook's Outlook 2007. However, on my home desktop PC, I'm using Outlook Express 6. How do I transfer the Notebook's Outlook Contacts to the Desktop's Outlook Express Address Book? I use Win XP on both machines. I was told Outlook stores its Contacts data in a Contacts Folder, while Outlook Express reads only files with wab extensions and it's tricky to Import a Contacts folder to a wab file. Pse help. Thank you. "Jimmy Hsu" <jimmyhsu@tifventures.com> wrote in message news:fjrb5f$pn2$1@maw...

Insert data from a Dataset into a SQL Database
Hi guys my name is Ralph, i am kinda new to this so please bear with me. I have written a .net web service which accepts a stream of data see relevent source code). Public Function PutBondInfo(ByVal data As String) As DataSet Try Dim zh As New ZipHelper Dim sz As String Dim cn As SqlConnection Dim da As SqlDataAdapter Dim ds As New DataSet Dim xSet As New DataSet Dim sSql As String Dim mySerializer As XmlSerializer = New XmlSerializer(ds.GetType()) cn = New SqlConnection(&quo...

How do I delete cells in Excel without changing the data in others
I want to get rid of some of the rows in my spreadsheet but the data in the ones I am leaving behind are linked by formulas? As soon as I delete them all the data goes from the the others. Gemma, I may not understand your situation. An example of what I think you're saying is: Cell A2: A1+1. You want to delete cell A1, but leave A2 with the value it currently has. If this is the case, you need to copy A2 and the, using paste special, paste the value back into A2. This way A2 no longer has any formula at all and will remain unchanged when you delete A1. Art "G...

Trying to transfer money 98 from one computer to money 2002 on another computer
I am trying to get my old money 5.0 version off my laptop to a newer version of money 2002 on another computer. The laptop is windows 98 & the new computer is windows XP. The laptop's floppy is not working so I can not copy the file to a floppy so I tried to email the file so I could open it on the new computer. When I try to open the new file it goes through the info but does not setup or give you the option to setup. If anyone has done this please let me know how. All my banking info is stored on this laptop & I don't want to send it in for repairs to get a new...

Lookup Data in external workbook
Hello: I have a worksheet called "PlantAnalysis". Column A has the "Item ID" and I would like to put the description in column B; starting at cell B3. I am trying to lookup the Item Description from an external workbook called "Item master" on worksheet labelled "List". Column A has the "Item ID" and Column C has the "Description".Is VLookup the recommended way to do this? Below is what I have but can't get it to work. Sub getdesc() 'Inserting vlookup statement to populate material description ...

Question on how to troubleshoot large CPU usage
Hi, I have a problem where my spreadsheet is taking most of my CPU. I'm interested in any tips or pointers on how to go about troubleshooting this. This is what I have: 1) 8 worksheets in total. 2) A couple of macros to import data from a MySQL database using an ODBC connector. 3) 4 of my worksheets store my imported data. The number of rows is variable but it's typically between 20 - 100 rows and about 5 columns. In some of these worksheets I have an extra 5 or so columns to do various calculations mostly for comparing dates and converting between Unix time and Excel date/time...

Exporting Data?
How is it possible to export data e. g. from a table in a new created worksheet (*.xls) or a layout (*.xlt)? Hi you may provide some more details what you're trying to achieve :-) -- Regards Frank Kabel Frankfurt, Germany "Drunken Alcoholic@talkto.guptaworldwide.com" <spiderIRS@web.de> schrieb im Newsbeitrag news:ciu5i3$oro$01$1@news.t-online.com... > How is it possible to export data e. g. from a table in a new created > worksheet (*.xls) or a layout (*.xlt)? > > ...

some one help with the function (OR)
some one help with the function (OR) I dont know how to use this function thankyou for al -- Message posted from http://www.ExcelForum.com Did you check the help file? What part of the explanation didn't you understand? -- Regards, Tushar Mehta www.tushar-mehta.com Excel, PowerPoint, and VBA add-ins, tutorials Custom MS Office productivity solutions In article <nader.198htq@excelforum-nospam.com>, nader <<nader.198htq@excelforum-nospam.com>> says... > some one help with the function (OR) > I dont know how to use this function > > thankyou for all...