Re: moving data between servers

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Arun (kathir_arun_at_hotmail.com)
Date: 09/27/04


Date: Mon, 27 Sep 2004 11:10:40 +0530

As I 've told you, I have to fetch the data that belong to a particular
"Project". I need to filter out the data depending on the project ID and I
have to invoke this programatically. That's the reason I went for "custom"
select queries.

My plan is to start from the "Projects" table and find out which all tables
are having a "foreign key" relationship with this table and for these
tables, I'll find out all the tables that these tables depend in turn and
include their data (and so on. it goes recursively till all the
"dependencies" are resolved).

I have come across the sp_fkeys and sp_pkeys system procedures that returns
the foreign key and the foreign key table name for a given table. But I
don't know how process the results of one stored procedure's output inside
another stored procedure. Basically i have to fetch these results and inturn
go and find out the dependencies of the tables returned in the result. Any
help would be helping me a lot.

thanks,
arun

"GrantMagic" <grant@magicalia.com> wrote in message
news:OCubVjUoEHA.2356@TK2MSFTNGP10.phx.gbl...
> Why don't you use Sql Server's built in backup and restore feature?
>
> "Arun" <kathir_arun@hotmail.com> wrote in message
> news:%23i4SuJToEHA.3900@TK2MSFTNGP10.phx.gbl...
> > Hi,
> >
> > I have a query on the best way for moving data across the SQL Servers.
We
> > have a concept of "Projects" in our tool and the data is organized under
> > these "Projects". We have a requirement for export a project's data to a
> > file and import that back (in a different machine, where our tool is
> > running). This data is present in multiple tables. I'm planning to fetch
> > all
> > the data in a dataset and use it's WriteXML method to generate an XML
> > file.
> > At the other end (for import), generate the DataSet from the XML file,
> > retrieve the data from dataset tables and populate in the SQL Server
> > tables.
> > I'm just wondering if this is an efficient way of achieving the
> > export/import of my project data or if there is anyother better way of
> > doing
> > this..
> >
> > Thanks in advance,
> > Arun
> >
> >
>
>



Relevant Pages

  • Re: Principle of Orthogonal Design
    ... FOREIGN KEY REFERENCES R1 ... but you seem to do it here at schema level. ... few extra dependencies you haven't told us about? ... interactions between inclusion dependencies and functional dependencies. ...
    (comp.databases.theory)
  • Re: Principle of Orthogonal Design
    ... FOREIGN KEY REFERENCES R1 ... but you seem to do it here at schema level. ... few extra dependencies you haven't told us about? ... I didn't have the universal relation assumption in mind. ...
    (comp.databases.theory)
  • Re: A research effort on a computing model...
    ... I do not recall mentionning anything about dependencies ... PART, PART in CAR has type PART, therefore *foreign key* is ... MachinesEmployeesAreTrainedOn ...
    (comp.databases.theory)
  • Re: how to attach screen shot of error??
    ... cannot fetch the dependencies for virtualbox. ... I would suggest connecting ...
    (Ubuntu)
  • Re: Principle of Orthogonal Design
    ... FOREIGN KEY REFERENCES R1 ... but you seem to do it here at schema level. ... few extra dependencies you haven't told us about? ... I didn't have the universal relation assumption in mind. ...
    (comp.databases.theory)