sql azure management portal adding keys - azure

We migrated our mysql database onto sql azure. Logged in to the sql azure management portal. I can see the tables and add columns etc but was not able to figure out how to view existing foreign key constraints on a field (or a way to add foreign key constraints using the UI).
Just curious as to whether this is supported in the UI? Or should we install SQL Server Management studio?

Unfortunately you can't see constraints or relationships using the SQL Azure Management Portal. I suggest you use SQL Server Management Studio 2008 R2. The express edition works fine:
http://www.microsoft.com/download/en/details.aspx?id=7593
However, even using Management Studio you don't get the full designer support, but you can at least see the foreign keys.

Related

I can't manage a server in SQL Azure

I have two servers in my SQL azure Portal. One of them allow me "manage", so I can login and manage my database. However, in the other one the button "manage" don't display. In this server just two options are displayed.
What can I do?
I hypothesize that one server is of version v11 and the other is v12.
Clicking the ‘Manage’ button in Azure Management portal launches the SQL Azure Management (SilverLight) Portal in a new tab in the browser. At this time, we do not plan to support this SilverLight-based SQL Azure Management Portal with V12 databases and servers.
We are working hard on an HTML-based T-SQL editor experience that will deeply integrate with the preview Azure Management Portal. Until then, we encourage customers to use Visual Studio Community 2013 which is a full-featured free version of Visual Studio 2013 to connect to Azure SQL databases for tasks such as running T-SQL, designing schema and for offline and online database development.
You can click the the ‘Open in Visual Studio’ in the database page in the Azure Management portal to launch VS2013 on your computer and easily connect to your SQL Database.
In addition, you can also use SQL Server Management Studio 2014 with CU6 to connect to Azure SQL Database. More details are on this blog post.

How to create tables in windows azure?

I am new to windows azure.Can anyone please tell me the process of creating database and tables in windows azure and how to connect to that connection to application .we have windows azure account .please clarify my doubts.any of pdf books for deploying the rest wcf services in cloud let me know the links.
Thanks,
It is May 2014 and that Silverlight online tool just is not really much better.
Best approach is to use SSMS (SQL Server Management Studio) you can even use the free tools tool.
Connect to your Azure with the portal supplied server url / port ... and then your username /password.
Say you scripted out an existing database tables and want to execute that script, you have much more freedom and control with SSMS than online.
For table creation note that a few caveats, One that is common is that not all of T-SQL is supported and a typical script from another database table(s) you end up needed to strip off the two "ON [PRIMARY]" parts of the create statement
Click on the database server in the management portal. 1st thing you would do is manage the allowed IP Addresses which can access this server/database. Allow your local IP address there. After that you have 2 choices:
Use Sql Server Management Studio - It does not have the table editor and you would need to write T-SQL scripts manually.
Use Silverlight based database management utility - to access this, click on the Manage Url link as shown in the screenshot below.
Since you cannot have wizards for Adding/Editing tables, constraints or keys for Azure DB, even if you have connected it through MS SQL Server Management Studio, you can use RazorSQL for this purpose. It gives you a feeling like you are playing with your azure DB in management studio, same as you do with your normal DBs

Azure Table Designer

I have an Azure test site and I'm attempting to hook it up to an Azure SQL database. I used the Azure portal to create a new database. Since the database was successfully created, I then opened SSMS 2012 and connected to the server and database. I expected to be able to create new tables, etc. through SSMS using the standard Create Table GUI (the one that lets you enter the column name, Identity, data type, etc. in grid format), but SSMS 2012 doesn't seem to have a table design window. Am I missing something? Is there an OOB release for this? I'm running VS 2012 Ultimate, SSMS 2012 and I already have the VS2012 Azure SDK.
Why not use the online portal? The same portal you used to create the database allows you to build tables using a grid format as you are describing. Just click on the Design button at the bottom left, then click on New Table at the bottom and off you go. You can also create indexes, foreign keys and so forth.
I think you should have a look on the SQL Server Data Tool (SSDT) which should be includes in SQL Server 2012. Not sure if it's included in Express but once you installed SQL 2012 you will find a new window in Visual Studio 2012 where you can design your Azure SQL Database in GUI.
I have a blog about this feature but I think it became more simple to install and use.
http://blogs.shaunxu.me/archive/2012/04/28/ssdt-ndash-makes-sql-azure-development-easy.aspx

How to add SQL DB tables to Azure?

I have signed up for Azure, created a SQL Server item, but cannot see how to, from there, create a DB (create and design the tables, IOW the DDL part of things). Is this something I need to do with the SQL Design Tools, and then export this from Visual Studio / import into the Azure account? Or how is it done?
If you don't want to use the SSMS as other have suggested you can use the silverlight management tool online to execute TSQL Commands; the upside of this is that you have designer support which SSMS lacks.
Once you have selected your DB in the Azure portal click the manage button:
From there a new window will open where you will have to log into the SQL Server.
Once you have logged into your SQL Server you will have the option to create new tables, create procedures etc.
One handy hint, if you go into your SQL Azure details screen you will notice a section to retrieve connection string snippets that may come in handy hooking up your back-end to your application:
You can install SQL Server Management Studio to connect with your SQL Azure database, and from there you can create tables in the designer, or by entering SQL queries.
Keep in mind that you have to whitelist your IP address in order to access the database. Azure uses whitelisting, meaning that only authorized IP addresses can connect to the database.
You can connect to your database in Azure through Visual Studio and/or SQL Server Management Studio (SSMS).
Check this link for details.
SQL Azure Management

How to restore my Local database to Windows Azure Database?

I have uploaded my application to Windows Azure Now I want to store My Local database to Windows Azure Database.
Please Suggest me how do I create table and backup the table there?
There are couple of ways to do that:
The most reliable (that I usually use) is using the SQL Azure Migration Wizard
Then you have the "Generate Scripts" option in your SSMS (SQL Server Management Studio 2008 R2 or later). The generate Scripts option does have a feature to make SQL Azure compliant script. It can also script data. But I suggest using method one if you want to migrate data, too. SQL Azure Migration Wizard uses BCP tool, which dumps the data into binary files, while SSMS just generates inline INSERT Statements
SSIS (SQL Server Integration Services) - you can create a Data Transfer task, but I would use it very rare for small DBs.
Export/Import data tier application (using DACPAC package) - this will migrate your schema and can migrate your data as well.
UPDATE 2017-10-24
Azure SQL Database now supports transactional replication from your on-premises SQL Server. You can configure your Azure SQL Database as subscriber and your SQL Server on-premise as publisher. You can read more about database migration options and strategies here: https://learn.microsoft.com/en-us/azure/sql-database/sql-database-cloud-migrate
Update 2017-12-23
SQL Azure Migration Wizard has been replaced by Data Migration Assistant: https://learn.microsoft.com/en-us/azure/sql-database/sql-database-cloud-migrate
If you already have a database on local machine then you can migrate it directly on Azure using SQL Management Studio. Follow these steps:
Right click on the database name in SSMS
Follow the wizard that appears then
There are a few ways in which to achieve this functionality.
SQL Azure Import/Export. "DACPAC" & "BACPAC"
Microsoft Codename "Data Transfer"
SQL Azure Data Sync Windows Azure SQL Data Sync
Migrating Databases using Import/Export Wizard in SSMS
SQL Azure Migration Wizard (As Mentioned in other Answers)
I'm assuming you're referring to SQL Azure? If so, you'll probably want to use the SQL Azure Migration Wizard # http://sqlazuremw.codeplex.com/
SQL Server 2012 Management Studio and SQL Azure Tools also now has this option I believe.
In SSMS if you right click on the Databases root, there is an option "Import Data-tier Application...", which allows you to restore a BACPAC (you can also right click on a database, and select "Export Data-tier Application..." to export an existing database to a BACPAC).
SQL Server Data Tools enables Visual Studio 2010 with a Data Compare option, which can also be used to move data between two database instances (which would be suited to smaller data patches).

Resources