Right click on database.
All Tasks -> Generate SQL Scripts
Under 'Objects to script', click the 'Show All' button.
Put a check mark in 'All user-defined functions'
Click the 'Preview' button.
A preview window will appear. click the 'copy' button. At this point, the script will exist in the clipboard. You can either attach to the other database with Query Analyzer or open Notepad and paste the text.
-George
Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
Thank you so much George, i copied the script should i paste it in the query Analyzer on the production box and execute it?
in that way they will be copied to new box ?
thanks for ur quick response
Since you are talking about a production box, I would make sure you eyeball the script to make sure it is doing what you expect it to.
The script will first delete the user defined functions and then create them. By creating the scripts on the production box, you will have effectively copied them from the other machine.
-George
Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
when i ran the copied script on the production database it tried to drop the existing database and tried to create a new one,
i just want to copy the user define fuctions from test box to production never did it before so thats why need help from you guys,
george if u are online please guide me lil bit more
thanks
Thanks Geroge it worked i just ignore the database creation portion of the script and the rest of the portion created the scripts fine on the production box
thanks alot for ur help
K
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.