Forum Discussion
How can I create a table in Power BI Datamart using SSMS?
Hi HamidBee
Before you create a table in SSMS, please make sure you have CREATE TABLE permission in the database. You can check it using the below T-SQL statement, 1 in the output means, you have the permission to CREATE TABLE in the DemoDB database.
SELECT HAS_PERMS_BY_NAME ('DemoDB', 'DATABASE', 'CREATE TABLE');
And you can click the link below and search for GRANT CREATE TABLE To, in order to grant this permission.
Giving and removing permissions in SQL Server (mssqltips.com)
How to create a table using SQL Server Management Studio (mssqltips.com)
Best Regards,
Community Support Team _ xiaosun
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi v-xiaosun-msft,. I tried running the query:
SELECT HAS_PERMS_BY_NAME ('DemoDB', 'DATABASE', 'CREATE TABLE');
I recieved the following:
I guess '0' means that I do not have permission so I tried to grant permission by using this query:
GRANT CREATE TABLE TO admin_user;
but I recieved the following:
Cannot grant, deny, or revoke permissions to sa, dbo, entity owner, information_schema, sys, or yourself.
One thing I did notice is that the tables appear under 'System Views':
I'm really not sure what to do. Any help would be greatly appreciated.