Rest API

Technical Article

Powershell Script - Azure cosmos DB(SQL API)

  • Script

Scripts contains 4 following functions. Users can create 3 different script from this for inserting, fetching and deleting a document.
1. Function Generate-MasterKeyAuthorizationSignature - This function is used to create connection to Azure cosmos DB. This function codes were taken from Technet.
2. Function Post-CosmosDb - Insert single document in azure cosmos DB. Same function can be used to perform bulkinsert. This function code was taken from following article. To make it useful i made some modification in it.
(https://www.systemcenterautomation.com/2018/06/cosmos-db-rest-api-powershell/)
3. Function Get-CosmosDocument - Fetch single document from azure cosmos DB. Same function can be used to fetch all documents from Cosmos DB.
4. Function Delete-CosmosDbDocument - Delete single document from cosmos DB. Same function can be used to delete more than one document with some additional codes.

To use any of the function like Post,Get, Delete. you have to comment the other 2 function call. If you are using all 3 functions(Post,Get, Delete), Be cautious while using them.

You rated this post out of 5. Change rating

2020-05-11 (first published: )

2,485 reads

Technical Article

Use bit data type for boolean?

  • Topic

A few things here regarding using the BIT data type for booleans.1) Storage Space? I would guess that SL server still has to use at least a byte - or prolly more to store a "bit".  This applis to disk and memory.2) I prefer using a char(1) and setting it to 'Y' or 'N'.  Everyone […]

2005-04-15

1 reads

Technical Article

Side-by-side installation problems

  • Topic

I have SQL Server 2000 and I recently installed SQL Server 2005 Beta 2 as side-by-side installation. Now nothing seems to work. In SQL Server 2000, - Service Manager can't find the file specified. When I click on refresh services, I get "The system cannot find the specified file" - Enterprise Manager: When I start […]

You rated this post out of 5. Change rating

2005-04-13

Technical Article

Local Time Issue

  • Topic

Good evening,I have a store procedure that returns result to users around the places such as China, England, US and etc....  These users access our sqlserver through terminal server.  When they execute the procedure, they all see the same result because the time is our sqlserver's time.  My task is to return the correct result […]

2004-07-08

Technical Article

RE: bulk insert fails when used with unc path

  • Reply

both the format file and delimited files are in BISMILLAH database is on another machine (BISMILLAHSERVER) bulk directory is shared and full control for everyone i can access (using windows explorer or start->run)the '\\BISMILLAH\bulk\format.txt' file from all other machines on the network. when i access the file using windows explorer or start->run, windows 2000 audting […]

You rated this post out of 5. Change rating

2004-06-05

Blogs

Real-World SQL Mastery: Your Hands-On, Mess-Free Sandbox

By

Are you ready to take your SQL skills from theoretical to tactical? If you've...

Set a Runtime Variable in an Azure DevOps Pipeline

By

Note: I DO NOT recommend this. Any changes to a pipeline should be in...

A New Word: Symptomania

By

symptomania – n. the fantasy that there’s some elaborate diagnosis out there that neatly...

Read the latest Blogs

Forums

7 sept, scheduled book

By philip.scott

Comments posted to this topic are about the item 7 sept, scheduled book

7 sept, schedlued article

By philip.scott

Comments posted to this topic are about the item 7 sept, schedlued article

6 sept, published book

By philip.scott

Comments posted to this topic are about the item 6 sept, published book

Visit the forum

Question of the Day

Azure Data Lake Storage Gen 2

Azure Data Lake Storage Gen 2 is built on ...?

See possible answers