Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Import/Export problem

Import/Export problem

Scheduled Pinned Locked Moved Database
helpdatabasesql-servercomsysadmin
6 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Shaun Wilde
    wrote on last edited by
    #1

    Hi all I am hoping someone here can help me. I am sufferering from the problem detailed in http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q325681[^]. However when I try to resolve it by using the first resolution I keep getting a failure with the message 'Failed to copy objects from Microsoft SQL Server to Microsoft SQL Server' and when I click on the error '[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name dbo.Locations' now Locations is a view - how can it be invalid? It works when I run it. Strange thing is even if I delete the view - it still complains about the same thing - now that is confusing. Please help.

    Stupidity dies. The end of future offspring. Evolution wins. - A Darwin Awards Haiku

    N 1 Reply Last reply
    0
    • S Shaun Wilde

      Hi all I am hoping someone here can help me. I am sufferering from the problem detailed in http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q325681[^]. However when I try to resolve it by using the first resolution I keep getting a failure with the message 'Failed to copy objects from Microsoft SQL Server to Microsoft SQL Server' and when I click on the error '[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name dbo.Locations' now Locations is a view - how can it be invalid? It works when I run it. Strange thing is even if I delete the view - it still complains about the same thing - now that is confusing. Please help.

      Stupidity dies. The end of future offspring. Evolution wins. - A Darwin Awards Haiku

      N Offline
      N Offline
      notadood
      wrote on last edited by
      #2

      Can you explain what you are trying to do? Maybe the view is based on tables that do not exist in the location you are trying to create the view in.

      S 1 Reply Last reply
      0
      • N notadood

        Can you explain what you are trying to do? Maybe the view is based on tables that do not exist in the location you are trying to create the view in.

        S Offline
        S Offline
        Shaun Wilde
        wrote on last edited by
        #3

        I am trying to export a database from X -> Y where Y has a collation set to 'server default' and had only just been created. I have tried it where the collation was the same - alas same error. I need to move the collation to be ther server default so that I can use it properly within Visual Studio.Net . Maybe I'll have to try move my database from X -> Y in another fashion and then copy the data - via scripts perhaps - how would I do that? Or maybe try moving the database a piece at a time eg tables then views then SPs - what do you think?

        Stupidity dies. The end of future offspring. Evolution wins. - A Darwin Awards Haiku

        N 1 Reply Last reply
        0
        • S Shaun Wilde

          I am trying to export a database from X -> Y where Y has a collation set to 'server default' and had only just been created. I have tried it where the collation was the same - alas same error. I need to move the collation to be ther server default so that I can use it properly within Visual Studio.Net . Maybe I'll have to try move my database from X -> Y in another fashion and then copy the data - via scripts perhaps - how would I do that? Or maybe try moving the database a piece at a time eg tables then views then SPs - what do you think?

          Stupidity dies. The end of future offspring. Evolution wins. - A Darwin Awards Haiku

          N Offline
          N Offline
          notadood
          wrote on last edited by
          #4

          Yes, I would just do it a bit at a time. Since you are having problems with the views do the tables and data first. Once they are there it is easy enough just to go back and script the views and procedures. Also see: http://www.microsoft.com/sql/techinfo/tips/administration/changingcodepage.asp

          S 2 Replies Last reply
          0
          • N notadood

            Yes, I would just do it a bit at a time. Since you are having problems with the views do the tables and data first. Once they are there it is easy enough just to go back and script the views and procedures. Also see: http://www.microsoft.com/sql/techinfo/tips/administration/changingcodepage.asp

            S Offline
            S Offline
            Shaun Wilde
            wrote on last edited by
            #5

            Thanks - I'll give it a go.

            Stupidity dies. The end of future offspring. Evolution wins. - A Darwin Awards Haiku

            1 Reply Last reply
            0
            • N notadood

              Yes, I would just do it a bit at a time. Since you are having problems with the views do the tables and data first. Once they are there it is easy enough just to go back and script the views and procedures. Also see: http://www.microsoft.com/sql/techinfo/tips/administration/changingcodepage.asp

              S Offline
              S Offline
              Shaun Wilde
              wrote on last edited by
              #6

              eventually finshed it - 6 hours later - thank god the database wasn't any bigger. I was the only developer (and the new boy) who really wanted to use VS.NET to see what was going on rather than keep switching between Enterprise Manager, Query Analyzer and Visual Studio. So it was down to me to do the update. I followed the steps in the KB article - but it never worked cleanly so.... steps to export + problems I found at each stage i) tables + defaults + rules + datatypes P1) When exporting tables any Foreign Keys that constrain on the same table (I hope you understand what I mean) failed - so I had to remove them for the export and then re-establish them after ii) views P2) Some of the views didn't work on the original database so I had to fix them first - I really hate some people. P3) Some of the views failed due to the collation still being different and on the old collation. I had to walk though every table and change any collation to 'server default'. Eventually I got the last few views to go through. iii) stored procedure + functions iv) copied the diagrams over by messing with the dtproperties table

              Stupidity dies. The end of future offspring. Evolution wins. - A Darwin Awards Haiku

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups