Home All Groups Group Topic Archive Search About

Copy Stored Procedures from one server to another

Author
2 Oct 2006 10:29 PM
Michael D. Ober
I am moving a database from SQL Server 2005 to SQL Server 2005 Express
running on a laptop for a demo.  I have the database tables and data copied,
but am unable to copy the stored procedures.  How do I do this?

Thanks,
Mike Ober.

Author
2 Oct 2006 10:46 PM
Robbe Morris [C# MVP]
You can either use dts and the copy objects or use
a script like this:

generate script for stored procedures in dependency order

http://www.eggheadcafe.com/articles/20030609.asp

--
Robbe Morris - 2004-2006 Microsoft MVP C#
I've mapped the database to .NET class properties and methods to
implement an multi-layered object oriented environment for your
data access layer.  Thus, you should rarely ever have to type the words
SqlCommand, SqlDataAdapter, or SqlConnection again.
http://www.eggheadcafe.com/articles/adonet_source_code_generator.asp





Show quote
"Michael D. Ober" <ober***@.alum.mit.edu.nospam> wrote in message
news:uLhtJJn5GHA.3808@TK2MSFTNGP06.phx.gbl...
>I am moving a database from SQL Server 2005 to SQL Server 2005 Express
>running on a laptop for a demo.  I have the database tables and data
>copied, but am unable to copy the stored procedures.  How do I do this?
>
> Thanks,
> Mike Ober.
>
>
Author
3 Oct 2006 8:23 PM
Michael D. Ober
Robbe,

Thanks for the link to the adonet source code generator.

Mike Ober.

Show quote
"Robbe Morris [C# MVP]" <joeb***@joe.com> wrote in message
news:%23Ay1FQn5GHA.2292@TK2MSFTNGP04.phx.gbl...
> You can either use dts and the copy objects or use
> a script like this:
>
> generate script for stored procedures in dependency order
>
> http://www.eggheadcafe.com/articles/20030609.asp
>
> --
> Robbe Morris - 2004-2006 Microsoft MVP C#
> I've mapped the database to .NET class properties and methods to
> implement an multi-layered object oriented environment for your
> data access layer.  Thus, you should rarely ever have to type the words
> SqlCommand, SqlDataAdapter, or SqlConnection again.
> http://www.eggheadcafe.com/articles/adonet_source_code_generator.asp
>
>
>
>
>
> "Michael D. Ober" <ober***@.alum.mit.edu.nospam> wrote in message
> news:uLhtJJn5GHA.3808@TK2MSFTNGP06.phx.gbl...
>>I am moving a database from SQL Server 2005 to SQL Server 2005 Express
>>running on a laptop for a demo.  I have the database tables and data
>>copied, but am unable to copy the stored procedures.  How do I do this?
>>
>> Thanks,
>> Mike Ober.
>>
>>
>
>
Author
2 Oct 2006 11:42 PM
Roger Wolter[MSFT]
The fastest way would be to detach the database copy the mdf and ldf files
to the laptop and attach them there.

--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Show quote
"Michael D. Ober" <ober***@.alum.mit.edu.nospam> wrote in message
news:uLhtJJn5GHA.3808@TK2MSFTNGP06.phx.gbl...
>I am moving a database from SQL Server 2005 to SQL Server 2005 Express
>running on a laptop for a demo.  I have the database tables and data
>copied, but am unable to copy the stored procedures.  How do I do this?
>
> Thanks,
> Mike Ober.
>
>
Author
3 Oct 2006 8:22 PM
Michael D. Ober
That worked - I had to delete and recreate the service account on the
laptop, but that wasn't a big deal.

Thanks,
Mike.

Show quote
"Roger Wolter[MSFT]" <rwol***@online.microsoft.com> wrote in message
news:%23CJI9xn5GHA.2524@TK2MSFTNGP06.phx.gbl...
> The fastest way would be to detach the database copy the mdf and ldf files
> to the laptop and attach them there.
>
> --
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
>
> "Michael D. Ober" <ober***@.alum.mit.edu.nospam> wrote in message
> news:uLhtJJn5GHA.3808@TK2MSFTNGP06.phx.gbl...
>>I am moving a database from SQL Server 2005 to SQL Server 2005 Express
>>running on a laptop for a demo.  I have the database tables and data
>>copied, but am unable to copy the stored procedures.  How do I do this?
>>
>> Thanks,
>> Mike Ober.
>>
>>
>
>
Author
3 Oct 2006 1:40 AM
Hari Prasad
Hi,

Take a look into the below URL; this talks about lots of options.

http://www.karaszi.com/SQLServer/info_generate_script.asp

Thanks
Hari


Show quote
"Michael D. Ober" <ober***@.alum.mit.edu.nospam> wrote in message
news:uLhtJJn5GHA.3808@TK2MSFTNGP06.phx.gbl...
>I am moving a database from SQL Server 2005 to SQL Server 2005 Express
>running on a laptop for a demo.  I have the database tables and data
>copied, but am unable to copy the stored procedures.  How do I do this?
>
> Thanks,
> Mike Ober.
>
>
Author
3 Oct 2006 6:33 AM
master_programmer
Hi

Open them in enterprise manager then "cut and paste" them to notepad
files.

Hope this helps
The Grand Master Programmer

Hari Prasad wrote:
Show quote
> Hi,
>
> Take a look into the below URL; this talks about lots of options.
>
> http://www.karaszi.com/SQLServer/info_generate_script.asp
>
> Thanks
> Hari
>
>
> "Michael D. Ober" <ober***@.alum.mit.edu.nospam> wrote in message
> news:uLhtJJn5GHA.3808@TK2MSFTNGP06.phx.gbl...
> >I am moving a database from SQL Server 2005 to SQL Server 2005 Express
> >running on a laptop for a demo.  I have the database tables and data
> >copied, but am unable to copy the stored procedures.  How do I do this?
> >
> > Thanks,
> > Mike Ober.
> >
> >

AddThis Social Bookmark Button