Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 SP complexity....

Author  Topic 

lostboy
Starting Member

1 Post

Posted - 2004-05-17 : 14:16:38
Hi All,

Overview: I am trying to automate remote admin on a db. I have a dev db where tables are added/altered etc. I need to sync the structures. So I create a text file with the templated structure and load that to a table. I then want to run a sql query to load another table with the current stucture, compare them and generate the appropriate sql (ceate table, alter table) to duplicate the structure...

I am to write a stored procedure where I load a file via Bulk Insert(ok there), then I am trying to run a query that returns a bunch of records and I am not sure how to handle the resultset. I need some pointers on how to move thru the resultset...gotta do this twice

1. new tables
2. new columns/fields

If someone knows of a good tutorial with this type of functionality, could you point me to it?

TIA







Bastien

Cat, the other other white meat

nr
SQLTeam MVY

12543 Posts

Posted - 2004-05-17 : 14:40:27
Have a look at
http://www.nigelrivett.net/DMOScriptAllDatabases.html
Which gives a method of detecting changes between databases

Also have a look at
http://www.nigelrivett.net/SQLServerReleaseControl.htm
which will make it unnecessary.

You could also get slqcompare which I believe will generate update scripts for changes between two databases.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

ssarvesh
Starting Member

1 Post

Posted - 2004-05-20 : 08:01:24
My company's business is divided into two geographic locations. In SQL Server 7.0, I want to run a stored procedure at my site that updates data that resides at the other site and immediately updates the remote location's data based on some criteria. How do I share data and information between the two sites?

I also want to automate the running of the stored procedure.

Please help me out to solve this problem.
Go to Top of Page
   

- Advertisement -