SQL 2005 - Scripting Tables with Triggers

Hello,

I've got a database with a bunch of tables in it.  There are a certain number of the tables (not all) that I want to create a script so I can create them in another database.  These tables also has triggers associated with it.  How can I create a script that will create the tables and the triggers and relationships ect in the new database.  I am using SQL 2005.  Any help would be greatly appreciated.
UncleTAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Aneesh RetnakaranDatabase AdministratorCommented:
ssms -> tools -> options -> sql server object explorer- scripting -> enable script triggers
0
UncleTAuthor Commented:
aneeshattingal,

Under options I don't see "Sql Server Object Explorer"?  SEE ATTACHED FILE.
Options.jpg
0
Aneesh RetnakaranDatabase AdministratorCommented:
is that sql express ?
the one i gave was for sql 2008, and for 2005, you should be able to see a 'Scripting' menu query results and designers, even that one is missing in the above picture
0
Acronis True Image 2019 just released!

Create a reliable backup. Make sure you always have dependable copies of your data so you can restore your entire system or individual files.

UncleTAuthor Commented:
No this is not SQL Express.  This is from a regular machine where I installed sql tools.  This is not on the server.  Could that be the problem?  Here is the info from the About.


About.jpg
0
UncleTAuthor Commented:
The Designer menu item is there.  But I don't see any scripting menu item.  Can anyone help on this one??????
0
Aneesh RetnakaranDatabase AdministratorCommented:
do u have sufficient permission?
also if you haven't installed the latest service pack sp3
even you can try installing the ssms for 2008, which is really good, you will be able to connect to sql 2005 from that
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Raja Jegan RSQL Server DBA & Architect, EE Solution GuideCommented:
Hope you use Generate Scripts Wizard. In that case, just configure Scripting Triggers option in the wizard as shown in the picture below:
0
Raja Jegan RSQL Server DBA & Architect, EE Solution GuideCommented:
Missed attaching the file.
Generate-Scripts.JPG
0
UncleTAuthor Commented:
Thanks for everyones help.  Installing SP3 solved my problem.  Thanks Again.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server 2005

From novice to tech pro — start learning today.