trying to insert data into cosmo db but while trying to verify in connection string getting error as shown in figure,
After my test,I reproduce your issue when I try to configure the AccountName to be my cosmos db table api.
Based on this official statement, The UI based Data Migration tool (dtui.exe) is not currently supported for Table API accounts.
You could try to use command-line Azure Cosmos DB Data Migration tool (dt.exe).
If I connected to Cosmos DB SQL API, everything was fine.
Hope it helps you.
You should also pay attention to the domain in you "AccountEndpoint" string. Azure portal gives "AccountEndpoint" in "Connection String" section of "Azure Cosmos DB account" service and it looks like https://$YOUR_ACCOUNTNAME.table.cosmos.azure.com:443/. If you try to work with this endpoint in dt.exe - you'll get the described error. In case if you replace "table.cosmos.azure.com:443/" with "documents.azure.com:443/" - you'll pass the verifying successfully. This trick with domains and non-informative error have wasted 1 hour of my only life.
Related
I currently have an Azure SQL data warehouse and I'd like to enable caching so that intensive queries run faster in the database with the following code:
ALTER DATABASE [myDB]
SET RESULT_SET_CACHING ON;
However, no matter how I try to run this query I get the following error:
Msg 5058, Level 16, State 12, Line 3
Option 'RESULT_SET_CACHING' cannot be set in database 'myDB'.
I am running the query based on Azure's documentation here: https://learn.microsoft.com/en-us/sql/t-sql/statements/alter-database-transact-sql-set-options?view=azure-sqldw-latest
I have tried running this query both in the master database and in the underlying one called myDB. I have also tried using commands such as:
USE master
GO
With no avail. Has anyone had success in enabling caching on Azure? Please let me know!
Screenshot of error and command below:
https://i.stack.imgur.com/mEJIy.png
I tested and this command works well in my ADW dwleon, see the bellow screenshot:
Please make sure:
Login you Azure SQL data warehouse with SQL server Admin account.
Run this command in master db
Summary of the document:
To set the RESULT_SET_CACHING option, a user needs server-level
principal login (the one created by the provisioning process) or be a
member of the dbmanager database role.
Enable result set caching for a database:
--Run this command when connecting to the MASTER database
ALTER DATABASE [database_name]
SET RESULT_SET_CACHING ON;
Hope this helps.
I want to migrate the data from Cosmos Table API to a json file.
I have copied the PRIMARY CONNECTION STRING from the portal and this is the command I am trying to run from using the migration tool:
dt.exe /s:DocumentDB /s.ConnectionString:"PRIMARY CONNECTION STRING" /s.Collection:application /t:JsonFile
OR:
dt.exe /s:DocumentDB /s.ConnectionString:"PRIMARY CONNECTION STRING;Database=TablesDB" /s.Collection:application /t:JsonFile
and I receive this error:
Critical error: DocumentDB account end-point URL should be provided as part of the connection string
What am I missing?
Critical error: DocumentDB account end-point URL should be provided as
part of the connection string
Based on this error,the account url is lack in the connection string.You could follow the example from this link:
dt.exe /s:JsonFile /s.Files:.\Sessions.json /t:DocumentDBBulk
/t.ConnectionString:"AccountEndpoint=;AccountKey=;Database=;"
Please check the AccountEndpoint= in your connection string and try again.
I am getting this error No default service level objective found of edition "GeneralPurpose" in SSMS when creating database in Azure SQL
Please download the latest SQL Server Management Studio version from here. Version 18.0 has many fixes related to Azure Managed Instances.
It is a limitation of the free subscription you are using at this time. ""'Free Trial subscriptions can provision Basic, Standard S0 through S3 databases, up to 100 eDTU Basic or Standard elastic pools and DW100 through DW400 data warehouses"
You can also try to create the database using T-SQL as shown below.
CREATE DATABASE Testdb
( EDITION = 'Standard', SERVICE_OBJECTIVE = 'S3' );
GO
In my case it was because I had wrong connection string in my app settings(.NET).
To find your connection string you need to go to your db on azure and in overview you need to find "connection string".
I am testing out developing an Azure Function to read the change feed of a Cosmos DB database. I have created such a function from the Azure portal, but I would like to use VS or VS Code to do so. I have my environment set up using v2.0.3 of the Azure Function Core Tools, but when I try to test the function, I get the following error:
[10/9/2018 4:33:34 PM] Error indexing method
'Functions.workordersTrigger'
[10/9/2018 4:33:34 PM] Microsoft.Azure.WebJobs.Host: Error indexing
method 'Functions.workordersTrigger'.
Microsoft.Azure.WebJobs.Extensions.CosmosDB: Cannot create Collection
Information for workorders in database htm with lease wo_leases in
database htm : Entity with the specified id does not exist in the
system.
Both collections "workorders" and "wo_leases" exist in the db. If I just create a function with a simple HTTP trigger, it works fine, and I can debug in VS Code. It seems to be an issue with the CosmosDB trigger. Can anyone point me in the right direction?
The error message appears if:
Any of the collections do not exist in the target account within the specified database
Your account has a Firewall rule (either Virtual Network or IP rules) that block access to your current workstation.
For #1, verify if the Connection String is pointing to the correct account and that you can see the collections exist within the database (for this you can use the Azure Portal or browse Cosmos Explorer with your connection string).
For #2, verify in the Account there is a rule blocking your access. You can either disable the Firewall rule or add your current IP address (there is a quick link for that in the Portal).
I have an SQL database in Azure that I use with my API. I can access the database from SQL Server Management Studio, and it seemto be alright - I can select data, make modifications and whatever. Although, I can't access it from Azure Portal.
It doesn't appear when I list all resources in the Azure portal
When I select the database server from Azure Portal, I can see it under the list of available databases. When I click the specific database, I get the following error message:
"This resource was not found, it may have been deleted. /subscriptions/aee8966e-5891-40fb-8fff-8c359f43baee/resourceGroups/TestResourceGroup/providers/Microsoft.Sql/servers/testdbserver/databases/testdb"
Any ideas?
Update 2018-05-16:
Jerry Liu suggested renaming the database, so I logged into SQL Server Management Studio, and this is what I found:
I wasn't allowed to rename any of the databases on the server using right click --> Rename. The option is disabled.
ALTER DATABASE carbonate_prod_180508 Modify Name = carbonate_renamed;
Running this command, I get the error message "The source database 'carbonate_prod_180508' does not exist.". But I do see the database listed in the Object Explorer.
I also tried renaming it using Azure CLI. I find the database using "az sql db list" with the resource group name and server name, but when i run "az sql db rename" I get an error message stating the database was not found.
If you have done some operation like delete and recreate with same name or just move to another resource group, please wait a while for the operation to work completely.
Or if you have done nothing related, please try to rename your database in Management Studio and visit portal to check whether it's "back".
How to Rename SQL DB
Two methods for you to try
Click on database name twice slowly, or click once and push F2, just like we rename a file locally on Windows.
Create query on master database to execute alter operation.
Wait for about 30 seconds and refresh portal.
If none of them works, I recommend you to new a support request to Azure Team. It's the last blade in your Azure sql server panel.