All Questions

0
votes
0answers
20 views

Schema for workout history in MongoDb [on hold]

I am creating an application where there will be posted workouts and users can record scores to these workouts. In the future, these workouts may be repeated, and I'd like to be able to compare ...
0
votes
1answer
13 views

How to AUTOINCREMENT against another column rather than the whole table in sqlite?

I'm using a table to track messages sent in several different channels. I'd like to be able to track the index of each message on a per-channel basis. 'index' is a forbidden word in SQLite so here I'...
0
votes
1answer
23 views

PostgreSQL 9.6: Update on a single row table takes an unreasonable amount of time

I've got a table called source which has a primary key on its id and a “Unique Constraint” on the column name. This is the way the table looks: id int4 name ...
1
vote
1answer
33 views

Sync Server Objects when having two or more Availability Groups

Lets imagine that i have two servers/nodes with TWO availability groups Group01 and Group02. I will need to ensure that the server objects are all the time recreated over the secondary replica. If i ...
0
votes
0answers
23 views

plpgsql: mismatched parentheses at or near “;” in nested loop structure [closed]

I wrote a do block to keep only the tables in a Postgres database, but I received this error message when I ran the script. I can't see where parentheses are mismatched. I added the labels after I saw ...
-2
votes
1answer
50 views

SQL Server performance with FREEPROCCACHE [closed]

I watched a lesson on Youtube about SQL Server performance tuning. They demonstrated on a query "Wait Time per Core Per Sec". They use an update script as below: DBCC TRACEON(4199,-1); DBCC ...
0
votes
2answers
35 views

How to trim a string by finding multiple words

I want to trim a string if it contains certain words or characters. This is just part of a big stored procedure. I want if v_selection_name contains any of those characters .eg: ' (RES)' or ' (R)' ...
0
votes
1answer
65 views

Optimizing single-row DELETEs from a table with many FOREIGN KEY references

In a database I am working on, there is a table called persons with about one million rows, and 60 FK (FK) constraints from other tables (some with many millions rows) pointing to it. If I delete one ...
0
votes
0answers
40 views

How to calculate count of rows of Memory-Optimized Table?

Performance is important for me so I don't use select count(*) from MyTable. I use the following query to calculate rows count: SELECT SCHEMA_NAME(schema_id) AS [SchemaName], [Tables].name AS [...
13
votes
3answers
1k views

SQL Server has encountered occurences of I/O requests taking longer than 15 seconds

On Production SQL Server, we have following config: 3 Dell PowerEdge R630 servers, combined into Availability Group All 3 are connected to single Dell SAN storage unit which is a RAID array From ...
0
votes
0answers
40 views

SQL employee Database [closed]

This is my attempt, though I have done it in Access: Please help me, I would like to design an SQL college employee database. In my database I would like to have the following tables: Employee ...
0
votes
1answer
35 views

How to convert date and/or time from character string as variable field

I have a backup report which looks to see if all databases have been backed up within the last 30 days, and want to insert 'Not all databases backed up in last 30 days' into that field (datetime type) ...
0
votes
1answer
23 views

I need to run a procedure that goes through all schemas tables in MySQL server [on hold]

I am new in creating procedures ,Actually I need to run a procedure that will run on all schemas tables in my server when am calling the procedure it gives me this error ERROR 1046 (3D000): No ...
0
votes
0answers
15 views

dbms_stats.gather_schema_stats - ORA-20011: Approximate NDV failed: ORA-12801: error signaled in parallel query [closed]

We are getting ORA-600 while stat collection, DB - Oracle 12.2 (CDB/PDB) OS - RHEL exec dbms_stats.gather_schema_stats('MYSCHEMA', options => 'GATHER AUTO'); (OR) BEGIN dbms_stats....
0
votes
0answers
45 views
+50

MySQL 5.6 too much write after enabling compression

Recently I have enabled table compression (i.e. ROW_FORMAT=COMPRESSED) on half of the tables in a MySQL 5.6 server. I am observing: much higher write IOPS (~700 -> ~3000) dangerously lower dirty ...
0
votes
2answers
25 views

Speeding up Postgresql manual index reset?

I'm merging databases with each other. One problem I have is that both of the database tables have the same primary keys (starting from 1, but otherwise they are different records). To solve this, I ...
0
votes
1answer
38 views

Error at installing Microsoft SQL Server 2017 Database engine services and uninstalling multiple instances

I am trying to install Microsoft SQL Server 2017 with SQL Server 2017 media installation tool, but next error occurs at installation: PerfLib 2.0 counter removal failed with exit code 2. Command ...
0
votes
1answer
64 views

Oracle related to count(*) syntax alternate options [on hold]

i am using a Stored Procedure which are using multiple count(*) in oracle which makes slowness of the server the same i have used in db2 using if exists() which works fine in db2 but the same syntax ...
0
votes
0answers
10 views

Referencing multiple user id's in a single field

I'm creating a system where a user can make a prediction about an event, and if they get all the predictions correct they win. I have three tables: users, games and predictions. The structure of each:...
1
vote
0answers
19 views

SQL Server Audit Specifications Not Writing to the Security Log

I've come across an issue where SQL Server database audit specifications have stopped writing to the security event log. The audit object will write events to a SQL audit file or the Application ...
0
votes
0answers
9 views

PgBouncer for connections from both application and developers

I have 2 scenarios: "hide" PostgreSQL for all (developers and application) and let them connect to the database only through PgBouncer; use PgBouncer only for application and let developers connect (...
0
votes
0answers
14 views

libmysqlclient.so crash - yaSSL

I'm using MySQL as backend. I've a master and slave Qt application running on 2 systems. Slave application connects to master db remotely. I'm on MySQL 5.7.26. I'm using mysql-community-server on ...
0
votes
0answers
4 views

Complex queries in CouchDB across multiple documents

I'm relatively new to CouchDB (more specifically Cloudant if it matters) and I'm having a hard time wrapping my head around something. Assume the following (simplified) document examples: { "docType"...
0
votes
1answer
35 views

SQL SERVER Convert BLOB data to STRING

I am trying to extract blob data from a SQL SERVER 2008 R2 database. The data is annotation data that an application stores. I have done some research and I have been partially successful in ...
0
votes
2answers
31 views

SQL switching values on a column

In interviews for software developer roles SQL questions can sometimes come up. There is a classic question around switching values in a column, typically swapping the gender of people in a table for ...
0
votes
3answers
50 views

Extracting data from extremely large csv files [on hold]

I have a 40gb csv file with over 60 million rows for data analysis. Each row has a unique identifier (some numbers). For example, the first row's unique identifier will repeat approximately 150,000 ...
0
votes
2answers
31 views

SQL Server - TIMESTAMP caused exception

I am syncing from PostgreSql to MSSQL using SymmetricDS. Some tables of the source database have timestamp field set too '0001-01-01 00:00:00.0' and it could not be able to insert to destination(SQL ...
2
votes
1answer
56 views

Simple query returning < 10000 rows taking 3-4 seconds

I'm having some trouble diagnosing this very simple query which seems quite slow to me, any help would be much appreciated. The table of relevance for the query at issue is defined as follows: ...
-1
votes
0answers
11 views

Can multiple people access the same Schema under MySQL Database with different credentials though [closed]

I am creating a Table in my schema and want rest of my Team also to be able to access it, is it possible ?
0
votes
1answer
33 views

Postgres Windows post-install “The database cluster initialization failed”

I've seen many solutions and have been working on this issue for hours now. After installation the post-installation script fails with the message above. This is a development installation of ...
0
votes
0answers
18 views

error while restoring database from mysql: ERROR 1006 (HY000)

I made a mysqldump from all my databases prior to fully deinstall and reinstall MariaDB. while restoring the databases with the following command, logged in as root: MySQL -u root -p < /mnt/...
1
vote
1answer
31 views

Optimize MySQL query retrieval from audit log table

I am running MySQL InnoDB 5.6. This is my first post, so please bare with me of any mistakes. I have this schema: I have a list of invoices in the invoice table, and if I want to see all the ...
2
votes
0answers
144 views

Drag and Drop table object explorer into query window issue Sql Server Management Studio 18.1

I recently installed SSMS 18.1 and I am having an issue when trying to drag and drop table names from the object explorer to the query window. For example, I am writing a query and dont want type out ...
2
votes
0answers
33 views

check if MySQL is using the Henry Spencer implementation for REGEX

Prior to MySQL 8.0.4, MySQL used the Henry Spencer implementation for REGEX and you could use this for word boundaries: '[[:<:]]' and '[[:>:]]' From 8.0.4 MySQL is using the ICU implementation ...
0
votes
0answers
22 views

How to select random name? [closed]

i got an issue. I'm making a airline software for a game and require database. Now, im trying to make my pilot select options. I have example 2 hours, 3 hours etc. So when my pilot select 4 hours, the ...
0
votes
1answer
18 views

Reusing literal string in different parts of query

I created this PostgreSQL query while troubleshooting a problem that turned out to be due to non-printing characters in my strings: with cte as ( select 'The character between the xes is evil: xx' as ...
0
votes
0answers
60 views

ORA-12516: when accessing another database via link

I need to bring some data (blobs) from another database. I created global links to enable bidirectional communication. The links work. When I try to bring some data from tables that have BLOB columns ...
0
votes
1answer
25 views

error 15466 An error during decryption

I have a stored procedure that runs xp_cmdshell with a user with sysadmin right.(it was created by someone else long time ago). For security purposes I need to remove the sysadmin right from this user....
1
vote
1answer
36 views

I need to Select 100 records (or less if there are not 100 records) per group from multiple tables

The following query gets me the entire universe of a.transactionId with b.dataItemValue: SELECT DISTINCT a.transactionId, b.dataItemValue 'Round Type', c.transactionRoundTypeName 'Round Type Name' ...
0
votes
0answers
8 views

how do I configure my database server to accept remote connections outside ide? [migrated]

I made a Derby server application in java that basically just launches a gui from which I can start, stop, see properties, see runtime info, etc.; using a NetworkServerControl.class. I run the server ...
0
votes
0answers
12 views

Server State - SQL Agent Jobs

I have a user who has SQL Server State Permissions so he can monitor his databases and processes. However, there are others that are not the users dbs When a sql agent job failes on the other db's ...
0
votes
2answers
29 views

Transaction Replication as DR solution

I have a production database server and a failover database server set up. All the transactions from the primary production db server is being replicated(transactional replication with initialize ...
1
vote
1answer
31 views

Determine Sequence last used value for sql server before 2017

I've got an issue with sql server before 2017. Its regarding current value and next value of a sequence. In 2017 you can determine based on the last_value_used that current_value is the last value or ...
0
votes
0answers
30 views

DDL change tracking [closed]

Is there currently a program that tracks changes in DDL source code in an automated way? Ideally I would be able to track any changes in the DDL and DML to be able to pinpoint any changes in DDL ...
0
votes
1answer
32 views

Find 13th min value in table group by a column

I am trying to replicate Small function in Excel which is Small(Array,K) gives Kth smallest element from stream of data. I want to find 13th Min value for perticular Column values. in my table I have ...
0
votes
0answers
22 views

How to delete a user in MongoDB 3.6

I was in trouble with deleting the users in mongodb3.6. I created a user with: db.createUser({ user: "username" , pwd: "password", roles: ["root"]}) And I deleted it with: db.dropUser("username") ...
0
votes
0answers
8 views

Migrate data from database on MarkLogic 7 to database on MarkLogic 9

I need to copy data from a MarkLogic 7 database to MarkLogic 9 database on another system. I tried backup and restore option provided by the MarkLogic Admin console. The original database in MarkLogic ...
1
vote
0answers
56 views

Transaction Log File corruption on Mirror server SQL 2017

Wondering if anyone has encountered database transaction log file corruption when database mirroring is enabled in SQL 2017 running on Windows Server 2019, on the Mirror server? If so, curious what ...
0
votes
0answers
4 views

SSIS: Error from ODBC provider when inserting into Always Encrypted table using CMK in Azure Key Store

I'm trying to use SSIS (Visual Studio 2017) to insert data into an Azure SQL table with a column that's encrypted via Always Encrypted, and a column master key stored in Azure Key Vault, but I keep ...
0
votes
1answer
27 views

MariaDB replication failure: Fatal error 1236 - binlog shows 'Event truncated'

Disclaimer: I am not a certified DBA I have configured MariaDB Master - Slave replication and everything was working but now have an error that I cannot get past. I have run the following on the ...

15 30 50 per page