All Questions

Filter by
Sorted by
Tagged with
-1 votes
2 answers
41 views

How to design a database with a large number of data items

I collect data every second from a control device. The device has 8,191 points of data from X1 to X1FFF. I thought of two designs to store the data. A table that stores data in columns: This method ...
2 votes
1 answer
362 views

Cross-Continent SQL High-Latency Data Synchronization

How would one go about synchronizing a MySQL database cross-continent, while keeping the distributed application using the DB running fast (<0.2s page loads) ? My database contains about 2.5GB of ...
0 votes
0 answers
2 views

Postgres: Using a function as an argument to Grant fails with 'syntax error at or near "("'

I can't get Grant to take current_database() as an argument. These all fail with the same error: GRANT ALL PRIVILEGES ON DATABASE current_database() to justintestin; GRANT ALL PRIVILEGES ON DATABASE (...
0 votes
2 answers
13k views

Net Configuration Assistant doesn't open, created Listener in Net Manager but it isn't recognized when creating database Win 7

I have installed Oracle 11g on my Windows 7 64-bit system. The Net Configuration Assistant does not open for me to create a listener. I was able to add a listener through the Net Manger and it says it ...
0 votes
1 answer
544 views

Oracle Fine-Grained Access (FGA) auditing excluding one source

I want to audit DML statements coming from other places than application user "tomcat" (OS_USER attribute). I want to focus only on developers or support team changing data in any way. DML ...
0 votes
1 answer
7 views

No logins showing under SQL Instance as admin and SA

I have an issue where when I log into SSMS I am not seeing any logins. I am running as an administrator and logging in with SA. It does not matter which account I log in with. I only ever see the two ...
user avatar
1 vote
0 answers
25 views

Improve performance of TVF using system catalog view sys.schemas

We have a database where many tables have after update triggers that use the COLUMNS_UPDATED() function to track which column values were modified via a history table. I've been asked to expose the ...
1 vote
1 answer
798 views

MariaDB: Duplicate entry for key on OPTIMIZE with no duplications

There is a table named contracts with following structure: MariaDB [db_name]> DESCRIBE `contracts`; +-----------------------------+--------------+------+-----+---------+----------------+ | Field ...
0 votes
1 answer
403 views

Very slow queries selecting @@ session variables.

We're running locally managed databases for our Atlassian suite (Jira/Confluence/Fisheye). I noticed something strange in the slow query logs. There are a bunch of selects of session variables ...
21 votes
3 answers
9k views

Column name naming conventions and best practices

I would like some expert opinion on best practices when it comes to column naming. The background is that according to Wikipedia, the following syntax, SELECT ... FROM Employees JOIN Timesheets ...
0 votes
0 answers
10 views

In extended events, event sqlserver.sql_batch_completed, client_connection_id do not match sys.dm_exec_connections for the same session_id

My goal is the following. I want to get client_net_address for every query traced (the same of sys.dm_exec_connections for matching session_id). Extended events system do not provides this straight. I ...
1 vote
1 answer
650 views

my ssh is ok but masterha_check_ssh is fail

my environment is vmware12 + centos6.6 + mysql5.5 + mha4mysql-manager-0.53-0.noarch.rpm + mha4mysql-node-0.53-0.noarch.rpm my structure is one master three slaves master 192.168.233.135 node ...
0 votes
1 answer
2k views

unlock the only MySQL account

By accident I locked my root account in MySQL which I launch using wamp server, the error message from phpMyAdmin is Access denied for user 'root'@'localhost'. Account is locked. How can I unlock ...
0 votes
1 answer
1k views

Is there a simple way in VS SSIS to swap existing DB connection manager with existing project connection manager?

I am using Visual Studio 2017 (SSDT). I have several packages (about 50) I need to migrate to use the project deployment model (instead of package deployment). I created a new Project and added my ...
0 votes
0 answers
4 views

Scylla/Cassandra Backup and Replication Factor

When backing up a Scylla cluster (or cassandra for that matter) I understand that its best practice to take a snapshot of every node. However if I have a 6 node distributed cluster spanning 2 ...
1 vote
1 answer
36 views

SQL Server: Linked Server connections: Scripting

I was looking for a way to script existing linked server connections for reference and migration to other servers. I have over 150 of them pointing to Azure SQL Databases used to gather reports.
-1 votes
0 answers
15 views

How to design a database with a large number of data items

I collect data every second from a control device. The device has 8,191 points of data from X1 to X1FFF. I thought of two designs to store the data. A table that stores data in columns: This method ...
0 votes
1 answer
281 views

High CPU Usage and MySQL Server Inaccessibility during Magento flat reindexing

We use the following configuration: Engine: Aurora MySQL v8.0 Instance Type: db.r6g.4xlarge vCPU: 16 Memory: 128.0 GiB Role: Writer Instance I'm encountering a critical issue during the reindexing ...
0 votes
1 answer
369 views

SSRS 2008 to 2014 Migration Excel Export error

We are working on migrating our SSRS from SQL Server 2008 to SQL Server 2014. After brining the reports over I have a set of reports that will execute just fine but when I try to perform a standard ...
0 votes
1 answer
8 views

dsbulk count more rows then unloaded in csv files

I'm doing dsbulk unload for one table, with one primary key field, without clustering key. At the end in console I see something like this total | failed | rows/s | p50ms | p99ms | p999ms ...
2 votes
2 answers
18k views

Clever way to order a json item by key in postgresql (two examples)

I need to sort a json item in a record, so here are two examples: First case create table jsontable ( jsonitem json ); Next I insert a json item: insert into jsontable(jsonitem) values ('{ "...
0 votes
2 answers
589 views

mysql query with date hours and interval

I have EXPIRATION column in mysql table which contains date in following format 2022-02-15 08:00:00 I am trying to query username whose expiry is on 2022-02-17 08:00:00 using below query SELECT ...
-1 votes
0 answers
10 views

How to update rows in GENERATED ALWAYS FOR EACH ROW ON UPDATE AS ROW CHANGE TIMESTAMP without changing timestamp

On Db2 11.5 on Linux I have (simplified example) the following table: CREATE TABLE ADMIN.TAB1 ( ID INTEGER NOT NULL, COL_TEXT CHAR(10), DATE_TIME TIMESTAMP NOT NULL GENERATED ...
0 votes
1 answer
43 views

Does granting execute stored procedures (all) implicitly allow any critical privileges?

Does granting execute stored procedures (all) implicitly allow any critical privileges? For example privilege to control security, etc, by runing the relevant stored procs? The way to grant execute ...
6 votes
1 answer
3k views

SQL Server Network Packet Size

During the analysis of network traffic from Citrix clients to our database server, we noticed that we had a lot of RETRANSMITs occurring during the transport of TCP packets. The packets were being ...
0 votes
1 answer
768 views

Lock Escalation happening while inserting few million records into a table in production

I want to insert few million records into a table in my production database. I am not updating any existing rows.I am just doing INSERT INTO TAB1 SELECT COL1,COL2,COL3 FROM TAB2 This table has an ...
0 votes
0 answers
7 views

Trino. Export data from postgresql

I am exporting data from PostgreSQL to another database using the following query: INSERT INTO db_name.public.example_table (id, name, content, boolean, timestamp) SELECT id, name, content, CAST(...
3 votes
1 answer
136 views

Restoring a broken SQL Server database - combining old DB+TL backup with new

I have run into a SUSPECT database (SQL Server) for the first time. It is apparently due to disk failing. I have recent full DB and transaction log copies but additional data was entered since then. I ...
0 votes
0 answers
10 views

PostgreSQL: permission denied to COPY to or from an external program, even after Grant pg_execute_server_program

Running Copy test(id, name) From Program 'zcat /tmp/test.csv.gz' CSV Header; fails with: SQL Error [42501]: ERROR: permission denied to COPY to or from an external program Detail: Only roles with ...
0 votes
1 answer
2k views

pgBouncer receiving Error Query_Wait_Timeout in log - when running pgBench on Postgres 9.6

I am testing pbBouncer by utilising pgBench with a very large database. I initially setup pgBench with a large database (731GB) - turns outs its just a huge accounts table (626GB) ./pgbench -h 172.10....
18 votes
5 answers
274k views

How to represent foreign key in an ER diagram?

I have a Transactions table which has a column Customer ID (foreign Key) and a Customer table having ID (primary key). How do I show in an the relation between the two tables showing that the ...
2 votes
1 answer
2k views

MySQL trigger to prevent insert won't work

The problem has been discussed before but the answers won't work in my case. I have a table in my database which contains a numeric column called "value". I would like to prevent an insert if the ...
4 votes
1 answer
221 views

Granting SELECT...INTO permissions

I've created a new schema, archive, and am able to create, read, update and delete tables within it. I have an EXTERNAL_USER who I'm trying to give permissions to so that they can carry out select.....
-1 votes
0 answers
12 views

Automatic startup of applications on Windows Server is delayed

We have some shortcuts to applications and scripts on our Windows Server 2019 located in C:\Users\Administrator\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup (Shell:Startup) but they ...
8 votes
3 answers
21k views

PostgreSQL data files have size more than data itself

We have a system that does some data archiving to a PostgreSQL DB. We found out that the PC storage was full due to the DB archiving. The problem is that I checked the data files residing in /var/lib/...
4 votes
2 answers
2k views

Missing statement information from 'LATEST DETECTED DEADLOCK' InnoDB status output

I'm learning how to interpret the LATEST DETECTED DEADLOCK section in the output of SHOW ENGINE INNODB STATUS, and had a question about the output. Some sample output of SHOW ENGINE INNODB STATUS ...
1 vote
2 answers
68 views

Mysql : dumping a database fails

I regularly backup my database using the command: mysqldump -u root -p <database_name> > <output_file>.sql Today, this started failing repeatedly after ~1.9Go written to output file: ...
2 votes
1 answer
944 views

MySQL Semi-synchronous replication with Multi-Master

Is it possible to use semi-synchronous replication with a Multi-Master setup? I've tried to follow this guide to setup a semi-synchronous replication for a master-slave setup: https://avdeo.com/2015/...
0 votes
1 answer
18 views

Citus: Why sequential scan in Citus slower than Single PostgreSQL Server?

I have been benchmarking Citus distributed tables against PostgreSQL normal tables. I was expecting a good lead for Citus in analytical queries but I don't understand the behavior of Citus once it ...
1 vote
1 answer
442 views

How do I recover from Mariadb(10.4.18) binlog corruption

I have a 3 node Mariadb Galera cluster running Mariadb 10.4.18 on ubuntu 18.4. I applied updates to one of the nodes this morning and now Mariadb doesn't start on that node with the following error. [...
0 votes
1 answer
25 views

Citus: Parallel worker not launching

We are performing Citus benchmarking and came across a situation where the planner makes the parallel execution plan but during the execution no parallel workers are launched. The cluster has 3 worker ...
0 votes
1 answer
42 views

DB2 Tablespace has no space SQLcode -960 SQLState=57011

Our application is inserting and updating records into a DB2 database. It's been running for about 3 years, and we encountered an error SQLcode -960 SQLState=57011 SQLERRMC=IS_SMALL_TS The tablespace ...
0 votes
1 answer
387 views

How to restore Mongodb db with collection.wt and index.wt files

I have collection-0-xxx.wt and index-0-xxx.wt files simply copied from another dbpath. I am wondering if those files are enough to restore the data in MongoDB. If yes, how can I do that? If not, what ...
0 votes
0 answers
10 views

How to use replicate tables with NULLable composite unique identifier fields?

I will preface with saying that I'm no SQL expert. I have tables that exists in multiple databases in a hub and spoke style architecture where there are Machine DBs which logically publishes their ...
0 votes
0 answers
15 views

SSIS Dataflow Task issue, moving data from any Source to MySQL via ADO.Net

Can you please help me in getting this problem solved.. I'm trying to build a SSIS package where I'm moving the data from any Source to MySQL. However I'm getting a weird problem in dataflow task. [...
1 vote
1 answer
22 views

Aurora Postgres - Database per Tenant architecture issues

We have a multi-tenant SaaS app. We had been using a shared DB for all our tenants with TenantId as foreign key in all the tables. Everything had been working fine, till our business required DB (or ...
0 votes
1 answer
461 views

How to reset object permissions to default?

I've just been added to a project using Postgresql 11.4 where database security has been an afterthought. As part of tightening things up, I've used ALTER DEFAULT PERMISSIONS to set sane ACLs on any ...
0 votes
0 answers
5 views

Logical replication fails with "publisher did not send replica identity column expected by the logical replication target relation <table>"

I have two postgre databases where one is set to publish a table and the other subscribes to it for logical replication. This is setup in PgAdmin. This is a simple test case, and the table i'm ...
1 vote
1 answer
1k views

Mariadb (MySQL) On Windows- problem entering non-ASCII characters in a query

MariaDB: mysql Ver 15.1 Distrib 10.3.8-MariaDB OS: Windows 7 Pro 64 bit I have my server database and client all set up (I believe) to support utf8 end to end- (**my.cnf**) # # Set everything to ...
-2 votes
0 answers
13 views

Minimum RAM and Processor Requirements for Server with 70GB Database and Data Warehouse (SQL Server 2019)

I’m seeking advice on the minimum hardware specifications required for a server to efficiently handle a database setup we have. Here are the specifics: Database Size: 70GB Number of Users: ...

15 30 50 per page
1
2 3 4 5
2074