All Questions
99,461
questions
0
votes
1
answer
899
views
SHOW tables returns empty set, but MYI.Crypt files are there
Something really weird happened to my VPS last week. Suddenly, MySQL stopped working. My VPS has CentOS 6 and uses Parallels Plesk. After this, Parallels Plesk stopped working, and trying to start ...
1
vote
1
answer
24
views
How much data per Apache Cassandra node?
I have a 3 node Cassandra 4.0beta3 cluster that is filling up and I need to know when I should add a couple more nodes. How much data is safe to keep on one node?
The nodes have 7.2T of disk each (log ...
0
votes
0
answers
27
views
SQLPackage Revoking and Granting Permission on Database Roles
I have a fairly niche question, but I am hoping someone may know a solution.
I am using Visual Studio SQL database projects to source control our azure SQL DB's. As part of the project definition, we ...
2
votes
1
answer
2k
views
Determine cause of "MySQL server has gone away"
I've got a long running process on a headless server. It is a C program that monitors a modem for Caller Id and hangs up on telemarketers. On startup the program opens a connection to a MariaDB 10.3 ...
0
votes
0
answers
21
views
We have lost permissions on the topology scheme
we have a postgresql database with postgis, with the following versions:
PostgreSQL 10.21 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 7.3.1 20180712 (Red Hat 7.3.1-12), 64-bit
...
1
vote
1
answer
44
views
How to move mdf file to other disk drive when it is "Standby / Read-Only" mode?
I am trying to change the location of mdf and ldf file from one disk drive to other disk drive due to storage limit.
Currently, the database that I am trying to move to other drive is in "Standby ...
0
votes
2
answers
29
views
Insert values and add values to foreign key
I have two tables:
CREATE TABLE est (
est_id serial PRIMARY KEY
, est_nom varchar(70)
);
CREATE TABLE bm (
id serial PRIMARY KEY
, est_nom int
, nom varchar(70)
, CONSTRAINT FK_bm_est FOREIGN KEY(...
2
votes
1
answer
241
views
Handling unique IDs on client side
Reading around on the topic hasn't got me closer to understanding best practices. I'm also relatively new and self-taught in programming, so might have some questions about how to actually execute the ...
0
votes
2
answers
48
views
Why does (In Recovery) indication show up?
I just noticed that this database is currently in "In Recovery" mode.
How do I change back to normal mode (without (In Recovery))?
This is very active database, and I am trying to be very ...
0
votes
0
answers
27
views
Help me understand EXPLAIN PLAN of mysql 8
-> Sort row IDs: users.userid (actual time=24875.751..34999.822 rows=2547647 loops=1)
-> Table scan on <temporary> (cost=0.00..0.50 rows=6083517) (actual time=0.027..2488.740 rows=...
0
votes
1
answer
45
views
Using "sp_execute_external_script" as alternative of "sp_invoke_external_rest_endpoint" in SQL Server
We have a business requirement to be able to request an HTTP end-point when certain events occur in the database (an SQL Server database). We have a catalog of end-points which we control. We use both ...
2
votes
1
answer
328
views
move blob data to new filegroup
short version: what options do i have to move a table that has blob data over to a new filegroup, without blowing out the txlog?
details:
we have an extremely over-allocated filegroup ("DA1"). the ...
2
votes
1
answer
69
views
script SQL equivalent
I have this SQLite script:
CREATE TRIGGER ACCOUNT_UPDATE_DELETE_SESSION_ID_NULL AFTER UPDATE OF DELETE_SESSION_ID ON ACCOUNT
FOR EACH ROW
WHEN OLD.DELETE_SESSION_ID IS NOT NULL AND NEW....
0
votes
1
answer
24
views
Get value of column B by having column A duplicate IDs
I have table of policies and i need to get policies that do not have "Policy" status.
Every policy have the same POLICY_DETAILS_ID but different POLICY_STATUS_DEBUG.
The query should say: ...
0
votes
1
answer
5k
views
pg_hba.conf and postgresql.conf in old installation directory
I have installed the PostgreSQL 9.4 on my MacBook via MacPorts, and I am trying to edit pg_hba.conf, but I don't see it in my current installation. Furthermore, psql is reporting that config_file is ...
4
votes
3
answers
28k
views
sqlcmd new login/user
I am new to sqlcmd and I want to create a new user. I have done the following:
1> CREATE LOGIN FYI_DBA WITH PASSWORD = 'V_2017'
2> go
1> CREATE USER FYI_DBA FOR LOGIN FYI_DBA
2> go
Then ...
0
votes
2
answers
462
views
Insert statement fails silently when a FK constaint can't be statically evaluated
I ran into an interesting issue which I'm not entirely sure how to address.
My tables:
CREATE TABLE entity (
id int GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,
properties jsonb
);
CREATE ...
1
vote
1
answer
1k
views
How to reclaim unused space in SYSAUX tablespace in Oracle?
I have 6gb file for SYSAUX table space in 18xe oracle database.
SYSAUX table space has 61% free space :
select
fs.tablespace_name as Tablespace,
(df....
1
vote
2
answers
38
views
Identify “duplicates” within a table by using GROUP BY column1 OR column2
Generally speaking, I want to group by one column OR by another one:
SELECT count(*)
FROM foo
GROUP BY column1 OR column2
In particular, I want to identify duplicates within a given table, below an ...
0
votes
2
answers
777
views
Does JOIN condition work like a loop on the joined table?
Do JOIN conditions work like a loop? (like Foreach)
and if so, does it run the loop on the first table (the one after SELECT) or the second table (the one after JOIN clause) ?
Let's say you have the ...
1
vote
1
answer
2k
views
Unable to connect to remote server, error message references "localhost"
I have a MySQL server instance installed on an Ubuntu machine. I have ensured that it is listening on port 3306. I have set the bind address to 0.0.0.0. I have checked that there is no firewall. I am ...
1
vote
1
answer
808
views
Character Strings related : string_units db cfg changed from SYSTEM to CODEUNITS32
To handle few special characters, we changed string_units database configuration parameter from default SYSTEM to CODEUNITS32.
Based on IBM DB2 Knowledge Center, there are three methods to achieve ...
1
vote
2
answers
58
views
How to improve performance on query with nested INs?
I am trying to improve the performance of this query using joins instead of INs.
Also I am using the GUI tablePlus with Postgres. What are some good tools to assist with performance?
UPDATE app_public....
0
votes
1
answer
39
views
Best BULK DELETE and Empty Space Recovery Options
What is the best option to recover empty space after running a bulk delete? DBCC Shrinkfile is useful to truncate the space. DBCC Shrinkdb is used to shrink the db files, but it leads to fragmentation....
1
vote
1
answer
350
views
Sharded Mongodb stalls randomly
I have setup Sharded MongoDB cluster using hashed sharding in kuberenetes.I first created the config server Replicaset and then created 2 shard replicasets. Finally created mongos to connect to the ...
1
vote
1
answer
6
views
Add new data center to Cassandra with replication factor of 1
I want to add a backup data center on a cloud provider. Assume I have DC1, DC2, DC3 in the cluster and I want DC4 have every piece of data in the cluster with replication of 1. Is this achievable ...
0
votes
1
answer
238
views
MySQL 8 install doesn't include mysql.exe (Windows)
I've installed MySQL 8.0 using mysql-installer-community-8.0.26.0.msi. Mainly these options:
But there's no binaries for connecting (mysql.exe) or dumping (mysqldump.exe):
What else do I need to ...
0
votes
1
answer
649
views
Query DB2 without using Openquery
Is there a way to query a DB2 Linked Server without using Openquery? IE, is it possible to query DB2 through a linked server by doing something like the following?
select *
from [db2_linked_server].[...
5
votes
3
answers
2k
views
Why not use two columns instead of collation for case insensitive data?
I need to store emails (like 'ivan@email.com') in Postgres 15, be able to search them in case-insensitive manner ('iVaN@email.com', 'IVAN@email.com', etc are the same), and be able to retrieve the ...
1
vote
1
answer
511
views
Able to connect with connection manager but SSIS package does not authenticate
I have an SSIS package that connects MSSQL2008 server to MSSQL2000 and pulls data off the 2000 server and transfers it to the 2008 server. The 2000 server was recently virtualized and since then the ...
11
votes
1
answer
16k
views
Conceptual data model for a billing system
I am working on an existing MySQL database. My task is to create a new data model for a billing system on that existing application.
I have created a conceptual data model (click to enlarge):
##...
4
votes
1
answer
767
views
Why does restarting MongoDB 3.0.x boost performance?
I have a MongoDB in my Development environment running on Windows, the server has 64GB of RAM, but MongoDB has only consumed 26.9GB (here we are building the database), so it should be able to hold ...
6
votes
1
answer
4k
views
Indexes on Slave
I already have a my system with Master-Slave replication.
I have started using Slave for data fetching. So, I need to create some extra indexes on Slave.[Not In master - however be informed that the ...
15
votes
3
answers
37k
views
Trying to understand SHOW SLAVE STATUS in MySQL
I have a Master-Slave replication setup and it looks like that it is running fine. Below is a result of SHOW SLAVE STATUS command:
show slave STATUS\G;
*************************** 1. row *************...
0
votes
0
answers
38
views
MSSQL replication snapshot agent fails
I'm using MS SQL server 2019 on Linux. I'm trying to create a transactional replication.
The problem is that when I create a publication, the snapshot agent can not start.
Basically, I'm getting this ...
1
vote
1
answer
335
views
MySQL Database on RDS with memory issues
I am facing high memory utilization issue on RDS MySQL server. We are having other issues too, can someone give me a help?
My database has 120GB, including indexes.
Can anyone help me out to ...
1
vote
0
answers
11
views
Mysterious Increase in Server Load Every Hour with MySQL 5.7.4
I have a CentOS 7 server with MySQL 5.7.4 installed. The machine has 8 cores and 16 GB of RAM, and only the MySQL service is running. The database is not very large, and there are not many queries. ...
0
votes
1
answer
431
views
How can Update table column with the virtual column?
I want to update repetitive columns, And I build virtual column for did this. I can "select" but can't "update"
Here is SQL Fiddle :
http://sqlfiddle.com/#!9/d09189/3
Also Code review :
I have ...
1
vote
1
answer
21
views
PostgreSQL group by with just primary key is allowed on tables but why not views? [duplicate]
Using PostgreSQL 11.18
It's possible to select rows from a table with a group by that only includes the primary key even if all of the columns appear in the select clause:
CREATE TABLE table1(
id ...
0
votes
1
answer
23
views
Will Azure SQL still charge if I don't consume all DTUs that I have allocated?
I am using the Azure SQL (non-managed) Standard plan on 10 DTUs.
If I bump it up to 200 DTUs, the estimated costs hit $300+. However, if I don't use them will it still charge me that?
0
votes
1
answer
799
views
How to view databases and tables after 'imp' import using Oracle SQL developer
Maybe that's a wrong form of answer...
The problem is:
I've got an Oracle database dump file (very old, created with imp utility)
At last, I've imported it. The command was imp file=E:\Downloads\...
1
vote
1
answer
234
views
SQLite database Upgrade Schema without loosing data
I have a small C# Windows Forms application.
It uses SQLite DB on the client's PC.
I started with a Schema DB and with time I added more tables and columns to my local DB (not the client's).
I want to ...
1
vote
1
answer
577
views
postgresql - Policy to prevent a field from being updated
How can I create a policy to prevent a field from being updated?
I am thinking something like this:
CREATE POLICY "test" ON posts.created_at FOR UPDATE WITH CHECK (exists(created_at));
...
5
votes
2
answers
7k
views
How to take mysqldump with Generated column?
I am getting below error while importing the dump,
ERROR 3105 (HY000) at line 82: The value specified for generated
column 'column_name' in table 'table_name' is not allowed.
When I describe the ...
1
vote
2
answers
45
views
Is it safe to use lastval/currval for multiple inserts?
Lets say I have those tables:
CREATE TABLE buildings (
id_building serial4 NOT NULL,
street text NULL,
CONSTRAINT buildings_pkey PRIMARY KEY (id_building)
);
CREATE TABLE families (
...
0
votes
1
answer
45
views
How to change from "Read-Only" mode to "Standby / Read-Only" mode?
I changed the database (foo) mode from "Standby / Read-Only" to Active by using the following statement:
restore database foo with recovery
After that, I changed the mode back to Active by ...
0
votes
2
answers
296
views
Report server scheduled job location
I inherited a SQL Server environment. In (database engine) SQL Server Agent are two jobs defined that apparently belong to the report server.
First and only step in the first job:
exec [ReportServer]....
3
votes
3
answers
647
views
Mysql: 1000 select queries vs 1 query ( select .. in )
I have just read about N+1 queries problem. So I have the doubt about the performance of 2 ways.
The way 1: I have 1000 queries like that:
select * from topic where user_id = 1
select * from topic ...
0
votes
0
answers
15
views
The server could not load DCOM when using Format()
SQL Server Version: Microsoft SQL Server 2014 (SP1-GDR) (KB4019091) - 12.0.4237.0 (X64) Jul 5 2017 22:03:42 Copyright (c) Microsoft Corporation Enterprise Edition (64-bit) on Windows NT 6.3 (...
1
vote
1
answer
713
views
SQL Server configuration manager - New alias grayed out
I want to create an alias in SQL Server Configuration Manager. I can navigate to "Aliases" in the tree on the left, and I can right-click to open the context menu when "New alias..." is an option. ...