May 12, 2012 at 5:08 am
My DB is on 2005, now i wanna move it to new server that is Sql Server 2008.
I have imported Tables & views from old to new server.
how to import Stored Procedures of Server 2005 to 2008?
Please help.
Thanks.
May 12, 2012 at 6:35 am
ßhavin (5/12/2012)
My DB is on 2005, now i wanna move it to new server that is Sql Server 2008.I have imported Tables & views from old to new server.
how to import Stored Procedures of Server 2005 to 2008?
Please help.
Thanks.
You don't really need to follow this approach to upgrade your database to SQL Server 2008.
1. Just take the backup of the database on SQL Server 2005 & restore it on SQL Server 2008.
2. Once restoration part is done, change the compatibility level of the database to 100.
Its done!
PS: By the way, we can't import/export stored procedures or views etc. If you need to create same stored procedures, views & functions on other server then you need to generate scripts for them & then just run the scripts on other server.
May 15, 2012 at 2:27 am
An here's how that's done.:-)
Right click SP -> Script Stored Procedure as -> Create to -> New Query Editor Window
May 15, 2012 at 5:44 am
kwe477 (5/15/2012)
An here's how that's done.:-)Right click SP -> Script Stored Procedure as -> Create to -> New Query Editor Window
This way you will be able to script only one stored procedure at a time. Suppose you have more than 300 stored procedures in your database, then following above method will be a very tough task, isn't it 😉 ?
Rather, you should generate script as following:
1. Right click on your database
2. Go to Tasks menu
3. Choose Generate Scripts
A Generate Scripts wizard will open, where you can select all tables , views, stored procedures functions at once & the script will be generated in one go.
May 16, 2012 at 7:04 am
Also, don't forget to use the sp_help_revlogin stored procedure (can find it on the web) to move the affected logins if they are not already moved. This SP moves the SIDs (security identities) and passwords. The SID value has to match so that the permissions remain with the right login.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply