Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2003

    Unanswered: dbo schema added when i rename table

    i recorded a script for a change i need to make. actually 15 so far, i am getting ready to bring an access db with no pk or fk and only 1 relation over to ss05

    my scripts are used to add the need pk fk to the tables and then move the data from the temptbl to the new one

    1 thing i have been noticing is code like below will rename the table dbo.aMgmt.Employee and with that all the remaing lines of the script will fail.

    DROP TABLE aMgmt.Employee
    EXECUTE sp_rename N'dbo.Tmp_Employee', N'aMgmt.Employee', 'OBJECT'

    any help?

  2. #2
    Join Date
    Jun 2003
    Provided Answers: 1
    Unclear what is happening or what you are trying to do.

    What did you use to record the script? What was the original ownership on the tables? What were you logged in as when you scripted the objects?

    Who do you WANT to have ownership of the objects? I assume dbo...
    If it's not practically useful, then it's practically useless.

    blindman "sqlblindman"

  3. #3
    Join Date
    Mar 2003
    Reading, UK
    It may be becoz u r trying to copy/create the data using a dbo user.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts