1
votes

I would like to set up Snowsql client so I can connct for the first time and run commands like PUT.

I dont know where to find exacte values of :

accountname = xxxx
username = xxxx
password = xxxx

When I run following command from Windows command prompt :

C:\Users\noureddine.ettalhi>snowsql -a ettalhi -u ettalhi
Password:
250001 (08001): Failed to connect to DB. Verify the account name is correct: ettalhi.snowflakecomputing.com:443. HTTP 403: Forbidden
If the error message is unclear, enable logging using -o log_level=DEBUG and see the log to find out the cause. Contact support for further help.
Goodbye!

It kept saying the mentioned error. so what value should I give for account ?

where are the steps to follow to use SnowSql for the first time ?

Thanks.

3

3 Answers

0
votes

The account name is a part of the URL used to access your snowflake account, in my case it is vq985xx.ca-central-1.aws since my URL is https://vq985xx.ca-central-1.aws.snowflakecomputing.com

This is explained in snowflake documentation , link : https://docs.snowflake.net/manuals/user-guide/getting-started-tutorial-log-in.html#step-1-log-into-snowsql

0
votes

Since you are using snowsql client you may also create profiles in the config files located at .snowsql/config

[connections.MY_DEV]
accountname = myco.us-east-1
username = myuserid
database = mydb
role = mydb_admin
schema =  myschema
warehouse = my_WH

Once you have set up a profile this then you can specify the snowsql -c My_DEV will prompt for password .. just another way

-1
votes

To get accountname use CURRENT_USER() function that will return account name that you need to combine with region segment from this page https://docs.snowflake.net/manuals/user-guide/getting-started-tutorial-log-in.html#step-1-log-into-snowsql.