![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have my live sql database on a remote isp server, which obviously i don't have access to the sa account. I can't use "copy database wizard" because of no access to sa account. My export from remote server to local fails on 2 tables because of relationships. Can someone give me some sample code or point me in direction to auto-generate code that could drop all relationships and then re-create them? I tried every possible option using import/export and managed to transfer all tables (except the 2 junction tables). Is there any way besides "Copy Database Wizard" to move all tables and relationships from a remote server to local? Thanks for any advice. |
#3
| |||
| |||
|
|
How about script them all out using SQLDMO and then reapply at your destination. You could then choose not to apply the relationships beforehand and import the data. After the data import you apply the constraints. You do not, I believe, need to be sa to use this task though. Plenty of people can get it to fail being sa :-) -- -- Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.SQLDTS.com - The site for all your DTS needs. www.konesans.com - Consultancy from the people who know "Scott" <sbailey (AT) mileslumber (DOT) com> wrote in message news:O0UEBwSlEHA.3912 (AT) TK2MSFTNGP12 (DOT) phx.gbl... I have my live sql database on a remote isp server, which obviously i don't have access to the sa account. I can't use "copy database wizard" because of no access to sa account. My export from remote server to local fails on 2 tables because of relationships. Can someone give me some sample code or point me in direction to auto-generate code that could drop all relationships and then re-create them? I tried every possible option using import/export and managed to transfer all tables (except the 2 junction tables). Is there any way besides "Copy Database Wizard" to move all tables and relationships from a remote server to local? Thanks for any advice. |
#4
| |||
| |||
|
|
where in the import wizard is there an option tonot apply relationships during transfer? "Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> wrote in message news:%23i8NLJWlEHA.3876 (AT) TK2MSFTNGP15 (DOT) phx.gbl... How about script them all out using SQLDMO and then reapply at your destination. You could then choose not to apply the relationships beforehand and import the data. After the data import you apply the constraints. You do not, I believe, need to be sa to use this task though. Plenty of people can get it to fail being sa :-) -- -- Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.SQLDTS.com - The site for all your DTS needs. www.konesans.com - Consultancy from the people who know "Scott" <sbailey (AT) mileslumber (DOT) com> wrote in message news:O0UEBwSlEHA.3912 (AT) TK2MSFTNGP12 (DOT) phx.gbl... I have my live sql database on a remote isp server, which obviously i don't have access to the sa account. I can't use "copy database wizard" because of no access to sa account. My export from remote server to local fails on 2 tables because of relationships. Can someone give me some sample code or point me in direction to auto-generate code that could drop all relationships and then re-create them? I tried every possible option using import/export and managed to transfer all tables (except the 2 junction tables). Is there any way besides "Copy Database Wizard" to move all tables and relationships from a remote server to local? Thanks for any advice. |
#5
| |||
| |||
|
|
Using the wizard hmmmmmmmmmmmmm, I don't use that. The task you are using in there is the Copy SQL Server objects task. At the bottom of the dialog you can choose to turn off a lot of stuff but I am not sure you can switch off applying the constraints which is why I again do not use this task either. I do not have enough control of what it is doing -- -- Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.SQLDTS.com - The site for all your DTS needs. www.konesans.com - Consultancy from the people who know "Scott" <sbailey (AT) mileslumber (DOT) com> wrote in message news:uoi8mAalEHA.2340 (AT) TK2MSFTNGP11 (DOT) phx.gbl... where in the import wizard is there an option tonot apply relationships during transfer? "Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> wrote in message news:%23i8NLJWlEHA.3876 (AT) TK2MSFTNGP15 (DOT) phx.gbl... How about script them all out using SQLDMO and then reapply at your destination. You could then choose not to apply the relationships beforehand and import the data. After the data import you apply the constraints. You do not, I believe, need to be sa to use this task though. Plenty of people can get it to fail being sa :-) -- -- Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.SQLDTS.com - The site for all your DTS needs. www.konesans.com - Consultancy from the people who know "Scott" <sbailey (AT) mileslumber (DOT) com> wrote in message news:O0UEBwSlEHA.3912 (AT) TK2MSFTNGP12 (DOT) phx.gbl... I have my live sql database on a remote isp server, which obviously i don't have access to the sa account. I can't use "copy database wizard" because of no access to sa account. My export from remote server to local fails on 2 tables because of relationships. Can someone give me some sample code or point me in direction to auto-generate code that could drop all relationships and then re-create them? I tried every possible option using import/export and managed to transfer all tables (except the 2 junction tables). Is there any way besides "Copy Database Wizard" to move all tables and relationships from a remote server to local? Thanks for any advice. |
![]() |
| Thread Tools | |
| Display Modes | |
| |