dbTalk Databases Forums  

Error when copying all objects - Object already

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


Discuss Error when copying all objects - Object already in the microsoft.public.sqlserver.dts forum.



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

Default Error when copying all objects - Object already - 02-15-2005 , 01:33 PM






I am trying to write a very simple DTS package which copies all object from
one database to another existing database.

If the target DB is empty all works fine. However if the target DB already
has data I get the following error message:

[Microsoft][ODBC SQL Server Driver][SQL Server] There is already an object
named 'GETNEXTDOCUMENTGROUPID' in the database.

'GETNEXTDOCUMENTGROUPID' is a user defined function
ANyone know what I should do to avoid this issue?

Thanks,

Jonathan Orgel



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

Default Re: Error when copying all objects - Object already - 02-15-2005 , 01:43 PM






Have you chosen to remove the objects if they already exist first?

Tell you the truth if you want to move DB1 --> DB2 in nigh on its
entirety then look at BACKUP and RESTORE

Allan

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

Quote:
I am trying to write a very simple DTS package which copies all object
from
one database to another existing database.

If the target DB is empty all works fine. However if the target DB already

has data I get the following error message:

[Microsoft][ODBC SQL Server Driver][SQL Server] There is already an object

named 'GETNEXTDOCUMENTGROUPID' in the database.

'GETNEXTDOCUMENTGROUPID' is a user defined function
ANyone know what I should do to avoid this issue?

Thanks,

Jonathan Orgel


Reply With Quote
  #3  
Old   
Jonathan Orgel
 
Posts: n/a

Default Re: Error when copying all objects - Object already - 02-15-2005 , 01:53 PM



Good points.
- yes I already had the "Drop destination objects first checked"
- I want to do this from within a program. it is very easy to call a dts
package from a program

It seems to be that the problem is related to the owner of the objects. In
the source db the objects are owned by dbo. The copied database changes the
owener to xxx (which has dbo rights). subsequent transfers fail on objects
owned by xxxx

Thanks for your response,

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

Quote:
Have you chosen to remove the objects if they already exist first?

Tell you the truth if you want to move DB1 --> DB2 in nigh on its entirety
then look at BACKUP and RESTORE

Allan

"Jonathan Orgel" <Jonathan (AT) srssoft (DOT) com> wrote in message
news:Jonathan (AT) srssoft (DOT) com:
I am trying to write a very simple DTS package which copies all object
from
one database to another existing database.

If the target DB is empty all works fine. However if the target DB
already

has data I get the following error message:

[Microsoft][ODBC SQL Server Driver][SQL Server] There is already an
object

named 'GETNEXTDOCUMENTGROUPID' in the database.

'GETNEXTDOCUMENTGROUPID' is a user defined function
ANyone know what I should do to avoid this issue?

Thanks,

Jonathan Orgel




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.