All Questions
103,298
questions
0
votes
0
answers
4
views
Recovered database files, need to be rebuilt using a new SQL server instance
Need some help in recreating a recovered database. We recently recovered an old disk drive that has the following folders on it:
Program Files\Microsoft SQL Server\MSSQL...
Program Files(x86)\...
0
votes
0
answers
10
views
How to calculate a number of columns up to a specific period
These are two separate students and I have all the columns that are correct but I am wanting to calculate the actual spend up to March so the top student will add to August to March and the bottom ...
0
votes
1
answer
8
views
What aspects of AG needs to be reviewed to ensure smooth operation for a leaver?
I'm looking at the AG ownership and endpoint ownership values. They belong to a leaver's AD account (ex-dba).
IT team wants to delete this account from AD.
Surely this will break the AG and endpoint.
...
0
votes
0
answers
4
views
Best database for matchmaking - requires high connection limits and complex querying capabilities
I'm seeking advice on the most suitable database solution for a matchmaking feature within my application. I've tried different solutions before but have always hit a roadblock before I can finish my ...
0
votes
0
answers
5
views
Which databases natively support sum types?
I would like to use database for storing my simple sum type. Here is the model in Rust language:
enum Item {
Heading { id: String, level: u8, text: String },
Paragraph { id: String, text: ...
-2
votes
0
answers
18
views
How to create a store procedure will trigger an email notification in sql server database?
Below is our current problem in production and want to create a store procedure will trigger an email will be able to fix this issue below.
We had a truck that went out with 30 tons loaded but the ...
0
votes
0
answers
3
views
Cassandra Support Docker for Windows implementation
We use Cassandra with Teamwork Cloud and was wondering if Apache supports the implementation of Cassandra using Docker for Windows? I see it is mentioned in the "Quick Start" instructions ...
0
votes
0
answers
19
views
Memory grant issues - queries requesting large amounts of memory
The company I work for has a software solution they've bought from another provider. Recently they've upgraded it to a new version (new dll's/code etc) and we've been suffering some slowness under ...
0
votes
1
answer
16
views
Why is it selecting date from another month that requested one?
I have a table that store time begin and time end of some events. I want to search in this table all even that were occuring during specific day.
Here is example data:
Id
Date begin
Date End
Name
1
...
0
votes
2
answers
22
views
Does putting foreign keys in another strong entity equal bad design and what is that table?
I see so many tables designed like this:
https://www.quackit.com/sql_server/sql_server_2016/tutorial/create_a_relationship_in_sql_server_2016.cfm
Where the foreign key is dropped into another table ...
3
votes
1
answer
10
views
Optimizing retrieving up to X rows in secondary table per parent row in a primary table
I'm looking to find the best general approach to retrieving up to a given number of records in a secondary table for each record previously retrieved in a primary table.
Technical Situation
For the ...
0
votes
1
answer
30
views
MOVE DB before restore, syntax error
I'm ready to pull my hair out. I made a script to backup and restore DB and Filegroup that build query like :
RESTORE DATABASE [dashdb_dev01_2024-04-11 143711] FROM DISK = 'E:\SQL2019_Data\Backup\...
0
votes
0
answers
11
views
With change tracking does the SYS_CHANGE_VERSION increment for every single change or only once per transaction
Can there be multiple change tracking records with the same value for SYS_CHANGE_VERSION?
Does the SYS_CHANGE_VERSION increment for every single change or only once per transaction?
0
votes
0
answers
8
views
How to mark a calculated query column as total:sum in Microsoft Access?
How can I ensure for Design View that the "total" line of this calculated column shows "sum"?
It seems to change after running the query and saving it.
What starts as:
TotalRevenue:...
0
votes
0
answers
12
views
MSSQL logs are not being rotated in AG setup
I have an MSSQL setup primary-secondary configured through availability group. I see the logs do not get rotated even after the full backup is executed daily and logs backup is taken after each hour ...
1
vote
1
answer
10
views
Postgres: Analyze problem pg_log_backend_memory_contexts
(PG14.1) Below is the output of pg_log_backend_memory_contexts for a PID for which pg_proctab() says that rss is 216MB. I added a few dots to make reading large numbers easier and I anonymized a few ...
-1
votes
0
answers
18
views
Using mirroring for migrating from an FCI to stand alone instance?
I'm looking at migrating from FCI (2 node SQL cluster) to standalone instance. Edition is 2019 standard.
My options are:
Install same SQL version on new machine (system dbs and user dbs are on non OS ...
0
votes
0
answers
15
views
Table 'any table' doesn't exist in engine without moving anything
I have odd problem
today after I guess month or so I rebooted my server and now I get Table 'ANY TABLE' doesn't exist in engine in every innodb table that i want to open in phpmyadmin, MyISAM tables ...
2
votes
3
answers
233
views
Integer number in the 700000s as the days from year 1: how can this be cast in tsql to a date and back if the oldest datetime date is 1753-01-01?
I fell upon an integer format for dates for which I also know the date, but I do not know how to get to that date in TSQL and I also do not know how to get to the integer if I have the date:
700444 -&...
0
votes
1
answer
21
views
Selecting a count of distinct logins per day
I have an activity_log table that I need to derive a basic output of how many distinct users logged in that day, and sum up them up day by day. The table logs all actions of a user and will have ...
0
votes
0
answers
11
views
Skip Deleterows_v1 event errors MariaDB on replication slave
So i'm running an custom HA setup for CyberPanel.
Now their is an issue that stops the replication: skip Could not execute Deleterows_v1 event error mariadb
I wanna skip these errors. How can i do ...
0
votes
1
answer
15
views
Unable to start RDS replication to MariaDB RDS instance from AuroraDB for MySQL instance
I am following this guide in order to migrate MariaDB RDS instance into AuroraDB for MySQL.
https://aws.amazon.com/blogs/database/migrate-self-managed-mariadb-to-amazon-aurora-mysql/
Reduce downtime ...
-1
votes
0
answers
5
views
Store nginx logs to a file by using a custom logger or pass nginx logs to a logshipper which accepts specific log fields
I have a scenario where I have to write ngnix logs(both access and error logs) to a file and give that file to logshiper, this logshipper accepts fields based on schema defined in it and if we pass ...
-1
votes
2
answers
55
views
Why should you always write "varchar" with the length in brackets behind it? Often, you get the right outcome without doing so
"Often, you get the right outcome without doing so."
Example:
select CONVERT(varchar, getdate(), 112)
outputs
20240417
I saw this in quite a few places on Stack Exchange until I found a ...
-2
votes
0
answers
10
views
Guidance on Developing and Costing a Student Project Similar to Rate Your Music
I'm looking into what it might cost to develop a web application similar to Rate Your Music, which combines database functionality with community-driven features like reviews, ratings, and forums.
I ...
0
votes
0
answers
13
views
How to Encode ascent character into UTF-8 without losing its representation? Any Suggestion
Method:
public static void test() throws IOException {
String input = "ABCÉ Ôpqr"; // charsetName = ISO-8859-1
String utf8String = new String(StandardCharsets.UTF_8....
0
votes
0
answers
21
views
What's the proper way to do closure of this set?
my friend and I have been practicing relational functionality deciding which is the best way to do closure of this set.
𝑅 = (P, Q, R, S, T, U, V, W)
RW → V
P → QR
T → P
U → TV
which is correct?
0
votes
0
answers
11
views
strange behaviour of the postgresql planner on a partitioned table
I have a problem where I don't understand the behaviour of the Postgresql 14.9 database planner on a partitioning table.
I'm sorry if my explanation is long, but I wanted to give as many details as ...
-1
votes
0
answers
15
views
replicating one master to multiple slaves and from multiple slaves to one master
"I have successfully set up regular master-slave replication, but now I need to configure a more complex setup. Currently, I have one master database and 15 slave databases. My goal is to ...
0
votes
0
answers
17
views
MySQL Stored Procedure security best practises
Sorry if this has been answered before but what is the "correct" way to set up security for a stored procedure?
Scenario is I want execute permissions only for the logged on web user and ...
-1
votes
0
answers
6
views
Installing PolarDB X using the pxd method, followed by persistent error messages when connecting via a MySQL client
CentOS 7.9 operating system with Docker installed; PolarDBX installed via pxd method; persistent errors encountered when connecting via MySQL client. How to resolve?
ERROR 2013 (HY000): Lost ...
0
votes
1
answer
19
views
Does long running query cause replication delay in PostgreSQL which is in 'idle in transaction' state?
In my system I found same query called more than 30 times 'idle in transaction' state. Is there any way to to identify the reason of 'idle in transaction'? Should I terminate those query manually ...
0
votes
0
answers
17
views
SQL query takes a long time - Index Spool and a Key Lookup that I've removed
We're having performance issues with a specific query in the SQL Server database. I've checked the logs in Application Insights and this is the only query that occassionally takes a long time to ...
-1
votes
0
answers
9
views
Does PolarDB-X exhibit identical behavior for `LOCK TABLES WRITE` as MySQL does?
Does PolarDB-X exhibit identical behavior for LOCK TABLES WRITE as MySQL, and would such usage affect the concurrent performance of the system?
0
votes
0
answers
9
views
DB Schema Design to Support Custom Application Flows & Logs
I'm working on a Database Schema Design, where custom fields can be added in the future. I'd like to figure out the following:
If adding columns to the existing table as per requirement is good or ...
0
votes
0
answers
6
views
Is this error in PolarDB due to an issue with parameter settings?
How can this error in PolarDB be resolved? Is it related to parameter settings? What is the maximum precision supported?
0
votes
0
answers
6
views
Is there a non-Kubernetes deployment option for PolarDB when high availability isn't required and server resources are constrained? [closed]
As a company providing localized software solutions for clients, we seek guidance on whether PolarDB can be deployed without a Kubernetes cluster when the client doesn't mandate high availability and ...
0
votes
0
answers
6
views
What should be done when encountering an error while attempting to install PolarDB-X via pxd on a Kylin-Server-10-SP2 system? [closed]
What should be done when encountering an error while attempting to install PolarDB-X via pxd on a Kylin-Server-10-SP2 system?
0
votes
0
answers
5
views
How to view execution logs in PolarDB?
Database table recovery attempted at a per-second granularity, but data restoration was unsuccessful. Given that the instance does not have binlog or SQL insight enabled, how can the logs of ...
0
votes
0
answers
24
views
How is the ! used in Microsoft Access queries?
The "bang" or exclamation point is a logical operator.
Just to follow up on a previous question, is it problematic to use "!" with Microsoft Access queries to specify tables and ...
-2
votes
1
answer
17
views
Transaction rollback did not successfully roll back
In PolarDB, a batch of write SQL statements were executed, among which one failed, prompting a transaction rollback. However, the rollback did not appear to complete successfully. The aim is to ...
0
votes
0
answers
14
views
cqlsh taking too long to respond for connectivity
In our application we have a monitoring service for cassandra which periodically executes a set of nodetool commands to check and update the db status. It also executes cqlsh <ip-address> <...
-2
votes
0
answers
9
views
When starting and running PolarDB version 2.3.0, the DN (Data Node) directly crashes [closed]
When starting and running PolarDB version 2.3.0, the DN (Data Node) directly crashes
polardbx-engine-2.3.0/plugin/polarx_rpc/coders/streaming_command_delegate.cc:274: virtual int polarx_rpc::...
0
votes
0
answers
6
views
Does RocketMQ support dynamically adding ACL accounts at the code level?
Does PolarDB-X with integrated RocketMQ support dynamically adding ACL accounts, including accessKey and accessSecret, at the code level? Uncertain if such functionality is currently offered; are ...
0
votes
1
answer
68
views
How does this user log in to the database server, when its login is deactivated on the database server?
I've specifically disabled a login on the database server. This is an Azure hosted SQL-as-a-Service database.
alter login [********@hotmail.com] disable
Here's what the login looks like on the server....
1
vote
2
answers
81
views
SQL Server database deadlock resolution
I am trying to understand how Microsoft SQL server handles calling process while resolving a deadlock.
Say we have 2 stored procedures A and B. Stored procedure A calls stored procedure B (to execute ...
0
votes
1
answer
13
views
Mongod starting issue on ubuntu
When I try to check the status of mongodb I get the following:
× mongod.service - MongoDB Database Server
Loaded: loaded (/lib/systemd/system/mongod.service; enabled; vendor preset: enabled)
...
0
votes
0
answers
10
views
Creating a server audit specification through SSMS: what is the correlation between Audit Action Type and other columns?
Having gone through https://learn.microsoft.com/en-us/sql/relational-databases/security/auditing/create-a-server-audit-and-server-audit-specification?view=sql-server-ver15 where it explains how to ...
0
votes
0
answers
11
views
Why does removing `skip-grant-tables` cause resource conflict error for mysqld?
After hours of searching, I have managed to narrow a mysqld issue down to a point, which I cannot find reason for.
I am attempting to launch multiple instances of mysqld on my Ubuntu server. When ...
-2
votes
0
answers
24
views
When is a multi-column index generally used by a RDBMS?
Say we got a table with columns: A, B, C, D, E
I am confused as to what specifically the rules are as to when an index is used by the RDBMS in the general sense.
What I think the answer is:
For some ...