All Questions
99,465
questions
0
votes
1
answer
31
views
What is meaning of "FCM Automatic/Dynamic Resource Adjustment"?
Few times per day on Db2 v11.5.8.0 Linux/x86_64 on several databases the following warning appears in db2diag.log file:
2023-03-14-08.00.39.289489+060 I4031117E469 LEVEL: Warning
PID : ...
1
vote
0
answers
22
views
PostgreSQL - Cross Schema Foreign Keys - permission denied for table
I've created a new table called device, in a schema called 51025.
I'm now trying to add the following constraint on the table.
ALTER TABLE "51025".device ADD CONSTRAINT device_solution_fk ...
1
vote
1
answer
31
views
Can't get MariaDB docker to work without password
I want to add MariaDB to my docker compose file, like this:
version: '3'
services:
mariadb:
image: 'mariadb:10.3'
ports:
- "3306:3306"
volumes:
...
1
vote
1
answer
56
views
How to update all tables in specific schema in dev database from prod database in sql server?
I am trying to use Export data option to copy data from source to destination table wise, but it throws an error if there is any foreign key relationship, this error is because, if I selected a parent ...
-1
votes
0
answers
36
views
SELECT failed because the following SET options have incorrect settings: 'CONCAT_NULL_YIELDS_NULL, ANSI_WARNINGS, ANSI_PADDING' [duplicate]
I created a logon trigger to block specific IPs from a list on the master database.
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TRIGGER trgBlockIP
ON ALL SERVER
FOR LOGON
AS
BEGIN
...
0
votes
0
answers
26
views
How to copy many tables from one database to another database using pgAdmin4 on PostgreSQL
I just created a new database. I want to bring existing Tables from old Database to the new one for database clean up purpose. I am looking for a short cut than doing it manually. I'm using pgAdmin4 ...
0
votes
1
answer
60
views
mysqld how to only listen on unix socket?
how do i make mysqld not use ip at all, only listening on an unix socket? if i do
mysqld --socket=mysql.sock
it still opens port 3306, and if i do
mysqld --bind-address='' --socket=mysql.sock
it ...
1
vote
1
answer
26
views
MySQL - Sum rows in one column based on values in another column - grouped - using variables
I am trying to sum data based on the values in one column grouped by the values in another column.
Specifically I am trying to sum data so that cumesum is reset to zero when the Ref column changes as ...
0
votes
0
answers
16
views
Mysql MYISAM force operating on a crashed database
Is theres a way to forcibly operate on a database that crashed (even if it's not possible through mysql cli at least a way to remove the dirty bit that marks it as crashed by editing with an editor).
...
1
vote
1
answer
69
views
Cannot connect on psql specifying connection string postgres
On my Ubuntu machine, I have installed postgres 15. I created a new superuser called "test" (with password "test"). Then, I created a database called "test" as well and ...
5
votes
2
answers
233
views
Varbinary update attempt
Is it possible to adapt this into update query which has to seek a free sequence of 3 bytes or (0x000000) and replace it with a new sequence if the data is split like this every 3 bytes? The issue is ...
0
votes
0
answers
18
views
Cannot setup witness for mirroring in SQL Server, alter database command could not be sent?
Using SQL Server 2019. I setup certificates, users and logins for a principal/mirror/witness for 3 SQL Servers that are on 3 separate VM's all on the same ESXI server.
I have the prinicipal and ...
0
votes
1
answer
39
views
Query to select field only if two values and count is satisfied
I have a table with 4 Columns:
ID, Context (smallint), StartedAt (datetime), FinishedAt(datetime)
The Context field can be 1-5
I need to select the last date of "FinishedAt" field, but only ...
0
votes
3
answers
62
views
Window function with subquery results to unexpectedly slow query plan
This is my victim query
SELECT *,
lag(quantity)
over (partition by product_id, size_id, warehouse_id order by size_id, warehouse_id, created_at ASC) -
quantity as orders
FROM ...
0
votes
1
answer
13
views
Handling IP Changes for Master MySQL Server
I have been working with master-slave replication in MySQl and was wondering if there is any possibility to set the listen-address property of the MYSQL config file to read the IP statically assigned ...
2
votes
1
answer
39
views
Is Apache Cassandra Quickstart broken?
I'm following the steps in the current (2023-03-13) Cassandra quickstart:
STEP 1: GET CASSANDRA USING DOCKER
docker pull cassandra:latest
STEP 2: START CASSANDRA
docker network create cassandra
...
1
vote
1
answer
128
views
Why my clustered index causing deadlock (Keylocks and Pagelocks)
We are experiencing deadlock 2-3 times a day in SQL Server. Upon analysis, we have found that the deadlock is caused by a combination of keylock and pagelock occurring simultaneously.
We are actually ...
-1
votes
0
answers
25
views
My Postgres always shutdown in a while (around 1h)
I have a problem about Postgres and Ubuntu VPS. My service always shutdown without no reason. Below is Postgres' log. Could anyone take a look on this situation?
0
votes
2
answers
60
views
Is it possible to insert cyclic foreign keys that are AUTO INCREMENT primary keys?
I am trying to model a quiz structure, where there are questions and a unlimited number of answers, where only one is correct.
Example:
Question A
Answer A
Answer B
Answer C (Correct Answer)
Answer ...
1
vote
0
answers
31
views
How can I manage Azure SQL Object access at scale? [closed]
I have thousands of tables in a Synapse Dedicated pool and I need to be able to control access to those tables. How can I do this without writing thousands of DCL statements?
0
votes
0
answers
20
views
Dynamic number of columns with values from another column
PostgreSQL. There may be varying numbers of m_id's, so we need a varying number of columns.
I need to get from:
time (timestamp), mid, mvalue
2023-xx1, 2, 11.2
2023-xx1, 4, 11.4
2023-xx1, 3, 9.3
2023-...
0
votes
1
answer
56
views
When removing entries in SQL Server, reset the identity seed
I've added records to a SQL Server database table. The table had a primary key established and the auto-increment identity seed is set to "Yes". This is done mostly because, with SQL Azure, ...
0
votes
1
answer
40
views
MS SQL corruption repair manually investigate pages
I have a corrupt MS SQL db.
We do have a good backup prior to the issue we had. All is now fixed. However, we are left with a corrupt database, with 2 weeks of good data in it.
The issue is we can't ...
-1
votes
0
answers
35
views
How to create a random number between 50 and 60 for each row separately in an MSSQL select clause? [duplicate]
I need to create a random number between 50 and 60 for each row in a table.
I can create a random number as follows. But this creates one and the same number for every row.
Cast(RAND()*(60-50)+50 as ...
-3
votes
1
answer
57
views
I want to split the text in the row into separate columns
I have this column and rows
I want to split the text in the row into separate columns like this.
0
votes
2
answers
36
views
ignore column width in sqlplus
I'm getting the follow
SQLPLUS> create table source(aa nvarchar2(2), bb nvarchar2(100), cc nvarchar2(10));
insert into source values ('aa',null,'aa');
insert into source values (null,'aa','aa');
...
0
votes
0
answers
16
views
deadlock errors when doing benchmark test on mysql
I wonder why so many deadlock error appear when I do benchmarksql test on mysql.
The error appears when the parameter terminals is greater than 32.
Detailed error report
com.mysql.cj.jdbc.exceptions....
0
votes
0
answers
31
views
What is difference between "Statement Cumulative Statistics" and "Statement Self Statistics" in reports generated by OraSrp tool
I have generated trace for single session in oracle database(Version 19c). Then used TKPROF and ORaSrp tool to read raw trace files.
What I observed for same sql statement OraSrp tool gives two stats
*...
-2
votes
0
answers
15
views
Database sales structure for 2 parties on the same system
Currently I am working on a structuring the database for system that will connect 2 parties:
Distributors
Stores
Step 1:
stores create bill to distributors
Step 2:
distributor approve this bill
...
0
votes
0
answers
16
views
In Oracle SQL, How do I select an aggregate column from the result of a group by function? [duplicate]
SELECT *
FROM Clients c
JOIN Info i
ON i.id = c.info_id
JOIN (
SELECT
site_owner_id,
SUM(p.amount_paid)
FROM Site s
JOIN SecurityArrangement sa
ON sa.site_id = ...
0
votes
0
answers
19
views
MySQL simple LDAP authentication fails with access denied error
I have setup LDAP configuration with below setting in my.cnf file.
# LDAP Authentication
plugin-load-add=authentication_ldap_simple.so
authentication_ldap_simple_bind_base_dn="ou=Users,dc=...
-1
votes
1
answer
20
views
What is a common type of storage hardware for dedicated MySQL servers?
I am curious what kind of storage hardware is common to see in servers that are dedicated for MySQL ? For example online services like Amazon AWS, Azure, Google, etc that offer(ed) dedicated mysql ...
0
votes
1
answer
41
views
MongoDB Server on Ubuntu Crashes again and again
The mongodb server on my ubuntu Virtual Private Server Crashes on regular basis.
mongod.service - MongoDB Database Server
Loaded: loaded (/lib/systemd/system/mongod.service; enabled; vendor ...
0
votes
0
answers
9
views
Oracle12c Compound update column trigger gives ora-06512 recursive SQL error on execution
This trigger is used to update the sales for empno 20
empno 20 sales value is the sum of the sales of all
employees under his supervision in dept 6
create or replace
trigger empno20upd
for delete or ...
0
votes
1
answer
44
views
PostgreSQL Row Level Security: Can we have an Update-policy only?
I have a table that has a userid field for owner(s) and a collaborator(s). Access to the table is done via one role (has SELECT, INSERT and UPDATE access to the table), and a userid available from a ...
0
votes
0
answers
24
views
Using ReportingServicesTools to change the connection string of a PowerBi report
We're migrating to a new SQL Server instance and I'm trying to change the connection strings in our PowerBI reports via PowerShell and ReportingServicesTools.
Basically, all I need to do is to change ...
0
votes
0
answers
63
views
How to get around 'Can't update table in stored function/trigger because it is already used by statement which invoked'
In MariaDB/MySQL I am looking to create a trigger that automatically changes a boolean to true when 4 Users are a part of it. The issue is I am running a running a query on the table that is being ...
0
votes
1
answer
51
views
Join on a date column?
I'm not sure if I'm thinking about this in the right way, but I want to join on 2 date columns (which are months really), here is my query:
with EmployeeGoals as (
select Employees.id,
...
0
votes
1
answer
45
views
Insert rows in 3 tables in a single query, SQL SERVER 2008
I need to insert data into 3 tables in a single query
Table SkillData
UserIndex
SkillPoint
TotalSkill
1
5202
99
Table Emblems
UserIndex
CountEmblem
Status
1
1265
1
Table Rewards
UserIndex
Level
...
0
votes
1
answer
42
views
What is the optimal way to insert values in a table with index (Oracle)? [closed]
I have a table VISIT_HIST in an Oracle data warehouse. This table contains number of customer visits during every month and is rather big (~130 mn rows).
CREATE TABLE (
VALUE_MONTH DATE,
USER_ID ...
0
votes
1
answer
90
views
Collation version mismatch
I replicated a database, it's working fine but when I enter the replication database it displays the following message:
The database was created using collation version 2.31, but the operating system ...
0
votes
1
answer
12
views
How to replace LONG columns in Data Dictionary views in Oracle with varchar
This oracle forum posts in 2015 says that Long data type is deprecated for 20 years. Right now, in 2023, it is almost 30 years this data type is deprecated but it is commonly used in data dictionary ...
0
votes
1
answer
28
views
Difference between current_allocation s total_allocation in MySQL sys.memory_by_thread_by_current_bytes
I'm trying to debug a memory leak in MySQL 5.7.37 and running the following query gives me insights about the threads running and the memory allocation for each thread.
select * from sys....
0
votes
0
answers
15
views
Has the table name in SQL for Wordpress changed from WP_posts to WPCS_post? [closed]
I ran this query in SQL in PhyMyAdmin
UPDATE wp_posts
SET post_content = REPLACE (post_content,'https://www.mydomain.com/wp-content/uploads/','https://www.cdn.mydomain.com/');
Though it ran, then ...
4
votes
1
answer
198
views
Query performance on static, large PostgreSQL table
I tried to have this as detailed as possible. Sorry about the length!
Background
I created the following partitioned table protein_snp_assoc on a PostgreSQL (version 12.13) database:
CREATE TABLE ...
2
votes
0
answers
22
views
How do I change the timezone of pgadmin?
I have PGAdmin hosted in server mode (container) on my server. In the "server activity" section, the time is being displayed in UTC. How do I make PGAdmin display time in my local time? I ...
1
vote
1
answer
44
views
Will partitions speed up data ingestion for Postgresql?
Using Postgresql version 15.1
I'm making a table of blockchain transactions (1 row per transaction). In total, it will have ~2 billion rows. Once the table reached ~50 million rows, the data ingestion ...
6
votes
1
answer
416
views
Is it possible to estimate how much time is left for a DROP statement?
I made this query : ALTER TABLE dbname.tablename DROP COLUMN columnname and it's been running for a few hours and I wanted to know how much time would it still be going.
There are approximatively 750m ...
1
vote
1
answer
47
views
Delete records in different tables
I need to delete the records where UserIndex = 1 and ItemNumber = 5202 in all three tables, all in a single query. I am using SQL 2008 R2.
Table UserInfo1
UserIndex
Itemnumber
ItemCount
1
5202
99
1
...
0
votes
0
answers
15
views
Mysqldump geometry field error
I have MySQL 8 database with some tables that have some column of type GEOMETRY.
When I back up the table with mysqldump, it outputs my geometry column as _binary '\æ\0\0\... and when I try to ...