azure 免费帐户注册

介绍 (Introduction)

When you practice and play with the Azure Storage, you spent money because you need to pay for the service. This obviously provides an incentive to discover a way to emulate the Azure Storage behavior.

在练习和使用Azure存储时,您花了钱,因为您需要为服务付费。 显然,这提供了一种动机来探索一种模仿Azure存储行为的方法。

In this article, we will use an emulator and learn how it works.

在本文中,我们将使用模拟器并学习其工作原理。

要求 (Requirements)

  1. First, we will need SQL Server installed 首先,我们需要安装SQL Server
  2. Secondly, we will install SQL Server Management Studio (SSMS) 其次,我们将安装SQL Server Management Studio(SSMS)
  3. Finally, you will need administrator privileges to install the software. 最后,您将需要管理员权限才能安装软件。

入门 (Getting Started)

Working with the Azure Storage is cheap, but if you are just practicing, you will not want to spend money on it. Here you have the list of prices:

使用Azure存储很便宜,但是如果您只是在练习,就不要在上面花钱。 这里有价格表:

  • Azure Storage Pricing Azure存储定价

To avoid these costs, we will download the Azure Storage Emulator. You can download the emulator using the following link:

为避免这些费用,我们将下载Azure存储模拟器。 您可以使用以下链接下载仿真器:

  • Download the Azure Storage Emulator 下载Azure存储模拟器

It is also included with the Microsoft Azure SDKs.

它还包含在Microsoft Azure SDK中。

The installer is downloaded by default in the following path:

默认情况下,将通过以下路径下载安装程序:

<disk drive>:\Program Files (x86)\Microsoft SDKs\Azure

You will find the configuration file there (AzureStorageEmulator.exe.config):

您将在此处找到配置文件(AzureStorageEmulator.exe.config):

This emulator uses OData to access and connect to the information. The URLs used to access to the blobs, queue messages and tables are the following:

该仿真器使用OData访问并连接到信息。 以下是用于访问Blob,队列消息和表的URL:

  • Blobs: http://127.0.0.1:10000/ Blob:http://127.0.0.1:10000 /
  • Queues: http://127.0.0.1:10001/ 队列:http://127.0.0.1:10001 /
  • Tables: http://127.0.0.1:10002/ 表格:http://127.0.0.1:10002 /

The account key used by the account name “devstoreaccount1” is in this configuration file and it is the following:

帐户名称“ devstoreaccount1”使用的帐户密钥在此配置文件中,并且如下所示:

Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==

If you need to simulate a proxy, you can add the following line in the configuration file:

如果需要模拟代理,则可以在配置文件中添加以下行:

UseDevelopmentStorage=true;DevelopmentStorageProxyUri=http://yourProxyUri

To create the database, you can run the following command in the folder where the emulator is installed:

要创建数据库,可以在安装模拟器的文件夹中运行以下命令:

AzureStorageEmulator.exe init

This command will create a database in the localdb. If you do not know what is the localDB and how to use it, we recommend reading our following article:

此命令将在localdb中创建一个数据库。 如果您不知道什么是localDB以及如何使用它,建议您阅读以下文章:

  • How to connect and use Microsoft SQL Server Express LocalDB 如何连接和使用Microsoft SQL Server Express LocalDB

To start the Azure Storage emulator run the following command in the folder where it is installed:

若要启动Azure存储模拟器,请在其安装文件夹中运行以下命令:

AzureStorageEmulator.exe start

To stop your emulator, you can use the following command:

要停止模拟器,可以使用以下命令:

Storage Emulator>AzureStorageEmulator.exe stop

To show the status of the emulator you can run the following command:

要显示仿真器的状态,可以运行以下命令:

Storage Emulator>AzureStorageEmulator.exe status

If it is running the status will be the following: IsRunning: True

如果正在运行,则状态为以下: IsRunning:True

To clear all the blob data, use the following command:

要清除所有斑点数据,请使用以下命令:

AzureStorageEmulator.exe clear blob

You can also clear queue or table data using the following commands:

您还可以使用以下命令清除队列或表数据:

AzureStorageEmulator.exe clear queue

And

AzureStorageEmulator.exe clear table

Now, in the SSMS, connect to the database created:

现在,在SSMS中,连接到创建的数据库:

You can also verify the tables created by the Azure Storage Emulator:

您还可以验证由Azure存储模拟器创建的表:

To test and verify these tables, we will download the Microsoft Azure Storage Explorer (MASE). You can download the program here:

为了测试和验证这些表,我们将下载Microsoft Azure存储资源管理器(MASE)。 您可以在此处下载程序:

  • Download the MASE 下载MASE

Install the MASE. MASE can help you to upload and download files to Azure or to the Azure emulator. You can also create Queues and tables.

安装MASE。 MASE可以帮助您将文件上传和下载到Azure或Azure仿真器。 您还可以创建队列和表。

We will upload some files and create some containers first.

我们将首先上传一些文件并创建一些容器。

If you have an Azure Account you will need to sign in with your Azure credentials, otherwise, you can omit that part.

如果您具有Azure帐户,则需要使用Azure凭据登录,否则,可以省略该部分。

In MASE, go to Local and Attached, expand it and to Storage Accounts, Development and Blob Containers:

在MASE中,转到“本地和附件”,展开它,再到“存储帐户,开发和Blob容器”:

In the Blob Container can right click and create new blob containers. We will create a blob container named container1. In the container1, you can create new folders upload and download files.

在Blob容器中,可以右键单击并创建新的Blob容器。 我们将创建一个名为container1的Blob容器。 在container1中,您可以创建新的文件夹来上传和下载文件。

You can verify your accounts in SQL Server. The following query will show the account information including secret keys, queue, blob and table settings:

您可以在SQL Server中验证您的帐户。 以下查询将显示帐户信息,包括密钥,队列,blob和表设置:

SELECT  [Name],[SecretKey],[QueueServiceSettings],[BlobServiceSettings],[TableServiceSettings],[SecondaryKey],[SecondaryReadEnabled]FROM [AzureStorageEmulatorDb53].[dbo].[Account]

The table displayed is the following:

显示的表如下:

You can also check your Blob Container information. Using the BlobContainer table including the last modification date and lease information:

您还可以检查您的Blob容器信息。 使用包含上次修改日期和租约信息的BlobContainer表:

If you query the dbo.BlobContainer table, you will be able to see the container just created:

如果查询dbo.BlobContainer表,您将能够看到刚刚创建的容器:

Select * from dbo.BlogContainer

Other internal tables of the Azure Storage Emulator are the following:

Azure存储模拟器的其他内部表如下:

  • Dbo.CommittedBlock contains information about the Azure Account Name, Container name, BlobName and the blocks used. The Azure Storage Accounts. Dbo.CommittedBlock包含有关Azure帐户名称,容器名称,BlobName和使用的块的信息。 Azure存储帐户。
  • Dbo.CurrentPage will give you page information about the blobs. Dbo.CurrentPage将为您提供有关Blob的页面信息。
  • Dbo.DeletedAccount contains the accounts removed. Dbo.DeletedAccount包含已删除的帐户。
  • Dbo.Page handles page information about the blobs contained. Dbo.Page处理有关包含的Blob的页面信息。

We can also work with Queues in Azure. In MASE, go to Local and Attached, Storage Accounts, Development, Queues.

我们还可以在Azure中使用队列。 在MASE中,转到“本地和附加”,“存储帐户”,“开发”,“队列”。

Right click on Queues and create a new Queue named Queue1:

右键单击队列,然后创建一个名为Queue1的新队列:

In the Queue, press Add Message and write a message:

在队列中,按添加消息并编写一条消息:

The following query will show the information related to the Queue information:

以下查询将显示与队列信息有关的信息:

SELECT TOP  [AccountName],[QueueName],[LastModificationTime],[ServiceMetadata],[Metadata]FROM [AzureStorageEmulatorDb53].[dbo].[QueueContainer]

You will be able to see the queue1 just created:

您将能够看到刚刚创建的queue1:

The dbo.QueueMessage contains the messages created in the queues. In MASE, go to tables and create a new table:

dbo.QueueMessage包含在队列中创建的消息。 在MASE中,转到表并创建一个新表:

We will create a table named Table1. You can press Add to create a new table and add new properties to the table.

我们将创建一个名为Table1的表。 您可以按添加以创建一个新表并将新属性添加到表中。

The following query will show the table created:

以下查询将显示创建的表:

The Azure local storage is used for development purpose only. It should not be used in production because:

Azure本地存储仅用于开发目的。 不应将其用于生产中,因为:

  • It does not offer security. It uses a specific account. 它不提供安全性。 它使用一个特定的帐户。
  • It is a simple SQL Server LocalDB instance, and therefore it does not support a heavy workload and it is not designed to have good performance. 它是一个简单SQL Server LocalDB实例,因此它不支持繁重的工作负载,并且设计得不具有良好的性能。
  • The limit supported for the blob size is 2 GB. 支持的Blob大小限制为2 GB。

Note: It is also possible to run the emulator in Docker.

注意:也可以在Docker中运行模拟器。

结论 (Conclusion)

In this article, we learned that we can simulate the Azure Storage Account behavior using the emulator which:

在本文中,我们了解到可以使用以下模拟器来模拟Azure存储帐户的行为:

  • works on the command line and you can start or stop it using commands. 在命令行上工作,您可以使用命令启动或停止它。
  • allows saving the money that Azure may charge if we load data in the Azure Storage Account to test. 如果我们在Azure存储帐户中加载数据进行测试,则可以节省Azure可能收取的费用。
  • stores all the information in SQL Server tables using the SQL Server LocalDB. 使用SQL Server LocalDB将所有信息存储在SQL Server表中。

Also, we learned how to use the AzureStorageEmulator.exe.config

此外,我们还学习了如何使用AzureStorageEmulator.exe.config

We also reviewed how to create Azure Containers, upload and download files using the emulator. Finally, we created some queues and tables in the Azure emulator and checked where they are stored. This emulator is for Windows, but if you need to run on Linux, there is a version named Azurite. You can download the Linux version here.

我们还回顾了如何创建Azure容器,如何使用模拟器上传和下载文件。 最后,我们在Azure仿真器中创建了一些队列和表,并检查了它们的存储位置。 该仿真器适用于Windows,但是如果您需要在Linux上运行,则有一个名为Azurite的版本。 您可以在此处下载Linux版本。

翻译自: https://www.sqlshack.com/how-simulate-the-azure-sql-database-storage-account-behavior-using-emulator/

azure 免费帐户注册

azure 免费帐户注册_如何使用模拟器模拟Azure SQL数据库存储帐户行为相关推荐

  1. Java游戏用户登录注册_用java类模拟游戏的账号的登陆,注册,退出。 1.没有账号,需要注册。 2.注册完成后方可登...

    展开全部 /** 需求:奖客富翁游戏.62616964757a686964616fe4b893e5b19e31333337386564 菜单为: 1.注册用户信息.填写用户名,密码,电脑随机输出一个4 ...

  2. navicat怎么安装mysql数据库_【20170825】从零开始学SQL数据库 安装mysql与navicat,开始练习...

    封面已经说明一切.左边mysql确实很酷炫,时时刻刻感觉自己像个程序猿,但是还是右边的navicat美化过后的界面更友好一些. 网上关于如何安装这两个软件已经有很多教程了,我选择了一个比较新的,且非常 ...

  3. r dataframe 转成向量_快速掌握R语言中类SQL数据库操作技巧

    在数据分析中,往往会遇到各种复杂的数据处理操作:分组.排序.过滤.转置.填充.移动.合并.分裂.去重.找重.填充等操作.这时候R语言就是一个很好的选择:R可以高效地.优雅地解决数据处理操作.(本章节为 ...

  4. 如何使用SQL Server Management Studio(SSMS)连接到Azure存储帐户

    介绍 (Introduction) In SQL Server Management Studio (SSMS), it is possible to connect to the Azure Sto ...

  5. 如何使用sqlpackage和PowerShell将示例bacpac文件导入到Azure SQL数据库

    介绍 (Introduction) In our first part of this series, we showed how to import a bacpac file using the ...

  6. 万里汇WorldFirst个人和企业帐户注册教程(送$25+1%提现费)

    WorldFirst,中文名万里汇,国内一般简称WF.WF卡.WorldFirst是一家注册于英国的顶级国际汇款公司,用它可以方便地从亚马逊.eBay等电商平台接收海外款项(支持美元.欧元.英镑.加元 ...

  7. windows10访客_如何在Windows 10中创建访客帐户

    windows10访客 If you find that your guests are asking fairly often to use your computer temporarily to ...

  8. angular过滤字符_如何使用Angular和Azure计算机视觉创建光学字符读取器

    angular过滤字符 介绍 (Introduction) In this article, we will create an optical character recognition (OCR) ...

  9. paypal注册_使用PayPal补习注册(2/3):PayPal项目的真实注册

    paypal注册 解释PayPal的工作方式(IPN和PDT流程). 第一 章第三章 第二章 本章从头到尾介绍一个真实的项目:"通过付款进行注册",以更好地说明PayPal帐户设置 ...

最新文章

  1. 在两个页面间翻转设置Animation动作的一些总结
  2. 【蓝桥杯】Python自带编辑器IDLE的使用教程
  3. 雷军正式入驻B站,或为小米新品直播带货做准备
  4. 【源码】基于MPPT算法的混合风能太阳能系统建模与仿真
  5. linux-redis设置密码
  6. 大数据可视化(七)复杂数据可视化
  7. Ubuntu16.04+智能车+YOLO
  8. java vm art 2.1.0_ART Runtime 创建(二)--启动参数
  9. linux下搭建游戏服务器运行环境
  10. 2017qq红包雨最强攻略
  11. python新手入门英语词汇_英语新手入门
  12. 2022年春招平均薪资曝光,程序员也羡慕了?
  13. 【计算机系统结构】~ MCU、AXI、IIC、SPI、GPIO、JTAG 接口、指令执行步骤、晶体与晶振的区别
  14. matlab 断层 体三维重建,利用Matlab实现原木CT断层图像的三维重建
  15. 007.UG_NX工程图功能
  16. syslog介绍(二):Linux下syslog基本配置
  17. 法硕备考教材如何选择?考试分析还是考试指南?
  18. vue 中 Promise 使用方法
  19. Ubuntu 安装libjpeg-turbo库
  20. emc存储设备型号_【EMC网络存储】EMC网络存储报价及图片大全-列表版-ZOL中关村在线...

热门文章

  1. 【BZOJ5249】【九省联考2018】—IIIDX(线段树)
  2. Java关键字---this的由来和其三大作用
  3. IntelliJ IDEA 2017 MySQL5 绿色版 Spring 4 Mybatis 3 配置步骤详解(二)
  4. Response.End(); 用HttpContext.Current.ApplicationInstance.CompleteRequest 代替
  5. 备份下ionic升级
  6. JavaScript学习(七十一)—call、apply、bind学习总结
  7. jsoup 获取html中body内容_JSOUP获取资源
  8. 为什么感觉农村人在城里工作后,大部分都变了?
  9. 早晨有好多学生在买早餐吃,这样好吗?家长不给孩子做饭吗?
  10. 请问!退休年龄到了,社保没交够,现在职,公司还可以继续交吗?