Questions tagged [sql-server-azure]

10 questions
1
vote
3 answers

How to use min() together with other column in SQL

I am building an application consisting of an SQL backend and several microservices that communicate with this backend. I am trying to get as little data as possible from the database over the wire so I am trying to fetch the exact records so I…
noob
  • 13
  • 4
0
votes
0 answers

ODBC Driver 18 for SQL Server]Datetime field overflow. Fractional second precision exceeds the scale specified in the parameter binding. SqlState22008

I'm trying to insert TimeStamp Value into AzureSQL Server's DB table using ODBC driver 18 and I have set ODBC version as 3.0(SQL_OV_ODBC3). However I am getting below error [Microsoft][ODBC Driver 18 for SQL Server]Datetime field overflow.…
0
votes
0 answers

Best way to reclaim space when removing unnecessary bytes from varbinary column

I have a SQL Server Azure table which has grown to about 300 gigs. The table has about 100,000 rows. The table holds uploaded [content] as varbinary in one of the columns. The app that uses this table has been updated so that the data is now stored…
Greg Gum
  • 33,478
  • 39
  • 162
  • 233
0
votes
1 answer

Only members of the sysadmin fixed server role can perform this operation. Azure SQL Server Database vs SQL Server Database

I am moving from the "Classic" SQL Server Database On-Premise to Azure SQL Server Database, Unfortunately, One of the procedures that I used to execute is not working for Azure SQL Server Database: EXEC sp_removedbreplication "Database Name" Got…
0
votes
1 answer

How to create index to optimize a "Key Lookup"

I have an SP which on first run, can run for over a minute. On second run, it takes less than a second. To fix, I check the Execution Plan which shows this: So I add the following index, which as far as I know should create an index so it doesn't…
Greg Gum
  • 33,478
  • 39
  • 162
  • 233
0
votes
1 answer

Exclusive User ownership on sql server tables

Requirement: User who created tables in a particular schema, should own the tables, other users who got access to that schema should not able to perform any action on that table(including read). Example: Tables created by ‘User1’ in ‘Schema1’…
Venk AV
  • 67
  • 1
  • 10
0
votes
0 answers

The error: "Index was outside the bounds of the array" at SQL Server 2014 on Azure with new SSMS?

Index was outside the bounds of the array While it may seem to be answered already, I have found only the solutions like "install the new SSMS", or new patch to SQL Server 2008... I my case, I am using SQL Server 2014 installed on Azure…
pepr
  • 20,112
  • 15
  • 76
  • 139
0
votes
2 answers

How to change a column of JSON array of objects to object in SQL Server

I am working on a SQL table with a column with JSON value. Each row of that column is string value in JSON structure. This JSON structure is always one array that contains one or more objects of one item. The number and key words of objects can…
Yong Jun Kim
  • 374
  • 5
  • 15
0
votes
1 answer

Optimizing Stored Procedure Query

See below stored procedure. It is in use by an app which does searches takes user input for orders and displays them. Most of the time, it returns the expected results in a few seconds. However, when a specific vendor is searched for, it returns…
Greg Gum
  • 33,478
  • 39
  • 162
  • 233
-2
votes
1 answer

SQL PERFORMANCE - alternative to OR statement

I am trying to optimize this sql query and I see it's using tons of OR statements throughout it, particularly again and again with the same parameter. I see if I comment out the heaviest use of it, execution time reduces by 150%. the part I…
Lizi
  • 93
  • 16