Compare Databases in SQL Server 2008 - database

I had to provide a web application creatde in ASP.net and C# to my client. After some time he wants to make changes in that product. I have to update in code and database. So please provide some idea or guidance that how to compare the database using SQL Server 2008.
Or can I do this with other software?
I have googled but I got not enough satisfaction. Thanks...

We use SQL Compare by Redgate.
It's very easy to use - it will show you the differences between two databases and allow you to select which objects you want to synchronise. A synchronisation script is then generated that you can run on the target database.
Easy peasy!

Related

Automated SQL Server slow query report?

I am a developer and performance tester but not a DBA. My team is working on a performance testing tool that is specific to our software. One of the features we want it to have is the ability to generate a database report immediately after the test. Our software is database agnostic. For Oracle, I can easily create a snapshot id before and after the test and programmatically create an AWR report for those snapshots, write to a file and save with other artifacts we gather. Works great.
For SQL Server, however, there is no AWR equivalent (that I know of). I know the MDW as part of the SSMS has a UI for getting things like top 10 slow SQL and things like that. But, I have not yet found a way to programmatically create and extract a SQL performance report (preferably similar to Oracle's AWR) for SQL Server.
I am even willing to create the report myself if I can find a way to extract the raw data.
Any ideas would be greatly appreciated because searching online is not getting me anywhere.
P.S. I'm trying to do this in Java, by the way, but will accept help in any language. Thanks again!
Good news! In SQL Server 2016, you can use Query Store. This is like your flight recorder blackbox.. finding long running queries and waits. Capture baseline built in to SQL Server. You can compare before and after hardware changes and/or upgrades on queries. Maybe this similar to Oracle AWR.
Only available SQL Server 2016 and up.

Software to migrate database changes using SQL "patch" files?

I have 2 MSSQL databases in 2 servers and I need to replicate amendments in schema and in particular tables. Most preferably I need SQL commands to do so. The system should be able to take a snapsnot of initial state of the database and later generate an SQL that would display the changes.
I need to record only particular tables changes in data and I also need to detect changes in table format (alterations of schema). It is desirable that manual adjustment of replication SQL would be possible (so only necessary changes are reflected, in case automated rules allow some unnecessary queries to end up in the patch.
Thanks !
Have a look at RedGate SQL Developer bundle. Unfortunately I'm not aware of any good open source tool for MS SQL Server.
I think that especially SQL Compare could be helpfull for you. If you are using Visual Studio Team Edition, you can have a look at the VS Database projects. I've heard that some teams are successfully using it for their database change management, but I never tried it myself.

SQL Server: pushing development to production?

I'm currently using SQL Server Management Studio.
I have a development database, and access to a live database.
I just want to able to migrate my development tables to the live server.
I'm consulting stack flow first, since I don't want to blow anything up.
If you know what tables you want to migrate and they don't yet exist on the prod server, it's as simple as scripting the table definition, then running the script on the server. If it's more complex than that, I would recommend any number of tools which compare database schemas and automatically generate scripts you can run on the destination server to add/alter/remove what you need. A good freeware one for simple jobs is DBComparer. It's pretty basic. An excellent commercial one are the Sql Tools by Red Gate
We are using SQL Examiner Suite for this, but there are a lot of similar tools.
This is worth a look at - I've used it before and it works well and is very easy: Microsoft SQL Server Database Publishing Wizard http://www.microsoft.com/downloads/en/details.aspx?FamilyId=56E5B1C5-BF17-42E0-A410-371A838E570A&displaylang=en

What is The Best Local DataBase Managment Software?

I Want Implement a Software by C#.net.I want Use a DataBase Manager Software like Access or SqlLite or etc.My Program Saved Many Data in Local Machine.
I Do Not Want Publish or Move Data to Other Pcs
What DataBase Manager Software Must be Choose?
Not Different DataBase is Free or have a price.
what is the Best DataBase Manager Software to Save many Data in Local Machine?
For sure you are looking for a free database so for that you can use many databases like mysql ,postgresql , and sql server msde or access
but we still have other scenario, if you are going to distribute this application to other pcs so you have to think about deployment and in this case you can eliminate the mysql , postgresql because they depend on servers but msde (it's also server ) is much easier and you can found alot of tutorials how to deploy it with your project
It depends on how much you are expert in database and for what reason you are using it? are you going to need complex queries or it just a storage place for the data ?
if it's complex query i will go for msde for sql server if it's only for saving information may be i will go for access or even xml
Well if you are developing in C# consider using the MSSql Compact Edition. This allows you to create a local database and use it much like SqlLight. However, the support is much better, especially when you using Visual Studio. There you can find it as LocalDatabase under Data when you adding a new item. (Not 100% sure whether it is present on all versions of VS though).
Firefox has an SQLite Manager add-on.
I think the best choice depends on your needs, for example if you must synchronize data with sql server for me the best choise was sql express.
I would vote for SQL Express. You get essentially a scaled down SQL Server that is capable of working with quite a bit of data. SQL Express plays well with Visual Studio and you will be able to take advantage of the System.Data.SqlClient and related namespaces which come with the .NET framework out of the box. They are also better than the Odbc namespaces. Finally, there is a LOT of online support for SQL Express and, as far as I know, SQL Express's flavor of SQL (T-SQL) is the same as that of SQL Server. So should you one day need the flexibility of running with either or (local database, or server database) you will have it. Also, SQL Express is fairly commonly used in the microsoft world so you should be able to find lots of examples, if need by.
TurboDB for .NET from dataweb is a good solution, if you want a powerful engine with stored procedures and professional support from the manufacturer:
http://www.dataweb.de/en/products/dotnet_database.html

How to automatically store data from Oracle in SQL Server (according to a schedule)

Hello,
I'm new here, so sorry, if my question is too basic. However, maybe you have some advice, example, links, which could help me... I'm trying to find something helpfull for few days, but no results as for now.
I'm working in a distributed environment. I have a Oracle server hundreds of miles away and a MS SQL server close to me. I'm writing a application using Visual Web Developer 2008 Express. I need some data from Oracle. It's not worth to query the Oracle server every time i need some data from it. I'd prefer to run some Oracle queries once each night and store results in some local (SQL Server) tables. I assume, I should run queries through standard windows scheduler (Windows Server 2008). I have the basic connectivity - I can open Oracle Database from local Visual Studio.
The questions are:
How to write a query/procedure/function that would get data from Oracle and put them into a SQL Server table (possibly recreated before each query run)?
How can I run such a query from command line (or in other way run from scheduler)
What naming conventions are applicable? In VS I use something like //IP.IP.IP.IP/Name and a user with password.
Thanks for any help or advice.
Regards,
Matteo
I suggest you speak to the DBA's of the Oracle and SQL Server databases, as there may be other considerations you need to bear in mind. (Data Integrity, Security, ownership etc.)
One route you could follow would be to implement DTS (For older databases) or SSIS (for new versions of SQL Server) processes to copy the data across on the schedule you want. (This is pretty much what they were built for.)
How much data are we talking about?
If there is a small quantity that you need to transfer every day, you can write a stupid fetch and insert script in language of your choice.
You only need to search for better solutions if "sync" would take too much resources.
Thanks...
I'm the DBA for the SQL Server, which will serve only for my application. For Oracle I just want to read data and I have enough privileges and agreement with DBA's. Security, ownership and integrity are not an issue for now. I just need some technical advise how to get data from Oracle to MSSQL tables on a schedule.
I use MS SQL Server 2008 Express SP1. I'm very close to solve my problem - I have established connections and everything installed and working. I just don't know, how to run a query, which would get data from Oracle and put into MSSQL, on regular basis, without manual interaction.
I've some experience in programming, but not much in databases (except creating complex SQl queries). Therefore some example or links to detailed description would be helpful. I'm not sure about naming conventions, differences between procedures, functions and queries, command line options to run db automation procedures and so on. I'm also not sure, about which mechanisms or technologies are available in MS SQL Server 2008 Express edition.

Resources