- In Microsoft SQL Server Management Studio Express, expand the databases.
- Right-Click on the database containing objects you want to copy to another database
- Click on Tasks, then Generate Scripts… This will open up the Script Wizard, which is pretty much self-explanatory:
- Select the database (which should be pre-selected for you),
- Select Options (first time around you might just accept the default selections),
- Choose the Object Types you want to script (Stored Procedures, User Defined Functions, etc),
- Select the specific objects to be scripted,
- and finally specify where to output the script (choose Script to new Query Window for convenience).
- Once completed, return to the Query Window with the scripted objects. Change the USE directive (the first line) to point to the destination database (e.g., USE [Northwind]), and execute the script.