Compare the structure for 2 sql server databases
-
SQL Server allows you to query the schema of the database; Mika's first link explains that. I recently searched for open-source projects that accomplish this task and the best thing I found is this Codeproject-article: SQL Server Database Comparison Tool[^]. It appears to have some flaws because it didn't find the differences of two database-schemas I compared with it, but it contains all kinds of SQL-queries to query the database-schema which you could use as a starting point for your own solution.
-
Sorry friends. You wrote a lot's of replies here . But I'm not asking for someone to write my code. I need only some steps , with words , not with code. thank you !
-
Sorry friends. You wrote a lot's of replies here . But I'm not asking for someone to write my code. I need only some steps , with words , not with code. thank you !
dilkonika wrote:
I need only some steps , with words , not with code.
Then I must have misread. Looked to me like a post that contained the steps got the answer "how to do this with code in vb.net." Get some sleep and try again tomorrow. If any of the steps are too vague, simply ask for more explanation. FWIW, I'd start by Googleing for the SQL-command to use to restore a backup. After that, probably executing that as a NonQuery. Then, Googeling for "sys.objects", or how to get a list of all objects in Sql Server. If you Google hard enough you'll even find a copy of a poster that contains all the relations between those system tables :) Then I'd be making a list of all the objects in DB A, and probably store it in a new database (DB C). Then I'd be making a list of all the objects in DB B, and store that result as a table too. Then all that is left is comparing those two lists, and displaying the difference. I'd probably do that by trying to JOIN those lists, displaying the result in a datagridview.
Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)
-
dilkonika wrote:
I need only some steps , with words , not with code.
Then I must have misread. Looked to me like a post that contained the steps got the answer "how to do this with code in vb.net." Get some sleep and try again tomorrow. If any of the steps are too vague, simply ask for more explanation. FWIW, I'd start by Googleing for the SQL-command to use to restore a backup. After that, probably executing that as a NonQuery. Then, Googeling for "sys.objects", or how to get a list of all objects in Sql Server. If you Google hard enough you'll even find a copy of a poster that contains all the relations between those system tables :) Then I'd be making a list of all the objects in DB A, and probably store it in a new database (DB C). Then I'd be making a list of all the objects in DB B, and store that result as a table too. Then all that is left is comparing those two lists, and displaying the difference. I'd probably do that by trying to JOIN those lists, displaying the result in a datagridview.
Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)
-
sorry , but in my opinion you should not respond with " Googleing". If all the things are clear in google , then why you keep open this forum ?
dilkonika wrote:
If all the things are clear in google
Google is not "documentation", it is a search-machine. You can easily look up what the command is, or you buy a book with all the commands and go through the pages to find all switches.
dilkonika wrote:
then why you keep open this forum ?
I don't! I'm just someone who signed up here and became a member, just like you! There's no employees here that are paid to get you your answers, there's only passers-by that might just be friendly enough to help. If you want to know why, well, go ahead and read about it in the help-section. I'll gladly help with any question. Some basic pointers if required to get started, specific help with errors, I can do. Finding alternative solutions, sure. ..but you will have to write your own code, that is not our job :)
Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)
-
dilkonika wrote:
If all the things are clear in google
Google is not "documentation", it is a search-machine. You can easily look up what the command is, or you buy a book with all the commands and go through the pages to find all switches.
dilkonika wrote:
then why you keep open this forum ?
I don't! I'm just someone who signed up here and became a member, just like you! There's no employees here that are paid to get you your answers, there's only passers-by that might just be friendly enough to help. If you want to know why, well, go ahead and read about it in the help-section. I'll gladly help with any question. Some basic pointers if required to get started, specific help with errors, I can do. Finding alternative solutions, sure. ..but you will have to write your own code, that is not our job :)
Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)
And who ask to you to write my code ? I ask for steps. And a step is not " Go to goolge and search about this ....." when I know the steps , I have provided my code and asked for help. For example look at one of my recent question : http://www.codeproject.com/Messages/5036045/Make-all-the-controls-inside-a-Groupbox-unusable-w.aspx[^]
-
And who ask to you to write my code ? I ask for steps. And a step is not " Go to goolge and search about this ....." when I know the steps , I have provided my code and asked for help. For example look at one of my recent question : http://www.codeproject.com/Messages/5036045/Make-all-the-controls-inside-a-Groupbox-unusable-w.aspx[^]
dilkonika wrote:
And who ask to you to write my code ? I ask for steps. And a step is not " Go to goolge and search about this ....."
What is a step in your opinion?
dilkonika wrote:
For example look at one of my recent question
Looks a lot better than this one, don't it? :)
Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)
-
dilkonika wrote:
And who ask to you to write my code ? I ask for steps. And a step is not " Go to goolge and search about this ....."
What is a step in your opinion?
dilkonika wrote:
For example look at one of my recent question
Looks a lot better than this one, don't it? :)
Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)
If a have the problem " how can I add 2 numbers entered by user" The steps are : - read the first number using inputbox - make the same thing with other number - add 2 numbers. and if my recent question looks better , please respond to it because no one give a response. Because I think is a question given only by code , and not everyone understand.
-
If a have the problem " how can I add 2 numbers entered by user" The steps are : - read the first number using inputbox - make the same thing with other number - add 2 numbers. and if my recent question looks better , please respond to it because no one give a response. Because I think is a question given only by code , and not everyone understand.
If I had an answer to the other question, I would have posted it. Your first step; https://msdn.microsoft.com/en-us/library/ms186858.aspx[^]
Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)