0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

【Azure】Azure LearnのSQLデータベースを作成するをやってみた

Posted at

はじめに

執筆者は元々AWSを勉強していたのだが、諸事情でAzureを勉強する必要が出て来た。Azureに関する記事がAWSより少ないと思うので、Azure Learnでやったことをスクリーンショット共に備忘録として残したい。

手順

リソースの作成を選択する。
スクリーンショット 2020-11-22 18.27.57.png
SQL Databaseを選択する。
スクリーンショット 2020-11-22 18.29.18.png

データベース名をdb1と入力する。

サーバーは新しいものを作るため新規作成を選択する。右の新しいサーバーのところで以下の内容を入力する。できたらOKを選択する。

設定
サーバー sqlservernnnn (一意である必要があります)
サーバー管理者のログイン sqluser
Password Pa$$w0rd1234
場所 (米国) 米国東部

スクリーンショット 2020-11-22 17.59.14.png
サーバーが作成できたら、次: ネットワークを選択する。
スクリーンショット 2020-11-22 18.17.07.png
接続方法をパブリックエンドポイントにする。
スクリーンショット 2020-11-22 18.06.26.png
追加設定を選択し、既存のデータを使用しますをサンプルにする。確認および作成>作成を押下する。
スクリーンショット 2020-11-22 18.11.28.png
すべてのリソースを選択する。
スクリーンショット 2020-11-22 18.27.57.png
データベースが作成されているか確認する。
スクリーンショット 2020-11-22 18.25.49.png
db1に移り、下記の先ほど作成した管理者名とパスワードを入力しOKを押下する。

設定
サーバー管理者のログイン sqluser
Password Pa$$w0rd1234

そうするとエラーが出るので、サーバーファイアウォール設定に移る。
スクリーンショット 2020-11-22 20.48.16.png
クライアントIPアドレスの追加を選択する。
スクリーンショット 2020-11-22 20.49.43.png
自分のIPが開始IPと終了IPに追加されているか確認する。確認されたら保存を選択する。
スクリーンショット 2020-11-22 20.52.01.png
もう一度下記の管理者名とパスワードを入力し、OKを押下する。

設定
サーバー管理者のログイン sqluser
Password Pa$$w0rd1234

スクリーンショット 2020-11-22 18.41.22.png
エディター ウィンドウに次のクエリを入力し、実行を選択する。

SELECT TOP 20 pc.Name as CategoryName, p.name as ProductName
FROM SalesLT.ProductCategory pc
JOIN SalesLT.Product p
ON pc.productcategoryid = p.productcategoryid;

スクリーンショット 2020-11-22 21.00.27.png
クエリが成功していることを確認する。
スクリーンショット 2020-11-22 21.00.43.png

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?