Re: Import / Ordering / Script File

From: mark baekdal (markbaekdal_at_discussions.microsoft.com)
Date: 01/01/05


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
>
>
>



Relevant Pages

  • Re: SQL 2000 - Connection Error with DTS Packages
    ... After I changed all SQL Server 'Database Connection' steps in each of my DTS ... Package" option when you right click a DTS package name in ME. ...
    (microsoft.public.sqlserver.dts)
  • Re: vb.net dataTbl can DTS read?
    ... then using ADO to read/write the data to Sql Server. ... like what DTS does with Text Files, MS Access data, etc. ... Right now I am experimenting with writing the data from ...
    (microsoft.public.sqlserver.dts)
  • Re: SQL Server DTS From Sybase
    ... Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.SQLDTS.com - The site for all your DTS needs. ... > DataPump is used interchangeably with the transform Data Task ergo not the> ExecuteSQL task ... >>>> I want to import data from a Sybase database via a SQL Server DTS ...
    (microsoft.public.sqlserver.dts)
  • Re: SQL Server DTS From Sybase
    ... Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.SQLDTS.com - The site for all your DTS needs. ... > DataPump is used interchangeably with the transform Data Task ergo not the> ExecuteSQL task ... >>>> I want to import data from a Sybase database via a SQL Server DTS ...
    (microsoft.public.sqlserver)
  • Re: Who is using MSMQ?
    ... I understand about the dependencies; ... the SQL Server Service Manager are the same ones you get from the Windows ... about MSMQ and MSMQTriggers? ...
    (microsoft.public.sqlserver.security)

Loading