Archive

Posts Tagged ‘SQL Azure Query Tool’

SQL Azure Database Manager–Project Houston

May 26, 2011 Leave a comment

In the Episode 3 of SQL Azure Query Tool, we will see how to use SQL Azure Database Manager 10.0 (Project Houston), which is part of Windows Azure Management Portal now

Step 1: Login to Windows Azure Portal (https://windows.azure.com/default.aspx ), select the SQL Azure Server and Database and click on “Manage”

clip_image002

Step 2: Accept the Terms and Conditions and data collection agreement and click “Ok” to connect

clip_image003

Step 3: Server name, database name and user name will be pre-populated, Please enter password and click “Connect” to login

clip_image004

Step 4: Start Page will display the database properties (Default Collation, Compatibility Level, Date Created and Read Only) and Server Edition and Version

clip_image006

Click on Left or Right Arrow near to Database Properties to Spin up to Resources view

clip_image008

Step 5: To Query data click on “New Query” in tool bar

New Query

clip_image009

Type the SQL query and click on “Execute” to run the query, you can Save the query as .SQL file for future use as well. Results of the query will be displayed in Bottom pane as Grid

clip_image011

Output Messages can be displayed in the “Message” tab

clip_image012

Step 6: To Create New Table – Click on “New Table” icon in toolbar

clip_image014

Enter the column name, select the data type, size, default value, Specify whether Identity, Required or Primary Key. Click on “+ Column” to add more columns. Once completed the design, click on “Save” to save the table.

Step 7: To add data click on Data View in toolbar

clip_image015

Click on “+ Row” to add rows and enters data. Click Save to store the data.

clip_image016

Step 8: Create New View: To create a new view, click on “New View” button in toolbar

Select Schema, Specify View Name and then type the SQL Query and click “Save”, After saving the query, you can click on “Data” to view the output from View

clip_image018

Step 9: Create New Stored Procedure: To create new Stored Procedure, click on “New Stored Procedure” button in toolbar

Select Schema, specify name of Stored Procedure and then click “New Paramter” or “+ Parameter” to add parameter

Specify the name of the parameter, select data type, specify size (if required), default value, whether output parameter or not

Then define the stored procedure body and click “Save”

clip_image020

Step 10: Execute Stored Procedure: Once saved, you can click “Run” and then specify parameter values and click “Execute”

clip_image021

clip_image023

Conclusion: SQL Azure Database Manager (Project Houston) is a light-weight Management Studio Express with limited functionality to create Table, Views and Stored Procedures and manage Data

Missing Features:

1. No option to define Synonyms

2. No option to define Functions / View functions

3. No option to create Logins

4. No option to create Users or Manage Permissions

5. No option to Import / Export data

I hope in the future versions, these missing features will be added to make it a full fledge and fully functional Database Manager.

I hope you all find this information useful.

Advertisements

SQL Azure Query Tool–myLittleAdmin

May 25, 2011 Leave a comment

myLittleAdmin for SQL Azure is web-based interface to manage SQL Azure server and databases

myLittleAdmin is available for free under Public Beta, but it will be charged once it goes live. Pricing information is not disclosed yet.

You can Install myLittleAdmin for SQL Azure in your own IIS server or you can access it directly from http://mylittleadmin4sqlazure.cloudapp.net/ 

For list of features and support information, please visit http://azure.mylittleadmin.com/azure/en/default.aspx

Login – To connect to SQL Azure server, provide Servername, Database, Login and Password to login to your server

image

You can also connect without specifying the database name

To Encrypt the connection or change the Connection Time out click on “Options” and select the required option

image

Click “Connect” to connect to your SQL Azure server

Dashboard – Databases Tab (Default) displays the available System and User databases

image

Dashboard – Connection Tab displays the License and Connection information

image

image

Server Info displays the detailed information about the connected SQL Azure server

image

To disconnect from the server, use the “Disconnect” option in “Connection” tab.

image

Database Tab To Manage Database Object

Click on User Databases and select your database to view Tables, Views, Synonyms, Stored Procedures, Functions, Users, Roles and Schema

image

By selecting a Table, you can access the following functions in the Right side pane

image

image – Open the table to view or modify data
image

You have option to Export to CSV, XML and Excel 2003 format. You can also filter data, modify or insert or delete records

image – Table Designer

image

image – View Dependencies

image

image-View Properties

image

image-View Permissions

image

Creating Views

To create View, Click on “Views” node and click on “New”  image Icon on Right side pane, and then modify the template to specify View name, Schema Name and SQL query to create view and click “Create”

image

Creating Synonyms

To create Synonyms, Click on “Synonyms” node and click on “New” image Icon on Right side pane, then enter the Synonym name, select the Schema and then Object Type and name and click “Create”

 image

Similarly you can create or modify or drop Stored Procedures, Functions, Database Triggers and View Assemblies and Types available

image

Manage Database Users, Roles and Schemas

image

Security Tab: Manage Logins, View Server Roles

image

To create new login, click on New Icon in Right side pane after selecting Logins node

image

image

Available Tools

image

You can use “New Query” tool to run adhoc queries, Type your query and click on “Submit”

image

Query options available

image

You can view the results of Query in Results tab

image

You can view Informational and Error messages in Messages tab

image

Generate Insert script for Tables

image

Select database, and table and specify the columns and then click on “Generate” to create insert SQL script

Generated Insert Script

image

To save the script, click on “Save As” and proceed

Import CSV Files

image

Options for import

image

I tried couple of different format and options, even after Import option is not working even after directly trying to import files exported from Data View itself

Always getting the following error

image

I wasn’t sure why its not able to see the table from Import option even for an administrator account

Preferences Tab

image

Under Preferences, you can select you preferred Language, available languages are English, French, Deutsch and Japanese.

Currently there is only one Skin and Export option available.

You can access the myLittleAdmin forums from Help tab.

Conclusion: myLittleAdmin for SQL Azure is a full fledge light weight Management Studio, which  supports all database objects, comes with useful handy tools and also available in 4 different languages.

When compared to Project Houston and Red Gate Query Anywhere, myLittleAdmin supports more features and also fast performing.

For detailed comparison of features across Project Houston, Red Gate Anywhere and myLittleAdmin for SQL Azure, please read this document

http://azure.mylittleadmin.com/azure/Comparing_SQL_Azure_Management_Tools.pdf 

I hope you all find this information useful !!!

%d bloggers like this: