473,394 Members | 1,382 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Generate SQL Script

Hello,

I want to generate a SQL Script of a SQL Server database. To do this, I
right-click the database name and choose the option All Tasks/Generate
SQL Script.

Than I get a text file with a script that generates all objects, but the
order in which the objects are generated is wrong. There are a lot of
views in the database and many views are based on other views. When I
try to execute the script on a different computer, I get a lot of error
messages, because the script tries to create views that are based on
other views that are not created yet.

Is there a way to generate a script that automatically 'knows' which
views to create first or do I have to manually look through all views
and find out myself the execute order? (I hope not, because it are
really a lot of views).

Greetings,
Chris

*** Sent via Developersdex http://www.developersdex.com ***
Oct 23 '06 #1
1 4650
Chris,
I want to generate a SQL Script of a SQL Server database. To do this, I
right-click the database name and choose the option All Tasks/Generate
SQL Script.

Than I get a text file with a script that generates all objects, but the
order in which the objects are generated is wrong. There are a lot of
views in the database and many views are based on other views. When I
try to execute the script on a different computer, I get a lot of error
messages, because the script tries to create views that are based on
other views that are not created yet.

Is there a way to generate a script that automatically 'knows' which
views to create first or do I have to manually look through all views
and find out myself the execute order? (I hope not, because it are
really a lot of views).
Download yourself a copy of our database developer IDE called
"Database Workbench" at www.upscene.com

When extracting DDL, it shuffles the views around in the dependency
order.
--
Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Oracle &
MS SQL Server
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com
Oct 23 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Jerry | last post by:
Hi there: Does somebody have a solution to this one ? : How can I get a script to send two subsquent pages. Example: My script accepts form data and shows a preliminary "Thank you" page...
1
by: Gonzalo Aguirre | last post by:
hi.. as i write on the topic, i'm programing a Bash script using the standard GNU Linux text utilities (gawk, grep, sed, and so on) that get information from SQL source (table attib, type per...
1
by: JStrummer | last post by:
Any recommendations on how to generate an INSERT SQL script for the records in a tab-delimietd text file? The limitation is that, while I do have command-line mySQL access locally, I do not at my...
1
by: Terri | last post by:
I'd I have a problem I'd like to post CREATE TABLE and INSERT statements that will create my table and insert data into the table. I can use the scripting feature in Enterprise Manager to...
4
by: k.mitz | last post by:
Hi, I have a PHP application that allows users to generate a .pdf report of their database content. Normally, I've had to refresh a page to call the script to generate the report, so there's a...
5
by: David Lozzi | last post by:
Hello, I'd like to create the SQL script for any given table, view or proc in my database, through ASP.Net using VB. I'm building a module library and providing this code on the fly would ease...
0
by: ward | last post by:
Greetings. Ok, I admit it, I bit off a bit more than I can chew. I need to complete this "Generate Report" page for my employer and I'm a little over my head. I could use some additional...
13
by: gamernaveen | last post by:
I am coding a script , where basically the user has to enter his name , choose file , file comments if required and upload. The file comments , name , filename will be stored in the database with...
23
by: Geoff Cox | last post by:
Hello, Is it possible to use php to generate different menus for users who have access to files in different folders? For example, user Fred might be able to access files in folders A, B and...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.