本文共 7201 字,大约阅读时间需要 24 分钟。
批量关停azure vm
In this new article, we will create a SQL Server Report using SQL Server Reporting Services from a SQL Server machine installed in an Azure Virtual Machine. We will show step by step how to connect from a local machine to a VM Azure Database and generate a SQL report.
在这篇新文章中,我们将使用Azure虚拟机中安装SQL Server计算机中SQL Server Reporting Services创建SQL Server报告。 我们将逐步展示如何从本地计算机连接到VM Azure数据库并生成SQL报告。
Open the SSDT for Business Intelligence or the Visual Studio and in the menu, go to File> New Project.
打开SSDT for Business Intelligence或Visual Studio,然后在菜单中转到“文件”>“新建项目”。
Select the Report Server Project Wizard.
选择报表服务器项目向导。
The Welcome to the Report Wizard message will be displayed. Press next.
将显示“欢迎使用报告向导”消息。 按下一步。
To connect to the Azure Database, press the Edit button.
若要连接到Azure数据库,请按“编辑”按钮。
The server name is the name of the Azure VM. In this example, the name of the VM is olapsqldan.cloudapp.net. This name can be found in the Azure Portal. You will need to specify the SQL Server account created on the VM machine (in the requirements). Finally, we will specify the Database name. In this example, the database name is the Adventureworks2014. You can use other database from your preference.
服务器名称是Azure VM的名称。 在此示例中,VM的名称为olapsqldan.cloudapp.net。 可以在Azure门户中找到该名称。 您将需要指定在VM计算机上创建SQL Server帐户(在要求中)。 最后,我们将指定数据库名称。 在此示例中,数据库名称为Adventureworks2014。 您可以根据自己的喜好使用其他数据库。
Once the connection information is specified, press next.
指定连接信息后,按下一步。
You will be asked the SQL Server credential again. Once entered, press OK.
系统将再次询问您SQL Server凭据。 输入后,按确定。
The design the query window is used to write the query. You can write the query manually, copy and paste from other tools like the SQL Server Management Studio (SSMS) or use the Query Builder to create the query with friendly UI tools. We will press the Query Builder button in this example.
设计查询窗口用于编写查询。 您可以手动编写查询,可以从其他工具(如SQL Server Management Studio(SSMS))复制和粘贴,也可以使用查询生成器通过友好的UI工具创建查询。 在此示例中,我们将按“查询生成器”按钮。
In the query designer, press the option to add a table.
在查询设计器中,按选项以添加表。
Select the Department table (or any table of your preference) and press the Add button.
选择“部门”表(或您偏好的任何表),然后按“添加”按钮。
Select the columns that you want to be displayed in the report.
选择要在报告中显示的列。
If you have T-SQL knowledge, you could modify manually the queries done in steps 10 and 11. If not, just go to the next window.
如果您具有T-SQL知识,则可以手动修改在步骤10和11中完成的查询。否则,请转到下一个窗口。
There are 2 options for the report type:
报告类型有2个选项:
Matrix, which will combine the information of rows and columns using dimensions. The number of columns depends on the results of the query.
矩阵,它将使用维度合并行和列的信息。 列数取决于查询结果。
In this example, we will use the Tabular option.
在此示例中,我们将使用“表格格式”选项。
You can separate or classify the reports in groups pages based on available fields. The next window will give us option to group the data and show which fields will be displayed. For example, we can create groups per groupname. In this example, we will use the default values and press next.
您可以根据可用字段将报告分为组页面或进行分类。 下一个窗口将为我们提供将数据分组并显示要显示的字段的选项。 例如,我们可以按组名创建组。 在此示例中,我们将使用默认值,然后按下一步。
There are some few default styles in the report wizard. Slate, Forest, Corporate, Bold, Ocean and Generic. If you do not like any of these default reports, you can customize the reports later. In this example, we will use the Corporate style, but you can choose any other option. Once the style is chosen, press Next.
报告向导中有一些默认样式。 板岩,森林,企业,粗体,海洋和通用。 如果您不喜欢这些默认报告中的任何一个,则可以在以后自定义报告。 在此示例中,我们将使用“公司”样式,但是您可以选择任何其他选项。 选择样式后,按下一步。
The Completing the wizard will display all the option chosen. You can review and verify that the Datasource, connection string, report type, layout type, style, details and the query are OK. Additionally, you can check the Preview report option to see a Preview of the report directly. In this example, we are going to enable this option. Once selected, press Finish.
“正在完成”向导将显示所有选择的选项。 您可以查看并验证数据源,连接字符串,报告类型,布局类型,样式,详细信息和查询是否正常。 此外,您可以选中“预览报告”选项以直接查看报告的预览。 在此示例中,我们将启用此选项。 选择后,按完成。
In this example, we are using the SQL Authentication to connect to the VM Azure Database. The report will ask the credentials of the step 5. Once the SQL login and the password is specified, execute the report.
在此示例中,我们使用SQL身份验证连接到VM Azure数据库。 该报告将询问步骤5的凭据。一旦指定了SQL登录名和密码,请执行该报告。
Once finished, you will have your report ready. You can edit, export to pdf, word, Excel or other formats of your preference.
完成后,您将准备好报告。 您可以编辑,导出为pdf,word,Excel或您喜欢的其他格式。
As you can see, once you can connect to the VM in Azure the process to create local reports is very simple. You can work as a local database. The Internet speed will make the difference. If you need to work with large reports and your Internet connection is not fast enough, it can be a problem. However, besides the internet speed, you do not have restrictions. You can create charts, maps, KPIs or any other feature of your preference.
如您所见,一旦可以连接到Azure中的VM,创建本地报告的过程就非常简单。 您可以作为本地数据库。 互联网速度将有所作为。 如果您需要处理大型报表,并且Internet连接速度不够快,则可能会出现问题。 但是,除了互联网速度外,您没有任何限制。 您可以创建图表,地图,KPI或您喜欢的任何其他功能。
Once you have the connection to the Azure VM, the process to create reports is the same as a simple local report.
连接到Azure VM后,创建报告的过程与简单的本地报告相同。
翻译自:
批量关停azure vm
转载地址:http://qyiwd.baihongyu.com/