I am trying to integrate Azure SQL Server with Zapier. To do so I need to set permissions for the Zapier IP address.
When I run the following query
GRANT SELECT, INSERT ON db_name.test TO "zapier"#"54.86.9.50" IDENTIFIED BY "Password";
I get the following error
SQL Error [102] [S0001]: Incorrect syntax near 'zapier'
I have already tried [username]#[ip address] and that did not work either.
Could someone help me resolve this? Thanks a lot!
Hi as it saying syntax error try giving single quotes 'zapier'
GRANT SELECT, INSERT ON db_name.test TO 'zapier'#'54.86.9.50' IDENTIFIED BY 'Password';
Related
I am working on this MS Azure article: Connect to and manage Azure Synapse Analytics workspaces in Azure Purview. But in Grant permission to use credentials for external tables section of the article, when I run the following query, I get the error shown below:
SQL:
GRANT REFERENCES ON DATABASE SCOPED CREDENTIAL::[mySynapseWorkspace] TO [myPurviewAccountName];
Error:
mismatched input 'SCOPED' expecting ':'
Question: What may be a cause of the error, and how can we fix it?
I learn from a similar issue logged that you should be providing your credential name and username instead.
Try,
GRANT REFERENCES ON DATABASE SCOPED CREDENTIAL::[your_credential_name] TO [your_username];
I am trying to connect snowflake using python connector but i am facing problem while connecting to a specific role. even i have access to that role at snowflake web application but i am not able to connect with that same role using python connector. i am only able to connect with PUBLIC role.
I am using following script:
conn = snowflake.connector.connect(
user=USER,
password=PASSWORD,
role=ROLE,
account=ACCOUNT,
warehouse=WAREHOUSE,
database=DATABASE,
schema=SCHEMA,
autocommit=False
)
I am getting following error:
DatabaseError: 250001 (08001): Failed to connect to DB:
account_name.east-us-2.azure.snowflakecomputing.com:443. Role
'ANALYST_ROLE' specified in the connect string does not exist or not
authorized. Contact your local system administrator, or attempt to
login with another role, e.g. PUBLIC.
Here are some hints:
In Snowflake Role names are case sensitive. Maybe you have some quoting issues in your original code, i.e. please check your '', "", lower- or uppercase or simply use the original role name without some quotation marks.
Maybe the role has not enough privileges to operate on your db/schemas and thus it says "not authorized".
You can try to add the role manually before: Account -> Roles
I caught the error, I just made a very slight mistake(single character mistake) in my role name. due to very large name, i could not see it. I am able to connect now.
the role name mentioned here is fake for security reason so don't assume that.
When I try to create a local account w/ a username of "test#mydomain.com" I get:
http://localhost:4343/#error=server_error&error_description=AADB2C90161:+A+self-asserted+send+response+has+failed+with+reason+'Internal+Server+Error'.
Correlation+ID:+cb299c64-219b-4870-9b4e-7c85fbbd2ae3
Timestamp:+2018-02-20+21:05:54Z
&state=9ac8534f-ad75-46c1-94a8-514a71acc6bb
I've wired up App Insights and I can see the "Internal Servier Error" but there is so much noise I can't pinpoint the problem.
Why can't I register w/ a username like that?
How do I interrupt the app insight log to track down my issue?
Note: I'm using custom policies if that matters.
Answer for the first question is that a sign-in name of type "userName" can't contain the '#' character in the value property.
i.e. You can't set it to an email address.
How can I build connection string for connecting to Azure SQL Database using Azure AD account?
Currently, I am using the following but it does not seem to be correct. It does not use Authentication Type: Active Directory Password.
Part of PowerShell script I am using:
server=$Server.database.windows.net;initial catalog=$Databasename;Authentication=Active Directory Password;Integrated Security=False;uid=$Username;password=$Password
I really appreciate your help.
I managed to resolve the issue; It was actually the order of properties.
The following connection string worked
Data Source=$Server.database.windows.net;initial catalog=Master;User ID=$Username;password=$Password;authentication=Active Directory Password
However, this does not work
Data Source=$Server.database.windows.net;initial catalog=Master;authentication=Active Directory Password;User ID=$Username;password=$Password
The only difference is the order of "Authentication" tag.
I never thought order of properties matter in ConnectionString.
In the example, they use this format:
Data Source=n9lxnyuzhv.database.windows.net;
Authentication=Active Directory Password;
Initial Catalog=testdb;
UID=bob#contoso.onmicrosoft.com;
PWD=MyPassWord!";
So try to use PWD instead of Password.
While trying to perform connection/refresh for a facebook connection created using unification engine I am encountering the below error:
{"Status":{"facebook_111XXXXX":{"status":502,"info":"Missing client_id parameter."}}}
Here, The original connection id is replaced with facebook_111XXXXX for obvious reasons.
The payload I am passing is {"uri":"unified://facebook_111XXXXX"} to https://apiv2.unificationengine.com/v2/connection/refresh
Please advise what I am doing wrong here. Appreciate your help in advance!
Thanks & Best Regards,
A.P
You have to specify the client id and secret of facebook app, when the connector is added to your app in unificationengine developer portal.