Manage Azure SQL Databases - sql-server

For some reason the SQL Management Tool doesnt work with Azure SQL Databases. This is nothing short of painful if you use the designers and diagrams to design your database.
I'm sure I'm not the only one who has stumbled at this point and would like to know what tool I can use to visual design and maintain the database.

SQL Server Management Studio supports Azure SQL DB. Step-by-step docs are here: http://azure.microsoft.com/en-us/documentation/articles/sql-database-manage-azure-ssms/
You will have problems if you have not configured firewall rules for your database to include your client IP range. What sort of errors are you experiencing?

The latest update to SSMS supports full design and edit with a few minor things missing.

Related

What is the difference between DBMS and Database IDE?

I have been using Microsoft SQL Server 2017 for a while (just DDL and DML) and recently decided to install JetBrains DataGrip because I thought it was another DBMS but with dark theme.
When I try to create a new database it tells me to assign a host/user/password/port and I cannot do anything because it can't "connect to the database". I've been using Microsoft SQL Server Management Studio 2017 and never needed to assign a port/password/host or anything? I just created a new database and started adding/filling tables. How does JetBrains DataGrip work?
I noticed that on the JetBrains DataGrip page it doesn't say it's a DBMS, it says it's a "Database IDE". I cannot seem to find information about this on the web.
When considering a RDBMS such as SQL Server, the core component is a service/engine which acts as an interface between the database (files) and end users or applications allowing database functions to be carried out.
SSMS (SQL Server Management Studio) is just one of many possible end users of the SQL Server Database, and happens to have be part of the SQL Server software suite. It should not, however, be confused with the database itself as SQL Server operates perfectly happily without ever seeing SSMS.
Any form of user interface tool for a database needs to know how to connect to the database it is going to manage. In your case you most likely installed the entire software suite with default settings and as such didn't need to know what they were. JetBrains DataGrip however does need these settings.
You can find out what your specific settings are by running the SQL Server Configuration Manager.
JetBrains DataGrip is just a Database IDE to connect to different database engines via only one environment without needing to install management tools for every database that you want to work with.

Using Microsoft Sync Framework to synchronize two identical SQL Server 2012 databases using Change Tracking

I'm currently evaluating options for synchronizing two identical databases that will be deployed on two different SQL Server (1) instances. I've started with the Microsoft Sync Framework and if it does not fit my requirements I'll check SQL Replication.
Anyway, long story short, I'm trying to get a basic scenario to work using the Sync Framework but unfortunately all of the examples and tutorials I've seen online use the SQL Provisioning Provider which adds certain tables, stored procedures and triggers to the database - I want to avoid this, obviously.
I read somewhere that the Sync Framework can use SQL Server's built-in Change Tracking features, but this only works when the client is SQL CE (example). But all what I have read so far seems to be out-dated. I couldn't find anything that is relatively recent about the topic. So I was wondering whether the above is still valid or the Sync Framework added support for the built-in Change Tracking with SQL Server 2012 (or 2014).
In case this scenario is still not supported until this day, could someone refer me to an example (or at least some hints) of how I could develop a custom provider to use Change Tracking on both the client and the server?
(1) SQL Edition is not a constraint. Even SQL Server Enterprise Edition is an option.
support for SQL Change Tracking only works for the older SqlCeClientSyncProvider/DBSyncProvider/SyncAgent, in short you can only use to sync SQL Ce with a SQL Server configured for SQL CT.
the newer sync providers do not support SQL CT.
there used to be a sample SQLExpressClientSyncProvider from MS that has been pulled out from the download site due as it has some issues.
Writing a custom sync provider is not easy, if you can go for SQL Replication, that will be an easier route.

What to consider when getting started with SQL Server?

I've got experience with MySQL, DB2, and Oracle, but aside from writing a few queries, I've never used SQL Server.
My question is a three parter:
1) For a developer, what are some good "free" client tools to look at, and why (by "free" I mean open source, freeware, or the tools that come with SQL Server itself)?
2) I plan to run Developer or Express Edition on my workstation for development, and either Standard or Enterprise Edition in the testing and production environments. What methods exist if any for transferring data between different servers and the different editions?
3) Are there any common pitfalls that someone like me (who is used to the other database systems that I mentioned) might encountered during development?
TIA
SQL Server Express with tools.
All editions have the same SQL language features and code is 100% portable between them. There are 3rd party tools to synch changes, but moving entire DBs is easy using inbuilt tools.
Nah. The problem with databases is SQL and set theory, not the choice of RDBMS. If you understand databases/SQL you'll be OK.
SQL Server Management Studio which comes with SQL Server (any editions), or you can download it separately. SQL Server Profiler which doesn't come with Express.
Management studio has tools for backup/restore database. You can also consider detach/attach method to synchronize db .
It's hard to say. But if you had Mysql experience you will be pleasantly surprised by SQL Server.
UPDATE
There are so many things that each DB vendor implements differently that it's really hard to focus on some of them. One thing I was not used before is that SQL Server doesn't let unique columns to have more than 1 NULL value(there is a workaround though)

Is is possible to write MS SQL Server add-in?

Is is possible to write MS SQL Server add-in? I'm thinking of some application integrated with database server available form SQL Server Enterprise Manager.
Have you looked into using extended stored procedures to provide add-in like functionality?
The only hang up would be to see it in the Enterprise Manager, but you can probably use Martin's post as a way to do that.
http://support.microsoft.com/kb/190987
You might consider researching extended stored procedures. They are a way to integrated C++ logic into SQLServer. It appears that they are being phased out in favor of CLR integration but there might be some really good ideas to be found is seeing what people have done with them.
The one thing that always scared me off of extended stored procedures is that if your code crashed the entire database goes down. They run in the SQL Server process and there is limited protection.
MSDN link:
Database Engine Extended Stored Procedure Programming
I'm not sure if this is too late but here are some links that I've used to get started in writing SSMS plug-ins.
http://jcooney.net/archive/2007/11/26/55358.aspx
http://www.karpach.com/ViewArticle.aspx?ArticleFileName=SQL-Server-Managment-Studio-Object-Explorer-Search-Add-In.htm
http://sqlblogcasts.com/blogs/jonsayce/archive/2008/01/15/building-a-sql-server-management-studio-addin.aspx
http://aspalliance.com/1374_Extend_Functionality_in_SQL_Server_2005_Management_Studio_with_Addins.all
I hope this helps
You can include a lot into MS SQL server 2005 and 2008 database. Including .Net code.
But there is no real way to extend (create plugin for) the Management Studio. (Formerly Enterprise Manager.)
However there are database management addins for Visual Studio (especially in Team System). Maybe there you can implement what you need.
Nothing directly that I know of. In SQL Server Management Studio (for 2005 and later) at least there's a pretty simple system for adding external tools to the menu. Enterprise Manager probably has something similar. So you could build an application that does whatever you want and add it to your menu.
The trick is deployment. There's almost certainly a way to add your app to the menu as part of an install package, but I haven't had to mess with it myself. Additionally, it sounds like what you really want to do is have the system deployed into the database itsefl, and have Enterprise Manager automatically detect it. I'm pretty sure you can't do that.
SQL Server Enterprise Manager is just an instance of Microsoft Management Console. If you look at the shorcut its command line is this:
C:\WINDOWS\system32\mmc.exe /32 "C:\WINDOWS\system32\SQLServerManager.msc"
You should be able to create a new Snap In that sits beside SQL Server in the tree hierachy.
Take a look at http://msdn.microsoft.com/en-us/library/ms692755(VS.85).aspx to see how this is done.

Replicating between SQL Server 2005 and SQL Server Compact Edition

Can it be done and if so, how?
You can also check out Sync Services for Sql Server and Compact edition. The benefit of Sync Services is that you don't need a replication server or IIS and you can also sync between compact edition databases. This method involves writing a fair bit more code and is fairly involved, but I'd recommend looking into it as a lightweight service.
You can use Merge Replication. Theres a tutorial here SQL Server Compact 3.5 How-to Tutorials (Number 5).
Certainly replication is possible, as is Sync Services if you're not afraid to get your hands dirty. It depends on the details of what you need:
Sometimes-connected application wanting to have a read-only cache: Sync Services
Sometimes-connected application wanting to have part or full update ability: Sync Services
Remote site with multiple workstations needing read/write access to data: replication if you can get a secure network connection that's stable enough, otherwise look at extending Syn Services to work with SQL Express (or full SQL Server) based on the sample here: Sync using SQL Express
If you just want a SQL CE database and you're working with a SQL 2008 server then the wizard in Visual Studio 2008 SP1 will do all the work for you, you need only add 1 line of code to it if you want bi-directional support. If you can't upgrade then it will take more work with SQL 2005, and it's only reliable if you have at least SP2.
I'm in the middle of a project that requires multiple sites to have a sub-set of data in an environment where each site may lose it's connection to the head office at times, we've managed to get Sync Services to work with SQL 2008 at the head office and SQL Express 2008 at each site with full change tracking (2008 feature) and it's working great. It does require a reasonable amount of code (C# and SQL), so we've used some pretty smart templates to help. Be aware that.
Perhaps you could refine your question with more details?
Because of budget constraints I think it will have to beta-tester's approch,i tried following the guide and cant seem to get it working. Before I spend time getting it to work, I just confrim, Replicating between SqlServer 2005 and Compact Edition is something that can be done?
I just confrim, Replicating between
SqlServer 2005 and Compact Edition is
something that can be done?
Yes it can definately be done using either Merge Replication or Sync Services

Resources