Re: Import / Ordering / Script File
From: mark baekdal (markbaekdal_at_discussions.microsoft.com)
Date: 01/01/05
- Next message: David Portas: "Re: Cursor operations"
- Previous message: Steve Kass: "Re: condensing a range of numbers"
- In reply to: Rob Meade: "Re: Import / Ordering / Script File"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 1 Jan 2005 01:07:02 -0800
Hello Rob.
Basically SQL Server doesn't handle dependencies as it cannot due to the
possibility of inconsistancies introduced within the sysdepends system table.
You'll either have to modify your procedure when it errors or implement
something that handles dependancies. I've built such a product that you may
want to check out. DB Ghost - www.dbghost.com
regards,
Mark Baekdal
www.dbghost.com
+44 (0)208 241 1762
Database change management for SQL Server
"Rob Meade" wrote:
> "John Bell" wrote ...
>
> > I am not sure why you are scripting and creating views in a DTS job? The
> > order is probably alphabetical and assuming that you are dropping the
> views
> > (singularly) before creating each view, you could probably run the script
> > twice which may result in no errors.
>
> Hi John,
>
> I probably didn't explain myself very clearly - sorry - the procedure I
> carried out initially was to perform an import from a remote SQL Server to
> my own. As I went through the wizard at the end it asks you if you would
> like to schedule it / save it - so I did, this in turn then created a DTS
> package and a scheduled job for me.
>
> When I look at the dts I can open it up and it basically gives me the import
> wizard screen again where I can set all of the objects to import and so on.
>
> On the window for the wizard at the bottom there's a field for the 'script
> directory' - I hadn't ever changed this or done anything with it - but when
> I looked in this directory there were lots of files, and having removed them
> all and run the dts again - they all re-appeared - so its obviously creating
> these files, then executing the scripts to do the import (I'm assuming).
>
> I didn't check to see if it was doing them alphabetically, but have got
> around the problem for now by splitting it all into pieces...the first dts
> gets the tables and stored procedures, the second gets the 1 view which
> needs to be done before one of the others, then the last dts gets all of the
> rest of the views. All wrapped up in one job that fires them off one after
> the other...its working, but just feels like it could have been achieved
> better...I could of obviously changed the view which is dependant on the
> other view to use a load of joins instead to achieve the same result, but
> that seemed like for more work that was warranted....
>
> Regards
>
> Rob
>
>
>
- Next message: David Portas: "Re: Cursor operations"
- Previous message: Steve Kass: "Re: condensing a range of numbers"
- In reply to: Rob Meade: "Re: Import / Ordering / Script File"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|