Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to move user define functions from SQL server 2000 to another

Status
Not open for further replies.

mmuzaffar

MIS
May 1, 2006
17
US
I need help as i want to move user define function from one SQL server 2000 (test box) to another (production) box
any help will be highly appreciated

Thanks

Khalid
 
Use enterprise manager.

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

Khalid
 
Yes, sorta.

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

K
 
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
 
>> it tried to drop the existing database

That's why I suggested you look through the script. I'm glad you got it sorted.

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top