SQL Azure - Creating New Database Stored Procedure in Azure Portal


In this article we are going to see how to create a new database stored procedure using the new Azure portal instead of using the SQL Server Management Studio.


Stored procedures are created normally using the SQL Serve managementstudio, with the latest version of SQL Azure we have option to create auser stored procedure directly online without need to have a local interface. This way we have some control of using it anywhere anytime todo some updates regularly.  Let us see how to create the Stored procedure in Azure portal step by step.


Log in to the Azure portal using the below link. You can see the screen look similar to below



Login to the portal using your Microsoft Windows Live credentials with Azure credentials to the management portal and you will see the screen as shown in the screen below


Now we can see the Database Menu at the bottom left, Click on that will go to the Database Subscription window as shown in the screen below


Clicking on the subscription name will provide the complete details of the server created and the new database created as shown in the screen below


Now we have a database created(LearnAzure) with a Max size of 1GB andready to use it for the application based on the requirement. To createa new Stored Procedure click on Manage at the top menu tool bar as shown in the screen below


Check my previous article on how to connect to the manage portal using the credentials and the firewall using the link. Once logged in you screen will look like below


To create a new stored procedure click on New Stored procedure menu at the top and we will see a script window as shown in the screen below


Now we will write our customized stored procedure for the EmpDetails table which we created in our earlier tutorial(Check my previous articlefor table creation) as shown in the screen below


Once we create the structure for the stored procedure as shown in theabove screen we need to save it. Once save we can use the stored procedure to execute the same as shown in the screen below. We need to navigate to the new query window in the Database section and write a execute command as shown below.


We can create n Number of stored procedure as per the requirement anduse it across the process which we normally do with the traditional SQLServer locally.


So in this article we have seen how to create a new Stored procedure using the new SQL Azure management portal and use it across our requirement.