All Questions

Filter by
Sorted by
Tagged with
0 votes
1 answer
49 views

How to map the newly created records in parent table with the child table?

have a table Employees Id Name EmployeeType_ID 1 John 1 2. Mathw 2 EmployeeTypes Id TypeName 1 Perm 2. Temp 3. Regular Now I am copying data from one server to ...
user avatar
0 votes
1 answer
16 views

Can I put MariaDB's tmpdir inside it's datadir on Centos 6?

We have separate disks on our Centos 6 machine A smaller one for our / and system folders, A larger one for /home/mainuser Currently MariaDB has the settings datadir=/home/mainuser/mysql tmpdir=/tmp ...
user avatar
  • 123
0 votes
0 answers
20 views

RMAN ORACLE issue

I have the issue when I run the command RMAN as mentioned below : Please any help
user avatar
  • 1
0 votes
1 answer
35 views

Simple join on large table is very expensive

I have two tables, a (id, timestamp) and b (id, value). They have equivalent number of rows (in fact b is materialized view of a and several other tables). There are around 1.3m rows on each table. I ...
user avatar
  • 101
0 votes
0 answers
13 views

Locking of tuple in addition to key-range locking

In Section 15.5.3 of the book "Transaction Processing", the authors claim The preceding calls demonstrate the mainline logic used to access a B-tree and to synchronize these accesses using ...
user avatar
  • 13
0 votes
0 answers
14 views

PostgreSQL replication checking pg_stat_subscription more than 1 row

I'm new to DB replication. I performed a replication task on 3 production DB. On the first 2 DBs (low size) on the subscriber side, they only have 1 row result when i query pg_stat_subscription. On ...
user avatar
0 votes
1 answer
39 views

MariaDB UUID datatype not orders correctly

I'm using MariaDB 10.8.3. I have a table with a PK of type UUID. I'm inserting ordered UUIDs generated in application side. When I retrive the data of the table ordering by UUID column, it is not ...
user avatar
0 votes
0 answers
22 views

SSIS package part breaks whole SSIS solution due to .designer files

I have troubles with usage of Package Parts in SSIS. My environment consists of: VisualStudio 2019 16.11.18 Add-on SSIS 4.1 to VisualStudio Windows 10 21H2 SQL 2019 CU16 - Standard edition The ...
user avatar
  • 105
0 votes
0 answers
18 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
18 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
20 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
  • 13
0 votes
3 answers
37 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
1 answer
44 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
18 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
12 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
1 vote
0 answers
28 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
16 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
3 votes
1 answer
149 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
24 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
15 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
1 vote
1 answer
14 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
1 vote
3 answers
61 views

Find which IP added a specific record to a table in SQL Server

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
15 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
19 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
16 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
12 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
17 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
2 answers
39 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
20 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
22 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
6 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
30 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
1 answer
21 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
39 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
40 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
11 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
26 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
13 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
14 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
38 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,456
0 votes
0 answers
21 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
56 views

What does a record in the sys.dm_exec_requests with corresponding blocking session id is not showing in the same result set mean?

sys.dm_exec_requests - these are the active requests sys.dm_exec_sessions - these are the active sessions A session can have 1 or more requests. From perspective of detecting and resolving blocking, I ...
user avatar
  • 2,456
-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
21 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
45 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
13 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
28 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,456
0 votes
1 answer
20 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

15 30 50 per page