Dependent Objects in scripts 
Author Message
 Dependent Objects in scripts
Is there a "SET" or other option that will delay SQL Server 2000 from check
objects that are being created in a script until all objects are created?
Specifically, I have generated a script of views from an existing database
using enterprise manager.  The script runs in alpha order and some views are
dependent on other views that may be created later in the order.  When I run
the script, I get an error message saying that an object does not exist.
How can I solve this?

Thanks in advance.



Tue, 29 Nov 2005 16:14:02 GMT
 Dependent Objects in scripts


Quote:
> Is there a "SET" or other option that will delay SQL Server 2000 from
check
> objects that are being created in a script until all objects are created?
> Specifically, I have generated a script of views from an existing database
> using enterprise manager.  The script runs in alpha order and some views
are
> dependent on other views that may be created later in the order.  When I
run
> the script, I get an error message saying that an object does not exist.
> How can I solve this?

There is an option to create scripts for dependant objects, but this will
create the tables as well. Plus the dependencies are fragile since droping
and recreating an object that is depended upon will break the dependency
relationship.

What I usually do run the just create view statements over and over until
the only error is "object already exists".

Unfortunately,

David



Tue, 29 Nov 2005 17:07:32 GMT
 Dependent Objects in scripts
1) create only "drop view" script
2) create "create view" script
3) run the drop view script initially which will clear all the views.
4) run the "create view" script more than once till all the views are
created in the database.

--
--Vishal


Quote:
> Is there a "SET" or other option that will delay SQL Server 2000 from
check
> objects that are being created in a script until all objects are created?
> Specifically, I have generated a script of views from an existing database
> using enterprise manager.  The script runs in alpha order and some views
are
> dependent on other views that may be created later in the order.  When I
run
> the script, I get an error message saying that an object does not exist.
> How can I solve this?

> Thanks in advance.



Tue, 29 Nov 2005 18:14:33 GMT
 
 [ 3 post ] 

 Relevant Pages 

1. Dependent objects script is empty although many dependent objects exist

2. SQL 7.0 Generate SQL Scripts with Dependent Objects

3. SQL Server Copy Object Task: include dependent objects

4. How To List the dependent objects of defaults

5. Update from object types with type or table dependents

6. Finding dependent objects in different DB

7. DTS Dependent Objects

8. Access right inheritance (for dependent objects)

9. How to disable check dependent object ?

10. Update from object types with type or table dependents

11. SP_DEPENDS not showing all dependent objects

12. converting paradox dos script to paradox (object pal) windows script


 
Powered by phpBB® Forum Software