how to create backup for stored procedure,trigger and functions of a database in sql server 2008? I'm having 2 databases in 2 different servers(.246 and .252). I need to create backup for all stored procedures, triggers and function from 252 server and restore it in 246 server.database name in both server is transcredit. around 500SP are there in 252 server. can anyone help me?
I guess you have framed your question to somewhat misleading. 

You want to script out all stored procedures, triggers and functions from one server and create them on the new server.

Option 1 : USING SSMS







OPTION 2 : USING TSQL - sys.sql_modules with sys.objects