Description:
Sql Azure is the cloud computing service provided by Microsoft, which is @CTP version now.  Sql Azure will provide you databases on the cloud level, this means you can host your data on the MS’s database server, definitely, it will be more safety.
Apply for an Sql Azure account:
Even Sql Azure is @CTP, but your still need to use a activation code to get an Azure account,  go to https://sql.azure.com and apply for an account, you will probably get your activation code after several hours.
Create an databaseGo to https://sql.azure.com and login with your username, click on the “Create Database”  button to create a new database, in this document, I will use the “FirstTestDb”  as my demo database name.
Connect to Sql Azure from the command lineBefore connect to Sql Azure, you need to get the following from your Sql Azure portal page:
Server: which is of format ****.database.windows.netServerName: which is the first part of the Server.
Username: the administrator name when your active your Sql Azure account.
Password: the password when you active your Sql Azure account.
For example: my server is fx50bskenx.database.windows.net, so my server name is fx50bskenx,  my username is wlmzfxType sqlcmd -S fx50bskenx.database.windows.net -U wlmzfx@fx50bskenx -d FirstTestDb at your command line, and then type your password, once you see the 1> from your command window, that means you have connected to Sql Azure successfully.
Note: Sql Azure does not support USE databasename command for the moment, so you need to specify your database when typing the command.
Execute Sql command against Sql AzureCreate a new table Person:
1> CREATE TABLE Person (Id INT IDENTITY(0,1) PRIMARY KEY, FirstNameNVARCHAR(50))2> GOInsert a new row to the Person table:
1> INSERT INTO Person (FirstName) VALUES(N’Wang Pan’);2> GONote: type one more GO at a new line at the end of your command, I have tried to use ; to specified end of and command, but it does not work.

Description:

Sql Azure is the cloud computing service provided by Microsoft, which is @CTP version now.  Sql Azure will provide you databases on the cloud level, this means you can host your data on the MS’s database server, definitely, it will be more safety.

Apply for an Sql Azure account:

Even Sql Azure is @CTP, but your still need to use a activation code to get an Azure account,  go to https://sql.azure.com and apply for an account, you will probably get your activation code after several hours.

Create an database

Go to https://sql.azure.com and login with your username, click on the “Create Database”  button to create a new database, in this document, I will use the “FirstTestDb”  as my demo database name.

Connect to Sql Azure from the command line

Before connect to Sql Azure, you need to get the following from your Sql Azure portal page:

Server: which is of format ****.database.windows.netServerName: which is the first part of the Server.

Username: the administrator name when your active your Sql Azure account.

Password: the password when you active your Sql Azure account.

For example: my server is fx50bskenx.database.windows.net, so my server name is fx50bskenx,  my username is wlmzfxType sqlcmd -S fx50bskenx.database.windows.net -U wlmzfx@fx50bskenx -d FirstTestDb at your command line, and then type your password, once you see the 1> from your command window, that means you have connected to Sql Azure successfully.

Note: Sql Azure does not support USE databasename command for the moment, so you need to specify your database when typing the command.

Execute Sql command against Sql Azure

Create a new table Person:

1> CREATE TABLE Person (Id INT IDENTITY(0,1) PRIMARY KEY, FirstNameNVARCHAR(50))2> GOInsert a new row to the Person table:

1> INSERT INTO Person (FirstName) VALUES(N’Wang Pan’);

2> GO

Note: type one more GO at a new line at the end of your command, I have tried to use ; to specified end of and command, but it does not work.

相关文章:

  1. JQuery Ajax发送GET请求乱码的解决办法
  2. Update the application configuration file automatically in C#
  3. 在.NET项目中使用log4net
  4. The online doc/spreadsheet/present service by G.o.o.g.l.e
  5. WordPress插件StyleBox
  6. 很漂亮的适合在windows7&vista下使用的壁纸
  7. 性能: 字符串倒序算法 (C# version)
  8. DotNet下NUnit的使用(1)—- NUnit入门
  9. 创建不同凡响公司名的王牌标准
  10. 使用InternalsVisibleTo给assembly添加“友元assembly”