473,412 Members | 2,284 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,412 software developers and data experts.

Generating Script for a DataBase

366 256MB
Hi friends

recently i have started working on SQLserver 2005 as DBA for my project .

when i tried to generate script for my Database i was confused to find two options for scripting in management studio.

1. cript DataBase as and 2. Tasks-->Generate Script..

what is the difference between these two options ,which is to be used mostly

i have done a lot of googling but dint get any actual reply .

hope some one can reply as soon as possible.

Thanks
Aug 11 '08 #1
4 1103
deepuv04
227 Expert 100+
Hi,
The first option Script Database as will generate the script at database level, means if you select created to option then it will generate script for create
database (a blank database).

The second option Generate Script is used to include database elements also such as Tables, Functions, Procedures, Rules.. You can specify various options in the wizard for creating the script and specify all or specific objects for script.


Thanks
Aug 11 '08 #2
nmsreddi
366 256MB
Hi,
The first option Script Database as will generate the script at database level, means if you select created to option then it will generate script for create
database (a blank database).

The second option Generate Script is used to include database elements also such as Tables, Functions, Procedures, Rules.. You can specify various options in the wizard for creating the script and specify all or specific objects for script.


Thanks
HI deepuv

Thanks for your reply,

i used second option for generating script and also checked select all objects in database option that occur in second pane .

but now the problem is when i run the script in another server i got the database and all its objects correctly but the foreign key relations ships are missing ,
is there any more options to select, in the third pane (Choose Scripts Option) is there any changes to be made for these script options .

Any help pleaase.

Thanks
Aug 11 '08 #3
deepuv04
227 Expert 100+
HI deepuv

Thanks for your reply,

i used second option for generating script and also checked select all objects in database option that occur in second pane .

but now the problem is when i run the script in another server i got the database and all its objects correctly but the foreign key relations ships are missing ,
is there any more options to select, in the third pane (Choose Scripts Option) is there any changes to be made for these script options .

Any help pleaase.

Thanks

Hi,
In the third pane, under Table/View Options set Script Foreign keys to true.

Thanks
Aug 11 '08 #4
nmsreddi
366 256MB
Hi,
In the third pane, under Table/View Options set Script Foreign keys to true.

Thanks
Ya got it ,

any way thanks for your reply
Aug 11 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Matik | last post by:
Hello, I need to change collation in my database (more databases acctualy). Therefore, I wanted to make a script, which will do it at one more time. I already have a cursor, updating...
3
by: drdeadpan | last post by:
Hi, I was using enterprise manager to generate a script for my DB. I scripted only my tables and views and in Options I picked all the options EXCEPT "script Primary Keys, Foreign Keys and...
12
by: Martin_Hurst | last post by:
Has some one come up with a similar type script that could be used in a Postgresql database? The script below was created for a SQLServer database. Thx, -Martin ...
6
by: Ollie Riches | last post by:
Is it possible to generate the t-sql script for a database schema and the data from .Net(C#) at all? Cheers Ollie Riches
2
by: bizt | last post by:
Hi, Is it possible to obtain the width/ height of an image when that image is dyanically created using a PHP script and passing GET attributes. For example: <img...
3
by: dawnerd | last post by:
I am having troubles with my script. It is supposed to generate a "map" from a serialized array stored in a database. However, it is not generating any html. I know the data is being retrieved from...
1
by: lavadan | last post by:
Hi Folks, I am a newbie to VB Script. I need to generate the following XML document using VB Script. Can you please advise me on this? I can manage at least if I know the concept of generating XML...
0
by: Aswanth | last post by:
I'm Generating Reports in SSRS-2005.. Previously I got the Data from One Database & Generated Reports.. Now I used to get the Data from Two Different Databases(ie Database-1 & Database-2) & to...
1
by: csharpula csharp | last post by:
Hello, I need to generate cs files from XSD files. I would like to do it automatically. What is the best way to do it? Is it better be done with PreBuild inside VS (before compilation) or to...
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
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.