How can I get the entire database script?

hidrau
hidrau used Ask the Experts™
on
Hello guys

I need to get all tables, views, store procedures, functions etc from my Database to run it in another database placed into another machine.

How can I do that?

thanks
Alexandre
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Senior .Net Consultant
Top Expert 2016
Commented:
from SSMS, right-click your database, select Tasks and Generates Scripts...
Patrick BogersDatacenter platform engineer Lindows
Commented:
In another database? Or same database hosted on another server?

If the first option is appropiate you might want to look into sql toolbelt.
Download a trial here

It is the perfect tool for syncing schema or data.

Cheers

Author

Commented:
Sorry my mistake when I wrote. Another server
OWASP Proactive Controls

Learn the most important control and control categories that every architect and developer should include in their projects.

Éric MoreauSenior .Net Consultant
Top Expert 2016

Commented:
have you tried to script it?
Patrick BogersDatacenter platform engineer Lindows

Commented:
Ok same database on another server.

Then both remarks are valid, just generate scripts as 'create to' not like 'drop and create'

Sql toolbelt does the same but easier to control.

Author

Commented:
Éric, I am trying right now.

I didn't know that was possible with SSMS

Author

Commented:
Thanks a lot for your help

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial