dbTalk Databases Forums  

Copy SQL Server Objects Fails for certain views

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Copy SQL Server Objects Fails for certain views in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Jonathan Orgel
 
Posts: n/a

Default Copy SQL Server Objects Fails for certain views - 12-29-2005 , 11:05 AM






We have been using the 'Copy SQL Server Objects' with success for some time
to copy an entire database to another server. Recent changes to our database
infrastructure cause DTS to fail:
1) We have a check constraint which uses a user function (which refers to
the table on the check constraint
2) We have a view which refers to another view

DTS fails on both. DTS fails on the check constraint and stops. if I remove
the check constraint it will fail on the view. See errors below.

Any hints how to solve this would be appreciated.

Jonathan Orgel

Errors:
[Microsoft][ODBC SQL Server Driver][SQL Server] Invalid object name
'dbo.SRS_NumberRWSubjects'

[Microsoft][ODBC SQL Server Driver][SQL Server] Invalid object name
'VMSGRECIPIENTS2'




Reply With Quote
  #2  
Old   
Michael Hotek
 
Posts: n/a

Default Re: Copy SQL Server Objects Fails for certain views - 12-29-2005 , 06:47 PM






Redefine the package. Copy objects just uses an alphabetical order. If you
define this to explicitly define which objects are moving, you can specify
the order which will move the dependent objects first.

--
Mike
Mentor
Solid Quality Learning
http://www.solidqualitylearning.com


"Jonathan Orgel" <Jonathan (AT) srssoft (DOT) com> wrote

Quote:
We have been using the 'Copy SQL Server Objects' with success for some
time to copy an entire database to another server. Recent changes to our
database infrastructure cause DTS to fail:
1) We have a check constraint which uses a user function (which refers to
the table on the check constraint
2) We have a view which refers to another view

DTS fails on both. DTS fails on the check constraint and stops. if I
remove the check constraint it will fail on the view. See errors below.

Any hints how to solve this would be appreciated.

Jonathan Orgel

Errors:
[Microsoft][ODBC SQL Server Driver][SQL Server] Invalid object name
'dbo.SRS_NumberRWSubjects'

[Microsoft][ODBC SQL Server Driver][SQL Server] Invalid object name
'VMSGRECIPIENTS2'






Reply With Quote
  #3  
Old   
Joseph Geretz
 
Posts: n/a

Default Re: Copy SQL Server Objects Fails for certain views - 12-30-2005 , 08:43 AM



Quote:
Redefine the package. Copy objects just uses an alphabetical order. If
you define this to explicitly define which objects are moving,
Easier said than done. Our database is a constantly evolving conglomeration
of hundreds of objects. We don't relish having to constantly evolve the DTS
package as well. That's why we are using the more generic transfer
methodology to transfer the entire database, rather than identifying each
object specifically.

Also, it does not seem that objects are copied in alphabetic order, it seems
to have more to do with creation / last modification date. By making an
innocuous change to the object we are now able to complete the transfer. We
did not rename the object, yet we managed to change its transfer sequence.

Nice going Jonathan! :-)

- Joe Geretz -

"Michael Hotek" <mike (AT) solidqualitylearning (DOT) com> wrote

Quote:
Redefine the package. Copy objects just uses an alphabetical order. If
you define this to explicitly define which objects are moving, you can
specify the order which will move the dependent objects first.

--
Mike
Mentor
Solid Quality Learning
http://www.solidqualitylearning.com


"Jonathan Orgel" <Jonathan (AT) srssoft (DOT) com> wrote in message
news:ee1MIoJDGHA.3920 (AT) tk2msftngp13 (DOT) phx.gbl...
We have been using the 'Copy SQL Server Objects' with success for some
time to copy an entire database to another server. Recent changes to our
database infrastructure cause DTS to fail:
1) We have a check constraint which uses a user function (which refers to
the table on the check constraint
2) We have a view which refers to another view

DTS fails on both. DTS fails on the check constraint and stops. if I
remove the check constraint it will fail on the view. See errors below.

Any hints how to solve this would be appreciated.

Jonathan Orgel

Errors:
[Microsoft][ODBC SQL Server Driver][SQL Server] Invalid object name
'dbo.SRS_NumberRWSubjects'

[Microsoft][ODBC SQL Server Driver][SQL Server] Invalid object name
'VMSGRECIPIENTS2'








Reply With Quote
  #4  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Copy SQL Server Objects Fails for certain views - 01-03-2006 , 04:20 PM



Hello Joseph,

I cannot help but think that if you are using the Transfer Objects task to
move a whole DB everytime that it will be a lot slower and error prone than
a simple BACKUP/RESTORE.

You can then run scripts on the restored database to add/remove users/logins
etc if you need to

Is this an option?


Allan

Quote:
Redefine the package. Copy objects just uses an alphabetical order.
If you define this to explicitly define which objects are moving,

Easier said than done. Our database is a constantly evolving
conglomeration of hundreds of objects. We don't relish having to
constantly evolve the DTS package as well. That's why we are using the
more generic transfer methodology to transfer the entire database,
rather than identifying each object specifically.

Also, it does not seem that objects are copied in alphabetic order, it
seems to have more to do with creation / last modification date. By
making an innocuous change to the object we are now able to complete
the transfer. We did not rename the object, yet we managed to change
its transfer sequence.

Nice going Jonathan! :-)

- Joe Geretz -

"Michael Hotek" <mike (AT) solidqualitylearning (DOT) com> wrote in message
news:OJOVDuNDGHA.3876 (AT) tk2msftngp13 (DOT) phx.gbl...

Redefine the package. Copy objects just uses an alphabetical order.
If you define this to explicitly define which objects are moving, you
can specify the order which will move the dependent objects first.

--
Mike
Mentor
Solid Quality Learning
http://www.solidqualitylearning.com
"Jonathan Orgel" <Jonathan (AT) srssoft (DOT) com> wrote in message
news:ee1MIoJDGHA.3920 (AT) tk2msftngp13 (DOT) phx.gbl...

We have been using the 'Copy SQL Server Objects' with success for
some
time to copy an entire database to another server. Recent changes to
our
database infrastructure cause DTS to fail:
1) We have a check constraint which uses a user function (which
refers to
the table on the check constraint
2) We have a view which refers to another view
DTS fails on both. DTS fails on the check constraint and stops. if I
remove the check constraint it will fail on the view. See errors
below.

Any hints how to solve this would be appreciated.

Jonathan Orgel

Errors:
[Microsoft][ODBC SQL Server Driver][SQL Server] Invalid object name
'dbo.SRS_NumberRWSubjects'
[Microsoft][ODBC SQL Server Driver][SQL Server] Invalid object name
'VMSGRECIPIENTS2'




Reply With Quote
  #5  
Old   
Joseph Geretz
 
Posts: n/a

Default Re: Copy SQL Server Objects Fails for certain views - 01-03-2006 , 09:28 PM



Hi Allan,

Quote:
I cannot help but think that if you are using the Transfer Objects task to
move a whole DB everytime that it will be a lot slower and error prone
than a simple BACKUP/RESTORE.
You're definitely on target as far as reliability is concerned. However, to
make this work for us in our application context we'd need to make
Backup/Restore as transparent to the customer as our DTS package currently
is. Our customers don't typically know a database from a monkey wrench. The
advantage to DTS is we set it up for them and it just runs (well, usually
:-) for them silently in the background. It seems to me that logistically,
Backup / Restore might be a bit more difficult to set up in this manner, but
if you have any suggestion on how to do this, I'm eager to hear.

Thanks!

- Joe Geretz -

"Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> wrote

Quote:
Hello Joseph,

I cannot help but think that if you are using the Transfer Objects task to
move a whole DB everytime that it will be a lot slower and error prone
than a simple BACKUP/RESTORE.

You can then run scripts on the restored database to add/remove
users/logins etc if you need to

Is this an option?


Allan

Redefine the package. Copy objects just uses an alphabetical order.
If you define this to explicitly define which objects are moving,

Easier said than done. Our database is a constantly evolving
conglomeration of hundreds of objects. We don't relish having to
constantly evolve the DTS package as well. That's why we are using the
more generic transfer methodology to transfer the entire database,
rather than identifying each object specifically.

Also, it does not seem that objects are copied in alphabetic order, it
seems to have more to do with creation / last modification date. By
making an innocuous change to the object we are now able to complete
the transfer. We did not rename the object, yet we managed to change
its transfer sequence.

Nice going Jonathan! :-)

- Joe Geretz -

"Michael Hotek" <mike (AT) solidqualitylearning (DOT) com> wrote in message
news:OJOVDuNDGHA.3876 (AT) tk2msftngp13 (DOT) phx.gbl...

Redefine the package. Copy objects just uses an alphabetical order.
If you define this to explicitly define which objects are moving, you
can specify the order which will move the dependent objects first.

--
Mike
Mentor
Solid Quality Learning
http://www.solidqualitylearning.com
"Jonathan Orgel" <Jonathan (AT) srssoft (DOT) com> wrote in message
news:ee1MIoJDGHA.3920 (AT) tk2msftngp13 (DOT) phx.gbl...

We have been using the 'Copy SQL Server Objects' with success for
some
time to copy an entire database to another server. Recent changes to
our
database infrastructure cause DTS to fail:
1) We have a check constraint which uses a user function (which
refers to
the table on the check constraint
2) We have a view which refers to another view
DTS fails on both. DTS fails on the check constraint and stops. if I
remove the check constraint it will fail on the view. See errors
below.

Any hints how to solve this would be appreciated.

Jonathan Orgel

Errors:
[Microsoft][ODBC SQL Server Driver][SQL Server] Invalid object name
'dbo.SRS_NumberRWSubjects'
[Microsoft][ODBC SQL Server Driver][SQL Server] Invalid object name
'VMSGRECIPIENTS2'






Reply With Quote
  #6  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Copy SQL Server Objects Fails for certain views - 01-04-2006 , 12:25 AM



Hello Joseph,

You can still script the whole process and you could even put the steps into
a DTS package if it helps to visualise the process. I would also look at
sp_attach_db and sp_detach_db

Allan



Quote:
Hi Allan,

I cannot help but think that if you are using the Transfer Objects
task to move a whole DB everytime that it will be a lot slower and
error prone than a simple BACKUP/RESTORE.

You're definitely on target as far as reliability is concerned.
However, to make this work for us in our application context we'd need
to make Backup/Restore as transparent to the customer as our DTS
package currently is. Our customers don't typically know a database
from a monkey wrench. The advantage to DTS is we set it up for them
and it just runs (well, usually :-) for them silently in the
background. It seems to me that logistically, Backup / Restore might
be a bit more difficult to set up in this manner, but if you have any
suggestion on how to do this, I'm eager to hear.

Thanks!

- Joe Geretz -

"Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> wrote in message
news:d4c9a65237e998c7decb051d4258 (AT) msnews (DOT) microsoft.com...

Hello Joseph,

I cannot help but think that if you are using the Transfer Objects
task to move a whole DB everytime that it will be a lot slower and
error prone than a simple BACKUP/RESTORE.

You can then run scripts on the restored database to add/remove
users/logins etc if you need to

Is this an option?

Allan

Redefine the package. Copy objects just uses an alphabetical
order. If you define this to explicitly define which objects are
moving,

Easier said than done. Our database is a constantly evolving
conglomeration of hundreds of objects. We don't relish having to
constantly evolve the DTS package as well. That's why we are using
the more generic transfer methodology to transfer the entire
database, rather than identifying each object specifically.

Also, it does not seem that objects are copied in alphabetic order,
it seems to have more to do with creation / last modification date.
By making an innocuous change to the object we are now able to
complete the transfer. We did not rename the object, yet we managed
to change its transfer sequence.

Nice going Jonathan! :-)

- Joe Geretz -

"Michael Hotek" <mike (AT) solidqualitylearning (DOT) com> wrote in message
news:OJOVDuNDGHA.3876 (AT) tk2msftngp13 (DOT) phx.gbl...

Redefine the package. Copy objects just uses an alphabetical
order. If you define this to explicitly define which objects are
moving, you can specify the order which will move the dependent
objects first.

--
Mike
Mentor
Solid Quality Learning
http://www.solidqualitylearning.com
"Jonathan Orgel" <Jonathan (AT) srssoft (DOT) com> wrote in message
news:ee1MIoJDGHA.3920 (AT) tk2msftngp13 (DOT) phx.gbl...
We have been using the 'Copy SQL Server Objects' with success for
some
time to copy an entire database to another server. Recent changes
to
our
database infrastructure cause DTS to fail:
1) We have a check constraint which uses a user function (which
refers to
the table on the check constraint
2) We have a view which refers to another view
DTS fails on both. DTS fails on the check constraint and stops. if
I
remove the check constraint it will fail on the view. See errors
below.
Any hints how to solve this would be appreciated.

Jonathan Orgel

Errors:
[Microsoft][ODBC SQL Server Driver][SQL Server] Invalid object
name
'dbo.SRS_NumberRWSubjects'
[Microsoft][ODBC SQL Server Driver][SQL Server] Invalid object
name
'VMSGRECIPIENTS2'



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.