Visual Studio2015 Connection Management global Azure Database
When it comes to Vistual studio, I believe we are no strangers, of course, for developers. Also speaking of the deployment of some services for Windows Azure, we can use visual Studio2015 to connect to Windows Azure and then create some houses. Now a lot of people should use vistual studio2013, but I am a fan of Microsoft. Microsoft can not wait to try to update the new product. Now Microsoft vistual Studio update to 2015, the function will not say, we need to go to the official website to download the use. Here i download the latest version of Vistual studio2015 installed, after installing to connect to Windows Azure to do some service deployment, today is a simple introduction to the visual Studio2015 under Connection Management global Azure Database. A brief summary for everyone to share. specifically see below:
We first installed the visual Studio2015 and then opened the interface
650) this.width=650; "title=" clip_image002 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "border=" 0 "alt=" clip_ image002 "src=" http://s3.51cto.com/wyfs02/M00/79/0F/wKiom1aGh6qxV5lEAAEMBuVo8Bk898.jpg "height=" 419 "/>
Today we're going to show you the connection management Global Azure Database under visual Studio2015, so we first need to connect to the Azure platform, so we right-click the Azure platform---Connect to the Microsoft Azure subscription
650) this.width=650; "title=" clip_image004 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "border=" 0 "alt=" clip_ image004 "src=" http://s3.51cto.com/wyfs02/M01/79/0F/wKiom1aGh6zi_oe2AAEaaxjIfQw792.jpg "height=" 396 "/>
Prompted to enter Azure management account information
650) this.width=650; "title=" clip_image006 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "border=" 0 "alt=" clip_ image006 "src=" http://s3.51cto.com/wyfs02/M01/79/0F/wKiom1aGh66jqOWZAADrCzxiw_g703.jpg "height=" 388 "/>
After connecting, we right click to manage subscription information
650) this.width=650; "title=" clip_image008 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "border=" 0 "alt=" clip_ image008 "src=" http://s3.51cto.com/wyfs02/M00/79/0D/wKioL1aGh9Dysku6AAD0KTo24pA078.jpg "height=" 367 "/>
We can see the subscription information of the account we just connected under the subscription.
650) this.width=650; "title=" clip_image010 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "border=" 0 "alt=" clip_ image010 "src=" http://s3.51cto.com/wyfs02/M00/79/0F/wKiom1aGh7SjXUH-AADUi6xyqT8648.jpg "height=" 422 "/>
We can also click the certificate and import the subscription file
650) this.width=650; "title=" clip_image012 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "border=" 0 "alt=" clip_ image012 "src=" http://s3.51cto.com/wyfs02/M01/79/0D/wKioL1aGh9fikts3AAEB4UF2_4g815.jpg "height=" 454 "/>
Then change the subscription to include the following four service areas
650) this.width=650; "title=" clip_image014 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "border=" 0 "alt=" clip_ image014 "src=" http://s3.51cto.com/wyfs02/M02/79/0D/wKioL1aGh9uyDrpSAAC38V08An8693.jpg "height=" 419 "/>
After connecting to Azure server, we can manage the app service, SQL database, Notification Center, mobile service
650) this.width=650; "title=" clip_image016 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "border=" 0 "alt=" clip_ image016 "src=" http://s3.51cto.com/wyfs02/M00/79/0D/wKioL1aGh93jR7IdAADCmvF4vMA651.jpg "height=" 305 "/>
We'll then create a SQL Server database on Azure portal;
Let's add a resource group first
650) this.width=650; "title=" clip_image018 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt = "clip_image018" src= "http://s3.51cto.com/wyfs02/M01/79/0D/wKioL1aGh96RTDlQAACi0LtTgTQ446.jpg" height= "448"/>
Next we create a SQL Server Database
650) this.width=650; "title=" clip_image020 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "border=" 0 "alt=" clip_ image020 "src=" http://s3.51cto.com/wyfs02/M02/79/0F/wKiom1aGh8CyZwWIAADPaG4H37Q530.jpg "height=" 571 "/>
New Database server
650) this.width=650; "title=" clip_image022 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "border=" 0 "alt=" clip_ image022 "src=" http://s3.51cto.com/wyfs02/M02/79/0D/wKioL1aGh-KSVh2KAACMHoVi1nc586.jpg "height=" 456 "/>
Define database information, click Start to create
650) this.width=650; "title=" clip_image024 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt = "clip_image024" src= "http://s3.51cto.com/wyfs02/M00/79/0F/wKiom1aGh8PTXlYgAACRPQdGiRs005.jpg" height= "583"/>
Database Creation Complete
650) this.width=650; "title=" clip_image026 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "border=" 0 "alt=" clip_ image026 "src=" http://s3.51cto.com/wyfs02/M00/79/0D/wKioL1aGh-SRhhXiAABzY7hJ0zc560.jpg "height=" 282 "/>
Next we refresh in Visual Studio to see the database you just created
650) this.width=650; "title=" clip_image028 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "border=" 0 "alt=" clip_ image028 "src=" http://s3.51cto.com/wyfs02/M02/79/0F/wKiom1aGh8bDZvwiAAETnbgNNoo548.jpg "height=" 401 "/>
650) this.width=650; "title=" clip_image030 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "border=" 0 "alt=" clip_ image030 "src=" http://s3.51cto.com/wyfs02/M00/79/0F/wKiom1aGh8nQl23vAAEAka0k53E068.jpg "height=" 372 "/>
Let's first try to use the open in SQL Server Object Explorer
Tip If you need to access the database, you need to add the local network address to the SQL firewall
650) this.width=650; "title=" clip_image032 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "border=" 0 "alt=" clip_ image032 "src=" http://s3.51cto.com/wyfs02/M01/79/0F/wKiom1aGh82zWfquAADfvTULaoI564.jpg "height=" 368 "/>
After adding, the connection needs to be verified using the corresponding management account.
650) this.width=650; "title=" clip_image034 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "border=" 0 "alt=" clip_ image034 "src=" http://s3.51cto.com/wyfs02/M01/79/0F/wKiom1aGh8_w14wfAADilMkqafo365.jpg "height=" 345 "/>
Let's add a table to the database first
650) this.width=650; "title=" clip_image036 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt = "clip_image036" src= "http://s3.51cto.com/wyfs02/M02/79/0F/wKiom1aGh9GQnX9JAAEccCEvJqc590.jpg" height= "475"/>
We can see that in Visual Studio, you can create databases and forms by trying to
650) this.width=650; "title=" clip_image038 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "border=" 0 "alt=" clip_ image038 "src=" http://s3.51cto.com/wyfs02/M00/79/0E/wKioL1aGh_PBn-TsAADbU9IC6Sw882.jpg "height=" 478 "/>
Next we create a student table information;
Add fields such as ID, name, age, sex, etc.
We note that when you add a field, the script automatically adds
650) this.width=650; "title=" clip_image040 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "border=" 0 "alt=" clip_ image040 "src=" http://s3.51cto.com/wyfs02/M01/79/0E/wKioL1aGh_XDWdScAAEri5QwSjw352.jpg "height=" 499 "/>
When all the custom fields have been added, the script is automatically completed
650) this.width=650; "title=" clip_image042 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "border=" 0 "alt=" clip_ image042 "src=" http://s3.51cto.com/wyfs02/M01/79/0F/wKiom1aGh9jg3RXeAAD5qU60t6I571.jpg "height=" 483 "/>
Execute---Update button to start creating the form
650) this.width=650; "title=" clip_image044 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "border=" 0 "alt=" clip_ image044 "src=" http://s3.51cto.com/wyfs02/M02/79/0F/wKiom1aGh9qgQTYXAAD98VuiBp0524.jpg "height=" 493 "/>
Before executing, we need to define the name of the table
650) this.width=650; "title=" clip_image046 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "border=" 0 "alt=" clip_ image046 "src=" http://s3.51cto.com/wyfs02/M00/79/0E/wKioL1aGh_6BhEW-AAD7q5vyM-E097.jpg "height=" 429 "/>
Previewing database update information
650) this.width=650; "title=" clip_image048 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "border=" 0 "alt=" clip_ image048 "src=" http://s3.51cto.com/wyfs02/M01/79/0E/wKioL1aGiACQ53dMAADo1FuWxrU359.jpg "height=" 412 "/>
Start updating the database
650) this.width=650; "title=" clip_image050 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "border=" 0 "alt=" clip_ image050 "src=" http://s3.51cto.com/wyfs02/M00/79/0F/wKiom1aGh-PT9_YeAAFKL_upGwg605.jpg "height=" 515 "/>
We click to view the updated results
650) this.width=650; "title=" clip_image052 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "border=" 0 "alt=" clip_ image052 "src=" http://s3.51cto.com/wyfs02/M02/79/0F/wKiom1aGh-WxgliZAAE29EuU6gs534.jpg "height=" 474 "/>
Next we refresh to see if the table was created successfully
650) this.width=650; "title=" clip_image054 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "border=" 0 "alt=" clip_ image054 "src=" http://s3.51cto.com/wyfs02/M02/79/0E/wKioL1aGiAiz3aZaAAELA5xxa0s821.jpg "height=" 411 "/>
Next we need to insert the data for the table you just created
Right-click dbo.student----Scripting---Create to---new query window
650) this.width=650; "title=" clip_image056 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "border=" 0 "alt=" clip_ image056 "src=" http://s3.51cto.com/wyfs02/M02/79/0F/wKiom1aGh-qh_4tCAAEuLi3MwB0083.jpg "height=" 422 "/>
Open the Query window for the Create mode of the table
We click Create a new window
650) this.width=650; "title=" clip_image058 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "border=" 0 "alt=" clip_ image058 "src=" http://s3.51cto.com/wyfs02/M00/79/0E/wKioL1aGiAzBlzbWAAD_bQSIVB8135.jpg "height=" 386 "/>
We click the New Query window and query the table's fields and contents by name
650) this.width=650; "title=" clip_image060 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "border=" 0 "alt=" clip_ image060 "src=" http://s3.51cto.com/wyfs02/M00/79/0E/wKioL1aGiA6g8xAGAADLoFyAktM228.jpg "height=" 368 "/>
Next we insert the data by name
We'll first use the comment key to comment the query command----
650) this.width=650; "title=" clip_image062 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "border=" 0 "alt=" clip_ image062 "src=" http://s3.51cto.com/wyfs02/M00/79/0F/wKiom1aGh_DDPHfTAADhZ-Yj4w8042.jpg "height=" 366 "/>
Start execution after entering all commands that need to be queried
Insert into dbo.student (id,name,sex,age) VALUES (' 1 ', ' Zhangsan ', ' Boy ', ' a ') insert into dbo.student (id,name,sex,age) VALUES (' 2 ', ' Lisi ', ' boy ', ' + ') insert into dbo.student (id,name,sex,age) VALUES (' 3 ', ' Xiaoli ', ' girl ', ' + ') insert INTO Dbo.student (Id,name,sex,age) VALUES (' 4 ', ' Xiaofang ', ' Girl ', ' ') ' INSERT into dbo.student (id,name,sex,age) VALUES (' 5 ' , ' Gaowenlong ', ' Boy ', ' 27 ')
Successful execution
650) this.width=650; "title=" clip_image064 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "border=" 0 "alt=" clip_ image064 "src=" http://s3.51cto.com/wyfs02/M02/79/0E/wKioL1aGiBOj7xZaAAD0PEgbmvE391.jpg "height=" 402 "/>
Next we query the data
650) this.width=650; "title=" clip_image066 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "border=" 0 "alt=" clip_ image066 "src=" http://s3.51cto.com/wyfs02/M01/79/0F/wKiom1aGh_WSfsDvAAD0CduHQuE232.jpg "height=" 385 "/>
Finally, let's say that you can also use Visual Studio to manage your portal on Azure
650) this.width=650; "title=" clip_image068 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "border=" 0 "alt=" clip_ image068 "src=" http://s3.51cto.com/wyfs02/M02/79/0E/wKioL1aGiBeBzT19AAC7fIO14lE360.jpg "height=" 441 "/>
We are prompted to use Visual Studio to punch in love
650) this.width=650; "title=" clip_image070 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "border=" 0 "alt=" clip_ image070 "src=" http://s3.51cto.com/wyfs02/M00/79/0E/wKioL1aGiBnw9uHQAADUMk_ldTQ402.jpg "height=" 392 "/>
It then automatically jumps to Visual Studio management, and validates the administrative account that entered SQL
650) this.width=650; "title=" clip_image072 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "border=" 0 "alt=" clip_ image072 "src=" http://s3.51cto.com/wyfs02/M01/79/0E/wKioL1aGiBzR31RFAAEA_2kXH4A695.jpg "height=" 411 "/>
Open normally
650) this.width=650; "title=" clip_image074 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "border=" 0 "alt=" clip_ image074 "src=" http://s3.51cto.com/wyfs02/M02/79/0F/wKiom1aGh_7hy2NnAADgWo75deo884.jpg "height=" 355 "/>
This article from "Gao Wenrong" blog, declined reprint!
Visual Studio2015 Connection Management global Azure Database