All Questions

Filter by
Sorted by
Tagged with
0 votes
0 answers
5 views

Subtracting preceding cumulative values from current value using SQL

I have the following table of distances: loc_id distance 2 1844 3 4781 4 12678 and would like to subtract the cumulative sum of the preceding distance rows. loc_id distance between_dist 2 1844 ...
user avatar
  • 111
0 votes
1 answer
10 views

Restore from Azure Storage DB to sqlserver 2014

I am trying to restore the Database from Azure Storage to Sql server 2014 but getting the error "TITLE: Microsoft SQL Server Management Studio An exception occurred while executing a Transact-SQL ...
user avatar
  • 101
1 vote
2 answers
14 views

Concurrency Control B-Tree between Hash

I am new to transaction. When I read the book "Transactional Information Systems", it is mentioned that B-tree uses key-range locking to guarantee serializability. Is that true all accesses ...
user avatar
  • 11
0 votes
2 answers
12 views

MySQL: For every Column, create if not exists?

I'm a student and am trying to create a column for my table, but only if it does not exist. I did come across a solution: SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA="...
user avatar
0 votes
0 answers
20 views

SQL Agent Job fails after upgrade to SQL 2017

I have upgraded a database to SQL 2017. A SQL Agent Job that previously ran now fails with this error: Unable to start execution of step 1 (reason: JobOwner DOMAIN\USERNAME doesn't have permissions ...
user avatar
0 votes
0 answers
11 views

postgres 11: remaining connection slots are reserved for non-replication superuser connections

I've run into the following problem. From time to time, my app receives remaining connection slots are reserved for non-replication superuser connections from postgres. It lasts for quite noticeable ...
user avatar
0 votes
0 answers
10 views

Troubleshooting why MySQL forcefully shut down

Apologies if this is not the right place to ask this. As of a few days ago my MySQL instance has started shutting down automatically. In the MySQL logs it looks like a graceful shutdown, which makes ...
user avatar
  • 101
0 votes
0 answers
22 views

Disk space is not released after compaction

We have deleted some of the partionons of some tables in cassandra database. But after the delete space was not recliamed becuase of size-tiered compaction . Manualy compacted tables with -s options. ...
user avatar
0 votes
1 answer
15 views

Postgres FDW: Is it possible to execute a foreign function in a foreign server after importing the foreign schema?

I imported a foreign schema using IMPORT FOREIGN SCHEMA. Now I'm able to access all the table content in that schema, but still unable to access any of the functions. Is it possible to execute a ...
user avatar
2 votes
1 answer
121 views

Logical reads and LOB logical reads

I have a query app scanning a whole table with a text field. The query is doing this many reads: Scan count 1, logical reads 170586, physical reads 3, read-ahead reads 174716, lob logical reads ...
user avatar
1 vote
0 answers
21 views

Enable Shared Memory Protocol (SQL Server PowerShell)

I`m trying to modify and use powershell script from docs.microsoft.com in order to enable SQL Shared Memory protocol on a remote server. But my issue is instead of connecting to provided ...
user avatar
1 vote
0 answers
11 views

Why this aggregate function cannot be converted with pg_upgrade from PostgreSQL 9.5 to PG 14.3?

I am trying to port old PostgreSQL v9.5 database (or family of databases) to PostgreSQL v14.3, with pg_upgrade utility. After many hassles with old v9.5 binaries, source files (had to be recompiled to ...
user avatar
  • 23
0 votes
0 answers
5 views

Cassandra Reaper best practices

First post here ... Specific question related to Cassandra Reaper. Looking at https://github.com/thelastpickle/cassandra-reaper it says that you can e.g. join the ASF Slack and the #cassandra-reaper ...
user avatar
0 votes
0 answers
24 views

Find which IP added a specific record

Let's say I have an SQL Server running on Azure and multiple applications add records to it. The problem is that some records come from an unknown application. Is there a nice way of finding which IP ...
user avatar
0 votes
0 answers
13 views

SQL Server Edition upgrade to import new license key stuck - over console

I currently rue the day when I decided to install SQL Server on a Windows Server without the desktop experience. Microsoft really did such a good job with SQL Server on Linux, in comparison, SQL ...
user avatar
  • 133
0 votes
1 answer
18 views

Partitioning vs Archiving Data for a specific use case

I'm not going to ask the difference between partitioning and archiving as there are countless of information out there on the net discussing them, and I have read the details of partitioning as ...
user avatar
0 votes
0 answers
12 views

Oracle 19c / Rman-10038: Database Session For Channel channel_name Terminated Unexpectedly

I am getting this error while database restore. This is the first time such an error has been getting from a process that has had no problems for a long time. Backup files are on NFS mount. Total ...
user avatar
0 votes
0 answers
9 views

SSIS package fails sometimes and works fine

We have a scheduled SQL Job which runs the SSIS package and process the files (Hourly Job, and 24 execution's daily). From past few weeks we are seeing minimum 2 failures in a day randomly, post ...
user avatar
0 votes
1 answer
15 views

logical replication initial phase

I am about doing replication for 16 millions record. Just want to ask about the initial phase of logical replication : Do I need to copy the initial table from publisher to subscriber first ? Or is ...
user avatar
  • 7
1 vote
1 answer
34 views

MySQL - archiving data in tables

I am a developer for an insurance app. We are using AWS RDS with a MySQL implementation. The scenario we would want is to automatically archive data from one table to another. Something like this: Let'...
user avatar
0 votes
1 answer
16 views

PostgreSQL size of used shared buffer vs actual result size

I am debugging a production issue where a regular index scan used in a join reports very high buffers usage (sometimes gigabytes) when inspecting using explain (analyse, buffers). Because it's reading ...
user avatar
1 vote
0 answers
13 views

Resume MySQL / MariaDB replication from master logs

Master server crashed and slave was running behind. I can not boot the master to resume the replication and retrieve the data lost. Is there a way to resume the replication directly from the log files?...
user avatar
  • 111
0 votes
0 answers
5 views

Azure Data Sync to On Prem Database

I have an Azure database that I am trying to sync to an onprem database. One way not bidirectional. I am only syncing 11 tables. Some of the tables have a million plus records in them and it seems ...
user avatar
2 votes
1 answer
27 views

Optimize a query multiple tables & Multiple conditions

I need to optimize the query which has multiple joins. And also with multiple OR AND conditions which varies depending upon the user input. The query which gets generated is: SELECT emp.name as ...
user avatar
-1 votes
0 answers
15 views

how to run ANALYZE VERBOSE with -j or in parallel

I have become the defacto DBA for a major version update 11 -> 14. Hosted on AWS. I saw one comment saying ANALYZE VERBOSE can be run with -j, but that seems odd as the command would have to be a ...
user avatar
1 vote
1 answer
27 views

Reinstalling server and SQL Server database

Due to some Windows issue, can't clean-up the WinSxS folder and the Disk Space process (cleanmgr.exe) makes the CPU going to 100% meaning that I am at 97% of disk usage, I am planning to reinstall the ...
user avatar
0 votes
0 answers
14 views

MySQL Lost Connection when Importing a dump file

I am working on a MySQL DB transfer (InnoDB tables) from a production server to a local development machine. The dump file is generated via phpMyAdmin and is about 1.6GB in size. The import process ...
user avatar
  • 11
0 votes
1 answer
37 views

SQL 2019 High Availability Stored proc issue on secondary server

I've just upgraded my High Availability environment from SQL 2017 to 2019 version 15.0.4236.7 I have same SQL Agent Jobs on both servers with a initial clause to determine if the job should run (if ...
user avatar
  • 186
0 votes
0 answers
35 views

Connect query from sp_whoisactive and Query Store

We have application which is returning result of sp_whoisactive every 1 minute. Is that any option to connect (join) results from sp_whoisactive and QueryStore ? I would like to add some stats from ...
user avatar
  • 307
0 votes
0 answers
9 views

How to consider special characters in ts_query and ts_vector as plain english

How to include special characters &, *, / in to_tsquery and to_tsvector . It converts boyce & doyl as {boyce:1 , doyl:1}. How to treat them as char so they can be searched in a query ?
user avatar
  • 1
0 votes
1 answer
24 views

How are HashAggregate row estimates calculated?

I have the following query: SELECT foo.* FROM foo WHERE foo."id" IN ((SELECT bar."id" FROM bar WHERE bar.user_id IN ( 100, 102 )) ...
user avatar
  • 207
0 votes
0 answers
12 views

How to limit database resources inside a Docker container?

Let's say we have a running container for a database service (MongoDB, PostgreSQL....). I want to limit some resources like memory or CPU usage. My question is, should I limit with the configuration ...
user avatar
  • 2,036
0 votes
0 answers
13 views

Why is a user randomly created in AWS RDS even though the permissions from any host (%) exist?

I have a MySQL database in RDS. There are separate users which are allowed to connect from anywhere. To be more precise, using MySQL Workbench there are different users listed in "Users and ...
user avatar
  • 1
-2 votes
1 answer
33 views

What does suspended, with wait time of 450 seconds on CXPACKET indicate?

I am monitoring the requests and sessions using dmv's. I am seeing a session that is having suspended status, which means it is waiting for something like IO. Yet the wait time is showing as 450000 ms ...
user avatar
  • 2,452
0 votes
0 answers
20 views

Can't cancel own query in AWS Aurora PostgreSQL 10.18 using pg_cancel_backend

I'm trying to cancel queries in AWS Aurora PostgreSQL 10.18 when logged in as not the master user, using pg_cancel_backend. However, when I run SELECT pg_cancel_backend(1234) say, then I get the error:...
user avatar
-1 votes
2 answers
38 views

What is the difference between request and session?

I am exploring the sql dmv's - sys.dm_exec_requests and sys.dm_exe_sessions I am observing that session_id that exist in sys.dm_exe_sessions doesn't exist in sys.dm_exec_requests. For example - In the ...
user avatar
  • 2,452
-3 votes
0 answers
21 views

implement a payment table for different types of services

In this app there are the following business rules: A personal trainer provides services These services can be Class or Plan type A plan can be subscribed for a certain number of time, having ...
user avatar
  • 1
0 votes
0 answers
19 views

How to convert correctly from datetime2 data-type to small date and to elliminate HH:mm:SS.000000 padding

I have created a table with a column with a date data type which correspond to a date data in yyy-MM-dd format. In the database it presents it as if the data type is datetime2(7). More generally all ...
user avatar
1 vote
3 answers
41 views

Can someone help explain the specifics of why a DBA would be against database clustering?

I'm a system admin and do not manage databases on a daily basis. My organization is considering database clustering to practically eliminate downtime for certain services. We use mostly oracle ...
user avatar
0 votes
0 answers
11 views

PL/SQL get the session ID (SPID) during a stored procedure on Oracle 19c

I'm trying to get the session ID (SPID) during a stored procedure on Oracle 19c. In Oracle 12c the following query was enough: select s.sid, p.spid, substr(s.username,1,20) MY_SCHEMA, s.terminal, p....
user avatar
  • 1
-1 votes
1 answer
24 views

Does differential backups and log backups contain users, roles and permission changes?

Full backup contains database users, roles and permissions. Does differential backups and log backups contain the above changes?
user avatar
  • 2,452
0 votes
1 answer
17 views

UNION types text and jsonb cannot be matched PostgreSQL

I have 3 tables on which I am trying to union all, one of the tables contains many jsonb columns. I am doing this query, CREATE OR replace view datasets_dashboard AS WITH core AS ( SELECT ...
user avatar
2 votes
2 answers
34 views

Is it possible to query total CPU load on system that is hosting SQL Server 2014+ Express?

I can get the available memory by querying the [master].[sys].[dm_os_sys_memory] view, but I haven't found anything similar for getting info about the CPU load. I only find info about querying CPU ...
user avatar
0 votes
0 answers
17 views

Duration different between mysql workbench and command line

When profiling a simple insert statement, I'm seeing a massive difference in duration reported between mysql workbench and the mysql command line. Test Setup CREATE TABLE test ( id int ) ...
user avatar
0 votes
1 answer
10 views

How to turn off autocomplete in PgAdmin4?

How do you turn off the autocomplete/help-tips in PgAdmin4? They're driving me insane. Every cursor movement and keypress causes a "Loading..." overlay to appear, which either displays ...
user avatar
  • 1,048
1 vote
1 answer
30 views

Is database development stages the same as software development?

In software development, there are a series of stages that it will goes through - Dev, Test, UAT, Staging, Demo and Production. This is what I feel is correct, after reading/researching through the ...
user avatar
  • 143
2 votes
1 answer
13 views

MySQL result set changes based on select list

So this is a bit weird as I've never had to deal with this issue before. I have a dataset with 4 basic joins to find the user who edited, created the record set. SELECT `tasks`.`id`, `tasks`.`title`, `...
user avatar
1 vote
2 answers
32 views

How to Update and Manage Millions of Databases

We are looking to shard our application, so that each customer has their own database. The data contents of all databases are different, but the structure is the same for all customers. Imagine there ...
user avatar
0 votes
0 answers
17 views

Developing SQL Server DML Audit Trail for Heavily Denormalized Staging Table?

Put simply, we (are forced to) rely upon a very large, heavily denormalized staging table that's typically about 20k records, 80+ fields that's overwritten at least 4-5x each business day for updates, ...
user avatar
0 votes
0 answers
39 views

The store schema does not contain the Element class SqlXmlCompressionOption

I hope you are all good I am doing or importing a bacpac file from azure SQL to SQL on-premisse with SSMS and I am receiving this error. Somebody get me help or give me a north Details Could not ...
user avatar

15 30 50 per page
1
2 3 4 5
1939