I need to connect a Snowflake database to DB Schema. DB Schema is asking for the JDBC URL. Where can I find this in snowflake?
you should find it’s documented here: https://docs.snowflake.com/en/user-guide/jdbc-parameters.html
If you are referring to this:
"jdbc:snowflake://--accountname--.snowflakecomputing.com/
you can find your Snowflake account URL by running this SQL:
use role accountadmin;
select system$whitelist();
Your Snowflake account URL will is as follows:
{"type":"SNOWFLAKE_DEPLOYMENT","host":"xxxxxxx.snowflakecomputing.com","port":443}
I don't have enough points to comment, so I'll steal from the best answer here IMO. system$whitelist is deprecated. The correct command is:
use role acountadmin;
select system$allowlist();
I've been pulling my hair out for an hour trying to get the correct JDBC URL into Datagrip.
Related
I have access to the apex admin but i could not recall the database name under which the apex url is running.
Is there any way to get the database name from apex url
If you have access to Apex Admin, I guess you also have access to (at least) one of workspaces. If not, you can always create one for you.
So:
pick any of those workspaces
connect as a developer
go to SQL Workshop's SQL Commands
run the following statements; at least one should work and reveal that information
select * from global_name;
select sys_context('USERENV', 'DB_NAME') from dual;
select name from V$database;
The apex url does not contain any information about the database name. Apex uses ORDS to map the http request to a database call and it is in the ORDS configuration file that that the database information is entered (hostname, port, service_name, username)
Is there any way to check the user name who created the table in snowflake database.
To previous questions in stack over flow some one suggested below query.
How to find the user who created a table in Snowflake
but I am unable to run the query, showing below error
Error: SQL compilation error: Shared database is no longer available for use. It will need to be re-created if and when the publisher makes it available again.
After gone through some documentation in snowflake I understood it need share access
Please let us know if this share access can be granted to every end user to find the user name who created table ? is it recommended to grant to users.
if so how to grant access to user
or is there any alternative way to get this information.
Regards,
Srinivas
Run the following command to find your current role:
select current_role();
Then ask your account admin to grant access to the SNOWFLAKE database:
grant IMPORTED PRIVILEGES on database snowflake to role your_role_name;
You can try information Schema. If you have access to that database then you should be good.
select user_name,query_text,*
from table(information_schema.query_history())
where contains(lower(query_text),'<your table name>')
and query_type = 'CREATE_TABLE'
order by start_time;
I am getting the below message:
AWS_ROLE credentials are not allowed for this account.
I am trying to execute the below command to create a stage and the execute a book from my files in S3 to a table into my data warehouse.
use schema mydb.[myschema];
create stage mystage
url='s3://my-bucket'
credentials = (aws_role = 'arn:aws:iam::[]:role/myrole')
encryption=(type='AWS_SSE_KMS' kms_key_id = 'aws/key');
Based on the information in the comments I would recommend these changes that by good practice can be done from the suggest:
GRANT CREATE STATE ON WAREHOUSE <your_warehouse> TO ROLE aws_test;
This is based on the IAM role setup here
Let me know if that helps?
The option 2 is not allowed when the snowflake root account is created in Azure. This answer came to me through the Snowflake support. I then requested them to update the documentation and for me I am using the user and secret key for a while. https://docs.snowflake.net/manuals/user-guide/data-load-s3-config.html
Anyone knows how to get the "logical server" create time? I'm unable to find this in any Azure cmdlet.
You could get it from Activity log.
Update:
Activity log is limited to 90 days. Another way you could find Deployments templates in Azure Portal.
In SQL, you could use following sql query to get creation data.
SELECT name, database_id, create_Date, compatibility_level FROM sys.databases
Please check this link.
Folks, please excuse my lack of knowledge in this area, it's something I've been tasked with fixing, but haven't had much luck with..
I've got a server, with SQL Server 2008 R2 installed, it's the default isntance, and I can see that the SSIS service is installed and currently running.
The issue I have is that, none of the SSIS roles described on this page:
http://msdn.microsoft.com/en-us/library/ms141053.aspx
Are present in the server roles subsection of security... How do I make these available, or perhaps, why are they missing?...
Thanks in advance,
Dave
The roles db_ssisadmin, ds_ssisltduser and db_ssisoperator can be found within the system database msdb. Refer screenshot #1.
Refer the following link for answer mentioned in http://social.msdn.microsoft.com:
SSIS Package Roles - Assigning user to Role
Answer excerpt from social.msdn.microsoft.com:
These are just roles in the msdb database.
To assign the user to the role, you need to have the login as a user in
that database and assign the role as usual (i.e. go through the gui to
set the roles of the user or use T-SQL to set them).
USE msdb;
GO
EXEC sp_addrolemember N'db_dtsltduser', N'{User Name Here}';
GO
Hope that helps.
Screenshot #1: