All Questions
102,944
questions
0
votes
0
answers
4
views
Upgrade and migration of PostgreSQL 10 and PostGIS 2.4 to PostgreSQL 16
I have a really old PostgreSQL and PostGIS bundle (10 and 2.4), that I want to upgrade and migrate to a different server. Upgrading postgres alone wouldn't be a problem, but PostGIS makes it tricky. I'...
0
votes
0
answers
2
views
How to restore a backup and incremental backup of scyllaDB
Iam working on incremental backup and restore. When Iam Tring to restore the incremental backup after restoration getting an error on cqlsh shell, getting below error can you please help on this.
the ...
0
votes
0
answers
10
views
Star schema - multiple dimensions for similar concepts (from/to)?
A star schema is a classical data model for a data warehouse, with a fact table and a set of dimensions tables describing the supported analysis methods.
For example, a star schema for Sales can have ...
0
votes
0
answers
11
views
PostgreSQL Failure To Reinitialise Replica With pg_basebackup
I have a master-replica PostgreSQL 9.5 setup.
I'm trying to reinitialize the replica by doing the following:
Stop replica service ( /etc/init.d/postgresql stop )
Clear data directory ( rm -rf /path/...
0
votes
0
answers
17
views
Sql Server migration from old server to new very slow SQLEXPRESS
Hope someone can assist me. I think I might know what the problem is but this is not really resolving the issue and was wondering if it is even a valid conclusion. I am not a Guru at all with SQL.
...
0
votes
0
answers
14
views
How do I store a password in such a way that I can obtain the plain-text password again?
Consider the following scenario:
My app is utilizing a third-party API which requires a username and password for authentication. Unlike most APIs, which have one username and password set for the ...
0
votes
4
answers
46
views
Why do Databases use HEAP to store table data while other structure like B-tree exists?
Database Engines like MS SQL Server , PostgreSQL etc uses HEAP to store table data while using B-tree to store index data. Time complexity for most operations in B-tree is O(log n) while for HEAP it ...
0
votes
1
answer
12
views
Maria DB Managing JSON
I have a field in a MariaDB database with the following information:
{"Portal Content":{"Colours":{"Primary":"String","Secondary":"String",&...
-1
votes
0
answers
10
views
Created a database design for sale of moterbikes wan to know the if the relations are correct or not
i have given one to one relation b/w payment and orderdetails in my entity with jpa but in erd it is 1 to many
0
votes
2
answers
19
views
How to change insert values from 0 to NULL for a specific field in order to avoid foreign key violation?
I have a foreign key linking INSTRUMENT.VENDOR to VENDOR.NAME.
Unfortunately the program where users enter information is attempting to insert into INSTRUMENT with a value of 0 for vendor. I need to ...
0
votes
0
answers
11
views
Purely in performance terms, how do CONTAINS([MyCol], 'foo') and [MyCol] LIKE '%foo%' compare?
Consider CONTAINS([MyCol], 'foo') and [MyCol] LIKE '%foo%'. Assume the best possible indexes on [MyCol], whatever those may be (at minimum, we need a unique key and a full-text index). I know that the ...
0
votes
1
answer
23
views
ALTER ROLE DROP MEMBER succeeds but doesn't drop member
So this one has me stumped. We're doing some permissions cleanup and we have some users we'd like to remove from a database role.
We run ALTER ROLE MyRole DROP MEMBER [domain\user] and get Commands ...
2
votes
1
answer
279
views
Does mysqldump lock entire database or just a table by table?
I'm wondering if during a mysqldump executed in the following manner
mysqldump --all-databases --master-data > dump.sql
all tables are locked for the entire process, or just a table by table? In ...
0
votes
0
answers
4
views
Test Greenplum installation only accepts localhost connections despite pg_hba.conf settings
I'm starting with Greenplum and followed the directions in this video to install a single node demo. Since it's based on an old version, I had to make some changes. Also, before proceeding with any ...
0
votes
1
answer
19
views
Which SQL Availability Group Replica should the AG cluster name connect to in SSMS
My AGs are all healthy, different ones on different clusters, all SQL 2019.
When I connect to the cluster name from SSMS, should I expect it to connect to the current primary replica? If so, any ideas ...
0
votes
0
answers
14
views
How does M:M relation in Power BI behave (cross join or simple filter)?
Generally in a M:M relation I can think of this doing something like a cross join.
How does M:M relation in Power BI behave?
Is it a cross join or a simple filter just like how a 1:M would behave?
0
votes
0
answers
28
views
Dynamic SQL errors out on 2nd reference to non-existing database, but not on the 1st – SQL Server
I have a procedure that transfers archive data from 2 tables to monthly databases. A new monthly database is created every month.
Because the data transfer process is automated, dynamic SQL is used to ...
0
votes
0
answers
23
views
I have a table of Histogram values and I need to do a P95 calculation and I don't know how to express this in SQL
I hope this is an ok place to be asking this.
The table is tracking aggregated API response times essentially by storing the bars of histograms of the times for each API and day.
I need to use this to ...
0
votes
0
answers
13
views
Avoding combinatorial explosion with multiple one-to-many joins?
To explain I have a "compound" entity and each compound can have one or more lots. Each lot can have 0 to multiple measurements of each measurement type. There are many measurement type each ...
0
votes
0
answers
10
views
LocalDB with linked table to SQL Server error 7412 switching from non-admin to admin privileges
We are experiencing a strange issue using a localDB with linked tables to an SQL Server instance using SQL 2019. We see the issue in our own software but can also reproduce it using SQLSMS.
The steps ...
0
votes
0
answers
13
views
Can't start MariaDB after a system crash
systemctl status mariadb-server gives me the following error message. What should I do? Using systemd networking and tried adding ProtectHome=false and ProtectSystem=off to conf file as suggested but ...
0
votes
0
answers
17
views
Pgbackrest connection to Patroni cluster with HAProxy (VIP)
I have Patroni cluster with:
1 VIP
3 nodes HAProxy
3 nodes PostgreSQL Patroni
3 nodes etcd
And dedicated pgbackrest server, from which I want to connect to Patroni cluster and take backups. But I ...
2
votes
1
answer
32
views
How to create unique id in flutter to add in the database
How to create a unique id in Flutter to add to the database in firebase?
1
vote
1
answer
16
views
SQLite: How to include an Sqlean define statement in a `.sql` file?
I need to generate an SQL file containing UDF defined with the extension 'define' of Sqlean.
Here is a minimum non-working dump.sql file:
SELECT load_extension('path/to/sqlean/define');
SELECT define('...
0
votes
1
answer
33
views
Upgrade SQL Server Server Express to Licensed Enterpise edition?
we have sql server express edition 2017 with default instanc ,now we want to upgrade it to Enterprise Licensed Edition 2017 with default instance in the same server
At first I thought I had to ...
0
votes
0
answers
12
views
SQL Server Replication - Transactional
I am trying to do SQL Server transactional replication. Created publisher, distributor & subscriber.
Publisher & distributes in SQL server A and subscriber on SQL server B.
From server A I ...
0
votes
0
answers
10
views
sqlplus connects to my Oracle server only on "second try"
My Oracle DB used to work fine but lately I have the following problem:
When I try to connect with sqlplus with a non-interactive command as the following, from the very machine I deployed my DB on,
...
0
votes
2
answers
21
views
BLOB vs VARBINARY - space and performance
If there is column with type VARBINARY(1024) and content is 1-2 bytes, what space will be allocated on disk? Is it always 1024 bytes or variable size? Probably BLOB type is better choice. There is no ...
0
votes
0
answers
11
views
Initialized Replication Subscriber from Backup with @allow_anonymous,@immediate_sync off
I have initialized Replication Subscriber from Backup with @allow_anonymous,@immediate_sync = flase
It is working good.
Do I need t o change the setting back to true or just leave with false.
0
votes
0
answers
24
views
Does trigger order matter for enforcing integrity constraints in a trigger?
The database I am working on has integrity constraint requirements too complicated for a check constraint/foreign key. The only option is to enforce these constraints is in a trigger. On the surface, ...
0
votes
1
answer
24
views
SQL developer connection password forgot
I am new here so I might not be able to give the exact detailed information about the problem but here we go.I had a connection made as system in sql developer.I forgot the password so I thought I ...
-1
votes
0
answers
19
views
Looking up a connecting flight
Suppose a database has two columns, arrival and destination.
I want to check flights from Miami to Usuhaia. There are two flights I have to take.
ARRIVAL | DESTINATION
MIA, EZE
EZE, USH
So I would ...
0
votes
1
answer
56
views
Slow query when using OR clause
I have 4 tables and it takes quite a long time to query with OR clause (AND clause works fine).
News articles
Rows: ~7000
Schema:
id | integer
publication_date | timestamp with time ...
-1
votes
2
answers
22
views
How to AUTO_INCREMENT only on INSERT?
I have one of this situations :
CREATE TABLE table (
`col1` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`col2` VARCHAR(512) NOT NULL COLLATE 'utf8mb4_general_ci',
PRIMARY KEY (`col1`) USING ...
0
votes
1
answer
39
views
Is it possible to hit a full-text index without using a function specifically designed for them?
There are several functions that are specifically designed to hit full-text indexes. I think that the following is a complete list:
CONTAINS
CONTAINSTABLE
FREETEXT
FREETEXTTABLE
Is it possible to ...
-1
votes
0
answers
24
views
The Count and GROUP BY and GROUP_CONCAT does not group one field and remove duplicates
This is my query:
CREATE TABLE tab (
`id` INTEGER,
`user` VARCHAR(15),
`userid` INTEGER,
`user_id` INTEGER,
`ipaddr` VARCHAR(7)
);
INSERT INTO tab
(`id`, `user`, `userid`, `user_id`, `...
-2
votes
0
answers
13
views
How can I calculate the block access required in Secondary multi level indexing
Table structure
Given below are four relational schemas taken from the same University database.
Student(Std Id, S_name, Address, Gender, Dept_Id, GPA)
Department(Dept Id, D_name, Location)
Enrol(...
0
votes
0
answers
16
views
RDBMS vs NoSQL decision making
I am pretty novice when it comes to data store, and want to learn few tricks.
I want to know how to decide between RDBMS and a NoSQL store.
Lets take example of a system where data size is pretty big, ...
0
votes
0
answers
7
views
CloudSQL for Postgres S3 extension
In AWS RDS for Postgres, there is an extension called AWS_S3 that provides functions within Postgres that allow me to import data directly from a bucket into a table and export data from a table ...
1
vote
1
answer
26
views
Find the counts and occurrences of a column based on the name of another column in MySQL
I have a table like this:
id user userid user_id ipaddr
1 'Client' 10 0 1.1.1.1
2 'admin1' 1 0 2.2.2.2
3 'Client' 3 0 ...
0
votes
1
answer
35
views
SQL server 2019 alwayson problem
I've SQL server 2019 STD always on set up with 2 nodes and file share witness (located on third server). yesterday we had an network issue that the main switch was down for 15 minutes. after the ...
0
votes
1
answer
22
views
How to implement historical data with this EERD?
I am looking for a way to implement historical data with the following EERD (what I have tried, below the image):
What have I tried?
Temporal tables
Didn't work because I use MySQL and it has no ...
1
vote
1
answer
63
views
How can I verify if Read Committed Snapshot Isolation is causing application problems that Read Committed would not?
Suppose that I've turned on RCSI and my server is doing just fine; There have been no spikes in resource usage and the increased load on tempdb has been minimal. This is all good, but how can I tell ...
-2
votes
0
answers
11
views
I have a requirement to pull a table data from oracle and insert the data in db2 data using bash script. The records are bulk [closed]
Bash script code used for pulling bulk data from oracle and inserts into db2
0
votes
0
answers
9
views
while using expdp getting this error
[oracle@oracle197 ~]$ expdp CITI_MDR_DEV_3/CITI_MDR_DEV_3 DIRECTORY=CITIBKP DUMPFILE=CITI_MDR_DEV_3.dmp LOGFILE=CITI_MDR_DEV_3.log
Export: Release 19.0.0.0.0 - Production on Sat Mar 16 15:43:35 2024
...
0
votes
0
answers
31
views
Reduce varchar column size in a production database
We have a database running on AWS Aurora Mysql with version 8.0.mysql_aurora.3.04.1 as a regional database.
There is a table in it with a column with varchar size 200. We want to reduce it to varchar(...
1
vote
2
answers
31
views
Select unique rows based on condition stored in another table
I want to select rows based on conditions that is fetched from the database. The tables structure are mentioned below.
# Questions Table:
╔════════════╦═══════════════╦════════╗
║ id ║ ...
0
votes
0
answers
34
views
Is InnoDB Engine a B Tree or a B+ Tree? [duplicate]
I am confused about the InnoDB Engine. In the original document, it states that InnoDB uses a B Tree. However, in some other articles, they claim that InnoDB uses a B+ Tree.
https://dev.mysql.com/doc/...
0
votes
0
answers
22
views
What could cause replication to break on MySQL when replicating from 5.7.40 to 8.0 replica
We have a MySQL primary running on 5.7.40. We are in process of testing the upgrade to 8.0.36 (this is on AWS RDS). We had 2 MySQL-8 replicas and 2 MySQL-5.7 replicas replicating from the primary.
At ...
0
votes
0
answers
7
views
SQL: Perform join on multiple tables on Google BigQuery
Please, I am running a professional course in data analytics. Right now, I am on my Capstone project. But I am having challenge combining tables in BigQuery using SQL. The data is about bicycle trips ...