|
|
|
|
||||||
| ms.sqlserver.setup Questions about SQL Server. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
I've never dealt with stored procedures much.. but i have a new database
created.. imported the tables, but the stored procedures didnt get copied over.. Is there an easy way to export them.. perhaps to a .sql file ... then import them or run a script on the other database.. I have never done much with the query window before, so i'm not sure how to handle this.. as there are around 20 stored procedures that need imported.. Thanks for any tips... |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
Did you just import tables? There may be another way but if you
backed up the old database, then restored it to the new one the sps would come with it. On Sun, 13 Apr 2008 19:13:00 -0700, markm75 <markm75@discussions.microsoft.com> wrote: >I've never dealt with stored procedures much.. but i have a new database >created.. imported the tables, but the stored procedures didnt get copied >over.. > >Is there an easy way to export them.. perhaps to a .sql file ... then import >them or run a script on the other database.. > >I have never done much with the query window before, so i'm not sure how to >handle this.. as there are around 20 stored procedures that need imported.. > >Thanks for any tips... > |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
"Brett I. Holcomb" wrote: > Did you just import tables? There may be another way but if you > backed up the old database, then restored it to the new one the sps > would come with it. > > On Sun, 13 Apr 2008 19:13:00 -0700, markm75 > <markm75@discussions.microsoft.com> wrote: > > >I've never dealt with stored procedures much.. but i have a new database > >created.. imported the tables, but the stored procedures didnt get copied > >over.. > > > >Is there an easy way to export them.. perhaps to a .sql file ... then import > >them or run a script on the other database.. > > > >I have never done much with the query window before, so i'm not sure how to > >handle this.. as there are around 20 stored procedures that need imported.. > > > >Thanks for any tips... > > > With the setup i'm dealing with.. i dont think its possible to "restore" dbs.. its through a web hosting service.. unfortunately. |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
Open SSMS and connect to your SQL Server instance where you develope your
Stored Procedures and then Open a New Query for your database in your hosting company. Find your Stored Procedures on your developement instance, right click on your SP and then from the popup menu, choose "Script Stored Procedure as" and then "Create to" and "Clipboard". Then, go to the Query window (that you opened for your remote instance) and then paste the SP and then run it. (You may need to change the Schema or something according to your application and environment) -- Ekrem Önsoy "markm75" <markm75@discussions.microsoft.com> wrote in message news:EAC8E1A4-57C3-4437-97B1-9D3724C05F19@microsoft.com... > > > "Brett I. Holcomb" wrote: > >> Did you just import tables? There may be another way but if you >> backed up the old database, then restored it to the new one the sps >> would come with it. >> >> On Sun, 13 Apr 2008 19:13:00 -0700, markm75 >> <markm75@discussions.microsoft.com> wrote: >> >> >I've never dealt with stored procedures much.. but i have a new database >> >created.. imported the tables, but the stored procedures didnt get >> >copied >> >over.. >> > >> >Is there an easy way to export them.. perhaps to a .sql file ... then >> >import >> >them or run a script on the other database.. >> > >> >I have never done much with the query window before, so i'm not sure how >> >to >> >handle this.. as there are around 20 stored procedures that need >> >imported.. >> > >> >Thanks for any tips... >> > >> > > With the setup i'm dealing with.. i dont think its possible to "restore" > dbs.. its through a web hosting service.. unfortunately. > > |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
"Ekrem Önsoy" wrote: > Open SSMS and connect to your SQL Server instance where you develope your > Stored Procedures and then Open a New Query for your database in your > hosting company. Find your Stored Procedures on your developement instance, > right click on your SP and then from the popup menu, choose "Script Stored > Procedure as" and then "Create to" and "Clipboard". Then, go to the Query > window (that you opened for your remote instance) and then paste the SP and > then run it. (You may need to change the Schema or something according to > your application and environment) > > -- > Ekrem Önsoy > > > > > "markm75" <markm75@discussions.microsoft.com> wrote in message > news:EAC8E1A4-57C3-4437-97B1-9D3724C05F19@microsoft.com... > > > > > > "Brett I. Holcomb" wrote: > > > >> Did you just import tables? There may be another way but if you > >> backed up the old database, then restored it to the new one the sps > >> would come with it. > >> > >> On Sun, 13 Apr 2008 19:13:00 -0700, markm75 > >> <markm75@discussions.microsoft.com> wrote: > >> > >> >I've never dealt with stored procedures much.. but i have a new database > >> >created.. imported the tables, but the stored procedures didnt get > >> >copied > >> >over.. > >> > > >> >Is there an easy way to export them.. perhaps to a .sql file ... then > >> >import > >> >them or run a script on the other database.. > >> > > >> >I have never done much with the query window before, so i'm not sure how > >> >to > >> >handle this.. as there are around 20 stored procedures that need > >> >imported.. > >> > > >> >Thanks for any tips... > >> > > >> > > > > With the setup i'm dealing with.. i dont think its possible to "restore" > > dbs.. its through a web hosting service.. unfortunately. > > > > > Thanks for the tip.. i actually tried this but it didnt quite work.. Just some more background maybe i should have included.. i think these missing stored procedures are related to the asp.net 2.0 provider features.. i think the db was originally sql 2000 (i cant recall where some of these came from: ie: sp's like dbo.aspnet_Membership_CreateUser or dbo.aspnet_CheckSchemaVersion; So in the dedicated server's sql 2005 db.. i created a new DB, migrated the tables over.. I tried doing the above steps but had an error on, for instance, the checkschemaversion one: Could not locate entry in sysdatabases for database 'TestDB'. No entry found with that name. Make sure that the name is entered correctly. I think a step may be missing or maybe i need to change the way i executed the query on the new DB. |
|
|
|
#6 |
|
Messages: n/a
Hébergeur: |
"Ekrem Önsoy" wrote: > Open SSMS and connect to your SQL Server instance where you develope your > Stored Procedures and then Open a New Query for your database in your > hosting company. Find your Stored Procedures on your developement instance, > right click on your SP and then from the popup menu, choose "Script Stored > Procedure as" and then "Create to" and "Clipboard". Then, go to the Query > window (that you opened for your remote instance) and then paste the SP and > then run it. (You may need to change the Schema or something according to > your application and environment) > > -- > Ekrem Önsoy > > > > > "markm75" <markm75@discussions.microsoft.com> wrote in message > news:EAC8E1A4-57C3-4437-97B1-9D3724C05F19@microsoft.com... > > > > > > "Brett I. Holcomb" wrote: > > > >> Did you just import tables? There may be another way but if you > >> backed up the old database, then restored it to the new one the sps > >> would come with it. > >> > >> On Sun, 13 Apr 2008 19:13:00 -0700, markm75 > >> <markm75@discussions.microsoft.com> wrote: > >> > >> >I've never dealt with stored procedures much.. but i have a new database > >> >created.. imported the tables, but the stored procedures didnt get > >> >copied > >> >over.. > >> > > >> >Is there an easy way to export them.. perhaps to a .sql file ... then > >> >import > >> >them or run a script on the other database.. > >> > > >> >I have never done much with the query window before, so i'm not sure how > >> >to > >> >handle this.. as there are around 20 stored procedures that need > >> >imported.. > >> > > >> >Thanks for any tips... > >> > > >> > > > > With the setup i'm dealing with.. i dont think its possible to "restore" > > dbs.. its through a web hosting service.. unfortunately. > > > > > Actually.. i take that back.. it did work.. i had that error.. but all the stored procedures were there.. thanks again for that tip! |
|
|
|
#7 |
|
Messages: n/a
Hébergeur: |
Probably that problematic SP contains some commands that related to TestDB
database and as it's not exist in your database which is at your hosting company' s server, the copied script does not work to create that SP in the remote server. Check your codes in that problematic SP and make sure you do not \ do have that database in the remove server. I'm glad things worked for ya! -- Ekrem Önsoy "markm75" <markm75@discussions.microsoft.com> wrote in message news:B89AA0A0-EEB6-4088-8961-473F0DAC4BA5@microsoft.com... > > > "Ekrem Önsoy" wrote: > >> Open SSMS and connect to your SQL Server instance where you develope your >> Stored Procedures and then Open a New Query for your database in your >> hosting company. Find your Stored Procedures on your developement >> instance, >> right click on your SP and then from the popup menu, choose "Script >> Stored >> Procedure as" and then "Create to" and "Clipboard". Then, go to the Query >> window (that you opened for your remote instance) and then paste the SP >> and >> then run it. (You may need to change the Schema or something according to >> your application and environment) >> >> -- >> Ekrem Önsoy >> >> >> >> >> "markm75" <markm75@discussions.microsoft.com> wrote in message >> news:EAC8E1A4-57C3-4437-97B1-9D3724C05F19@microsoft.com... >> > >> > >> > "Brett I. Holcomb" wrote: >> > >> >> Did you just import tables? There may be another way but if you >> >> backed up the old database, then restored it to the new one the sps >> >> would come with it. >> >> >> >> On Sun, 13 Apr 2008 19:13:00 -0700, markm75 >> >> <markm75@discussions.microsoft.com> wrote: >> >> >> >> >I've never dealt with stored procedures much.. but i have a new >> >> >database >> >> >created.. imported the tables, but the stored procedures didnt get >> >> >copied >> >> >over.. >> >> > >> >> >Is there an easy way to export them.. perhaps to a .sql file ... then >> >> >import >> >> >them or run a script on the other database.. >> >> > >> >> >I have never done much with the query window before, so i'm not sure >> >> >how >> >> >to >> >> >handle this.. as there are around 20 stored procedures that need >> >> >imported.. >> >> > >> >> >Thanks for any tips... >> >> > >> >> >> > >> > With the setup i'm dealing with.. i dont think its possible to >> > "restore" >> > dbs.. its through a web hosting service.. unfortunately. >> > >> > >> > > > Thanks for the tip.. i actually tried this but it didnt quite work.. > > > > Just some more background maybe i should have included.. i think these > missing stored procedures are related to the asp.net 2.0 provider > features.. > i think the db was originally sql 2000 (i cant recall where some of these > came from: ie: sp's like dbo.aspnet_Membership_CreateUser or > dbo.aspnet_CheckSchemaVersion; > > > > So in the dedicated server's sql 2005 db.. i created a new DB, migrated > the > tables over.. > > > > I tried doing the above steps but had an error on, for instance, the > checkschemaversion one: > > Could not locate entry in sysdatabases for database 'TestDB'. No entry > found > with that name. Make sure that the name is entered correctly. > > > > I think a step may be missing or maybe i need to change the way i executed > the query on the new DB. > |
|
![]() |
| Outils de la discussion | |
|
|