Sielnix / EFCore.Snowflake

Entity Framework Core provider for Snowflake
GNU Lesser General Public License v3.0
31 stars 2 forks source link

With code first can't connect to the snowflake and create the tables #13

Open joaopalma5 opened 1 week ago

joaopalma5 commented 1 week ago

hello,

i'm trying connect my .net core web api to snowflake. if I put the connection string like: var connectionString = "account=user;host=userHost.snowflakecomputing.com;user=SQLCLIENT;password=Password2025!;db=DATABASEEXP;schema=DATA;Warehouse=WHEXP";

---> Snowflake.Data.Client.SnowflakeDbException (0x80004005) : warning : Snowflake Internal Error: Unable to connect SqlState: 08006, VendorCode: 270001, QueryId ---> Snowflake.Data.Client.SnowflakeDbException (0x80004005) : warning : The requested warehouse does not exist or not authorized. SqlState: 08006, VendorCode: 390201, QueryId:

var connectionString ="account=user;host=userHost.snowflakecomputing.com;user=SQLCLIENT;password=Password2025!;db=DATABASEEXP;schema=DATA`` fail: Microsoft.EntityFrameworkCore.Database.Command[20102] Failed executing DbCommand (110ms) [Parameters=[], CommandType='Text', CommandTimeout='60'] CREATE DATABASE "DATABASEEXP"; System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.AggregateException: One or more errors occurred. (Error: SQL access control error: Insufficient privileges to operate on account 'QM74248' SqlState: 42501, VendorCode: 3001, QueryId: 01b857dc-0000-6ae8-0000-00010fbe9055)

You can help on this first steps? Thank you

joaopalma5 commented 1 week ago

After try with a user that I created when signup the issue it's solved... So it's question of grants.

You kow the grants needed?