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. Schema update using SQL Server Data Tools

Schema update using SQL Server Data Tools

Scheduled Pinned Locked Moved Database
databasehelpquestionsql-serversysadmin
3 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.
  • I Offline
    I Offline
    indian143
    wrote on last edited by
    #1

    Hi All, I have two different databases on two different servers I compared the source database with destination database, there are few things like a Foreign key doesn't exist in the target database, a couple of columns are missing. Now after finding it, I want to update the schema from Source database to Destination database without losing the data on the target database. When I ran it, it is giving me error and saying Target database may loose data, can anybody please help me or point me, how can I achieve this? Any suggestion, link or code snippet can be very helpful. Thanks in advance.

    Thanks, Abdul Aleem "There is already enough hatred in the world lets spread love, compassion and affection."

    M 1 Reply Last reply
    0
    • I indian143

      Hi All, I have two different databases on two different servers I compared the source database with destination database, there are few things like a Foreign key doesn't exist in the target database, a couple of columns are missing. Now after finding it, I want to update the schema from Source database to Destination database without losing the data on the target database. When I ran it, it is giving me error and saying Target database may loose data, can anybody please help me or point me, how can I achieve this? Any suggestion, link or code snippet can be very helpful. Thanks in advance.

      Thanks, Abdul Aleem "There is already enough hatred in the world lets spread love, compassion and affection."

      M Offline
      M Offline
      Mycroft Holmes
      wrote on last edited by
      #2

      If you are changing column formats or shortening the length of a field you will often get this message. You need to asses whether the changes are actually going to impact your database eg shortening a varchar from 1000 to 500 is not relevant if the longest string is only 100 in length. Whereas changing a data format from decimal to int may make a critical difference!

      Never underestimate the power of human stupidity RAH

      I 1 Reply Last reply
      0
      • M Mycroft Holmes

        If you are changing column formats or shortening the length of a field you will often get this message. You need to asses whether the changes are actually going to impact your database eg shortening a varchar from 1000 to 500 is not relevant if the longest string is only 100 in length. Whereas changing a data format from decimal to int may make a critical difference!

        Never underestimate the power of human stupidity RAH

        I Offline
        I Offline
        indian143
        wrote on last edited by
        #3

        No I am just adding a Foreign key constraint still it errors it out, because in the new database we have added Foreign Key constraint that we want to sync it to the old database without losing the data. Another place it is erroring out is at a View which is referencing tables from other databases and other servers as well. Any idea how to resolve these things?

        Thanks, Abdul Aleem "There is already enough hatred in the world lets spread love, compassion and affection."

        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