-1

I am following the instruction in Microsoft Learn Page

https://learn.microsoft.com/en-us/learn/modules/understand-the-sql-dw-connector-with-azure-databricks/5-create-tables-perform-queries

As I copy and execute the SQL queries in Azure Data Studio, it said it has syntax error

You can refer the code in the above link and the result in the below picture

enter image description here

Thanks for your help

Lukasz Szozda
  • 162,964
  • 23
  • 234
  • 275
  • 1) Are you really trying to create table using `master` database 2) Is it Azure SQL DB/Azure Datawarehouse? – Lukasz Szozda Dec 29 '19 at 06:55
  • Hi David Chan, If my answer is helpful for you, please mark(accept) it as answer( click on the check mark beside the answer to toggle it from greyed out to filled in.). This can be beneficial to other community members. Thank you. – Leon Yue Dec 31 '19 at 08:41

2 Answers2

0

You can not create tables in master database. You have to select the data warehouse database.

Kalum Umesh
  • 105
  • 1
  • 2
  • 8
0

I searched a lot and found that if you want to create table in master DB, the user must be the dbcreator role.

Reference:How to fix "CREATE DATABASE permission denied in database "master" ?

But for Azure SQL database and SQL Data Warehouse, the dbcreator role is not supported. We can not create table in master db, even with ServerAdmin.

You could reference:

  1. Server-Level Roles
  2. Database-Level Roles

Hope this helps

Leon Yue
  • 15,693
  • 1
  • 11
  • 23