dbTalk Databases Forums  

Can I create a Scipt with only create index command?

microsoft.public.sqlserver.tools microsoft.public.sqlserver.tools


Discuss Can I create a Scipt with only create index command? in the microsoft.public.sqlserver.tools forum.



Reply
 
Thread Tools Display Modes
  #31  
Old   
Erland Sommarskog
 
Posts: n/a

Default Re: Can I create a Scipt with only create index command? - 08-29-2008 , 05:40 PM






kmoskal (AT) newsgroups (DOT) nospam (zork (AT) newsgroups (DOT) nospam) writes:
Quote:
How to create a script with indexes and Primary Keys only using SQL Server
2000 Enterprise Manager

In short, using SQL Server 2000 EM, from a database select the Generate
Script option.

When the wizard starts,

1. From the General Tab - select the script all object box
2. From the Formatting Tab remove all the checkboxes under the srcipting
options...
3. From the Options Tab, select Script Indexes and/or Script Primary
keys... 4. Then either press OK or return to the General Tab and press
preview.

The resulting output is a script of only create index commands and/or
Alter Table commands (used to create the PK constraint).

A very useful feature that is no longer available in SSMS 2005 or SSMS
2008.
Thanks. I would say that the way to do it was not very apparent. It's
almost as if it works by accident.

I tried the corresponding in SSMS, but it was smarter, it scripted
nothing at all.

I'm afraid that you will have to make your own hack; my Perl hack could
be a start, or investigate the third-party market. Red Gate's SQL
Compare is able to script to file, but I don't have any copy available
to see what you selections you can make.

--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinf...ons/books.mspx



Reply With Quote
  #32  
Old   
Erland Sommarskog
 
Posts: n/a

Default Re: Can I create a Scipt with only create index command? - 08-29-2008 , 05:40 PM






kmoskal (AT) newsgroups (DOT) nospam (zork (AT) newsgroups (DOT) nospam) writes:
Quote:
How to create a script with indexes and Primary Keys only using SQL Server
2000 Enterprise Manager

In short, using SQL Server 2000 EM, from a database select the Generate
Script option.

When the wizard starts,

1. From the General Tab - select the script all object box
2. From the Formatting Tab remove all the checkboxes under the srcipting
options...
3. From the Options Tab, select Script Indexes and/or Script Primary
keys... 4. Then either press OK or return to the General Tab and press
preview.

The resulting output is a script of only create index commands and/or
Alter Table commands (used to create the PK constraint).

A very useful feature that is no longer available in SSMS 2005 or SSMS
2008.
Thanks. I would say that the way to do it was not very apparent. It's
almost as if it works by accident.

I tried the corresponding in SSMS, but it was smarter, it scripted
nothing at all.

I'm afraid that you will have to make your own hack; my Perl hack could
be a start, or investigate the third-party market. Red Gate's SQL
Compare is able to script to file, but I don't have any copy available
to see what you selections you can make.

--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinf...ons/books.mspx



Reply With Quote
  #33  
Old   
Erland Sommarskog
 
Posts: n/a

Default Re: Can I create a Scipt with only create index command? - 08-29-2008 , 05:40 PM



kmoskal (AT) newsgroups (DOT) nospam (zork (AT) newsgroups (DOT) nospam) writes:
Quote:
How to create a script with indexes and Primary Keys only using SQL Server
2000 Enterprise Manager

In short, using SQL Server 2000 EM, from a database select the Generate
Script option.

When the wizard starts,

1. From the General Tab - select the script all object box
2. From the Formatting Tab remove all the checkboxes under the srcipting
options...
3. From the Options Tab, select Script Indexes and/or Script Primary
keys... 4. Then either press OK or return to the General Tab and press
preview.

The resulting output is a script of only create index commands and/or
Alter Table commands (used to create the PK constraint).

A very useful feature that is no longer available in SSMS 2005 or SSMS
2008.
Thanks. I would say that the way to do it was not very apparent. It's
almost as if it works by accident.

I tried the corresponding in SSMS, but it was smarter, it scripted
nothing at all.

I'm afraid that you will have to make your own hack; my Perl hack could
be a start, or investigate the third-party market. Red Gate's SQL
Compare is able to script to file, but I don't have any copy available
to see what you selections you can make.

--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinf...ons/books.mspx



Reply With Quote
  #34  
Old   
Erland Sommarskog
 
Posts: n/a

Default Re: Can I create a Scipt with only create index command? - 08-29-2008 , 05:40 PM



kmoskal (AT) newsgroups (DOT) nospam (zork (AT) newsgroups (DOT) nospam) writes:
Quote:
How to create a script with indexes and Primary Keys only using SQL Server
2000 Enterprise Manager

In short, using SQL Server 2000 EM, from a database select the Generate
Script option.

When the wizard starts,

1. From the General Tab - select the script all object box
2. From the Formatting Tab remove all the checkboxes under the srcipting
options...
3. From the Options Tab, select Script Indexes and/or Script Primary
keys... 4. Then either press OK or return to the General Tab and press
preview.

The resulting output is a script of only create index commands and/or
Alter Table commands (used to create the PK constraint).

A very useful feature that is no longer available in SSMS 2005 or SSMS
2008.
Thanks. I would say that the way to do it was not very apparent. It's
almost as if it works by accident.

I tried the corresponding in SSMS, but it was smarter, it scripted
nothing at all.

I'm afraid that you will have to make your own hack; my Perl hack could
be a start, or investigate the third-party market. Red Gate's SQL
Compare is able to script to file, but I don't have any copy available
to see what you selections you can make.

--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinf...ons/books.mspx



Reply With Quote
  #35  
Old   
Erland Sommarskog
 
Posts: n/a

Default Re: Can I create a Scipt with only create index command? - 08-29-2008 , 05:40 PM



kmoskal (AT) newsgroups (DOT) nospam (zork (AT) newsgroups (DOT) nospam) writes:
Quote:
How to create a script with indexes and Primary Keys only using SQL Server
2000 Enterprise Manager

In short, using SQL Server 2000 EM, from a database select the Generate
Script option.

When the wizard starts,

1. From the General Tab - select the script all object box
2. From the Formatting Tab remove all the checkboxes under the srcipting
options...
3. From the Options Tab, select Script Indexes and/or Script Primary
keys... 4. Then either press OK or return to the General Tab and press
preview.

The resulting output is a script of only create index commands and/or
Alter Table commands (used to create the PK constraint).

A very useful feature that is no longer available in SSMS 2005 or SSMS
2008.
Thanks. I would say that the way to do it was not very apparent. It's
almost as if it works by accident.

I tried the corresponding in SSMS, but it was smarter, it scripted
nothing at all.

I'm afraid that you will have to make your own hack; my Perl hack could
be a start, or investigate the third-party market. Red Gate's SQL
Compare is able to script to file, but I don't have any copy available
to see what you selections you can make.

--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinf...ons/books.mspx



Reply With Quote
  #36  
Old   
Erland Sommarskog
 
Posts: n/a

Default Re: Can I create a Scipt with only create index command? - 08-29-2008 , 05:40 PM



kmoskal (AT) newsgroups (DOT) nospam (zork (AT) newsgroups (DOT) nospam) writes:
Quote:
How to create a script with indexes and Primary Keys only using SQL Server
2000 Enterprise Manager

In short, using SQL Server 2000 EM, from a database select the Generate
Script option.

When the wizard starts,

1. From the General Tab - select the script all object box
2. From the Formatting Tab remove all the checkboxes under the srcipting
options...
3. From the Options Tab, select Script Indexes and/or Script Primary
keys... 4. Then either press OK or return to the General Tab and press
preview.

The resulting output is a script of only create index commands and/or
Alter Table commands (used to create the PK constraint).

A very useful feature that is no longer available in SSMS 2005 or SSMS
2008.
Thanks. I would say that the way to do it was not very apparent. It's
almost as if it works by accident.

I tried the corresponding in SSMS, but it was smarter, it scripted
nothing at all.

I'm afraid that you will have to make your own hack; my Perl hack could
be a start, or investigate the third-party market. Red Gate's SQL
Compare is able to script to file, but I don't have any copy available
to see what you selections you can make.

--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinf...ons/books.mspx



Reply With Quote
  #37  
Old   
Erland Sommarskog
 
Posts: n/a

Default Re: Can I create a Scipt with only create index command? - 08-29-2008 , 05:40 PM



kmoskal (AT) newsgroups (DOT) nospam (zork (AT) newsgroups (DOT) nospam) writes:
Quote:
How to create a script with indexes and Primary Keys only using SQL Server
2000 Enterprise Manager

In short, using SQL Server 2000 EM, from a database select the Generate
Script option.

When the wizard starts,

1. From the General Tab - select the script all object box
2. From the Formatting Tab remove all the checkboxes under the srcipting
options...
3. From the Options Tab, select Script Indexes and/or Script Primary
keys... 4. Then either press OK or return to the General Tab and press
preview.

The resulting output is a script of only create index commands and/or
Alter Table commands (used to create the PK constraint).

A very useful feature that is no longer available in SSMS 2005 or SSMS
2008.
Thanks. I would say that the way to do it was not very apparent. It's
almost as if it works by accident.

I tried the corresponding in SSMS, but it was smarter, it scripted
nothing at all.

I'm afraid that you will have to make your own hack; my Perl hack could
be a start, or investigate the third-party market. Red Gate's SQL
Compare is able to script to file, but I don't have any copy available
to see what you selections you can make.

--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinf...ons/books.mspx



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.