All Questions

0
votes
1answer
6 views

Do I need full recovery mode when I have multiple daily backup?

I have created 5 maintenance plans on my SQL server (say 50 !) which generate databse backup 5 times daily. As I read in this Q/A the full recovery is good when I need Point-in-time recovery. My ...
0
votes
2answers
8 views

How to get the SQL-server login name of an integrated security account?

Let's say I'm a user in windows domain DC (DataCenter). My user-name is DC\Somebody I'm in group DC\Developers Now SQL-Server has the login group called DC\Developers, and with that, I can login on ...
0
votes
0answers
5 views

Operation CTL_BOOTSTRAP canceled during phase 0, error = ORA-408

I am currently testing a data guard environment. In the alert.log of the broker I always see the following message after a switchover: 2019-05-23 08:08:54.716 7fffffff 0 Operation ...
0
votes
0answers
8 views

postgres 9.4 : process takes 100% CPU

when i run a request the potmaster process takes 100% CPU. Linux configuration, 8 GB RAM, 8 processors number and 4 core. Thank you
0
votes
0answers
6 views

Cannot get a user function to co-operate with a subquery in mariadb

The following is a demo of an issue we are having with a function and a subquery. I'm interested to know if it is a bug or if there is a reasonable explaination why it is failing. Notes: Problem ...
0
votes
1answer
4 views

Add replica from Node1 can't find node2 while installing SQL AlwaysON AG lab on virtual machines

I am trying to set up a SQL AlwaysON AG lab on virtual machines, with windows server 2016 and MS SQL 2017. While creating a new Availability Group on node1 by the wizard, I meet difficult that the ...
0
votes
1answer
6 views

How to join two tables in postgresql

First table Complaint_id Status Reopen 127493 5 1 127494 5 0 Second table Parent_id Currentstatus Reopen datetime usertype 127493 0 0 2019-04-08 ...
0
votes
0answers
6 views

How to Configure MySQL for Percona Monitoring and Management

I can not get any analytics from _PMM Query Analytics showing https://www.percona.com/doc/percona-monitoring-and-management/conf-mysql.html this is that link. I changed the configuration as ...
0
votes
2answers
10 views

Query Joining on Column headings

I have Survey results given to me in a massive table. (300+ columns) A list of questions is provided in a table, and the Survey results in another. Questions. +-----+-----+-------------------------...
0
votes
1answer
15 views

How can I write a trigger that can subtract values between two tables

I have a table called transaction that has these fields CREATE TABLE transaction ( transaction_id INT AUTO_INCREMENT, status varchar(255), myPIN varchar(255), amount_paid varchar(255)...
0
votes
1answer
5 views

MongoDB query choosing the wrong index in winning plan, Though in executionTimeMillisEstimate as lower for the other index?

MongoDB Query chooses the wrong index in the winning plan. I have two indexes for the same field, one is a single field index and a Compound index with another field. Eg. Field name: Field1, ...
0
votes
0answers
3 views

How to install repmgr 4.2 (ubuntu)

apt-get install postgresql-10-repmgr give me repmgr 4.3. However, my primary server is still on 4.2. How do I install repmgr version 4.2? Thanks in advance!
0
votes
1answer
7 views

can't update user password on Mongodb 4.0.5 (Use of SCRAM-SHA-256 requires undigested passwords)

I'm trying to update a password from a user, using changeUserPassword(), and I just receive the following message: Error: Updating user failed: Use of SCRAM-SHA-256 requires undigested passwords &...
0
votes
1answer
10 views

MySQL replication process parallel with user process?

I have process which executes query like below on Mysql(InnoDB) slave INSERT ignore INTO user_profile_temp (some_fields) select some_fields from user_profile user_profile is bigtable of 8GB ...
0
votes
0answers
11 views

Prevent read access on primary AG replica, but allow it on the readable secondary

We have a unique situation where we want to allow users to query a readable secondary replica of a database with SSMS for adhoc reporting, but not allow them to ever read from the primary replica. We ...
-1
votes
1answer
16 views

How can I get the max value for each column?

If data of table like this, [co1:varchar][col2:varchar][col3:varchar][col4:timestamp] And, Follow is data example. 224 / 755 / 542 / 2019-05-23 10:12:23 230 / 741 / 530 / 2019-05-23 10:12:23 221 / ...
0
votes
0answers
18 views

Understanding MAXDOP behaviour for queries going parallel

For my current server as below 4 Sockets with 10 cores per socket and 20 logical processors per socket. Total 80 per SQL licensing: 4 NUMA nodes with HT enabled I've set CTOP 50 and MAXDOP 8 on ...
0
votes
0answers
5 views

System-wide startup file for Postgres 10 on Ubuntu 18.04

When I log into postgres under my personal shell account, my .psqlrc file runs a series of meta commands to set up what is for me an optimum working environment. I'd like to set that same environment ...
0
votes
1answer
7 views

How to update JSON using logic equivalent to WHERE clause

My question is similar to another (and also another for postgresql) except in the other question the person wants to update values for a specific key. In my case, I want to detect elements having a ...
0
votes
0answers
16 views

I am a newbie and I need a query that will query a certain table/column from all the database [on hold]

My table name is File Column name is Location..I need the records that is in the column
1
vote
1answer
23 views

How do you retrieve the identity value of a row inserted from the OUTPUT of an UPDATE statement?

How do you retrieve the identity value for an inserted row when that row is inserted from the OUTPUT of an UPDATE statement? Neither @@IDENTITY nor SCOPE_IDENTITY() appears to be set properly. ...
0
votes
1answer
7 views

Join on unnested integer array column and count occurrences in array

I am trying to join two tables after I have unnested one of them. The tables are: CREATE TABLE teachers (id SERIAL, first_name VARCHAR(60), last_name VARCHAR(60)); CREATE TABLE training_modules (id ...
0
votes
1answer
5 views

PostgreSQL Trigger to override insert on table with inheritance

We have a table documents that is partitioned by time into child tables like documents_2019_01, documents_2019_02. We do this using a BEFORE trigger on the parent documents table to insert into the ...
1
vote
1answer
12 views

SSAS Tabular Model or SQL Relational Database for new Datawarehouse? Is SSAS still a good to learn technology?

I am in the process of creating a data warehouse using SQL Server for my company. I have created a POC with a simple SQL Relational database with a few(about 10) stored Procs for the ETL process. Now ...
0
votes
1answer
22 views

Oracle - large table with large IN

Table students has about 10 million records; ID is indexed. Student grades has 20 million records - student_id is indexed. I am querying about 20,000 students by their ids ids with a join between ...
-1
votes
0answers
12 views

Design schema to handle different data types (avoiding EVA anti-pattern)

So I have a table that stores ML model metadata. I have a table that holds my model. I need to also include hyper parameter information (epochs, batch_size, weight_decay, classes etc.). I don't want ...
1
vote
1answer
16 views

Basic information splitting and table design in a database about people, accounts and transactions

I am having trouble deciding which design would be considered a better practice. Say, for example, I have two tables: TABLE Person pid int primary key name varchar age int bank_account varchar ...
0
votes
0answers
49 views

How to unit test a stored procedure that has a temp table using tSQLt framework

I have stored procedure that creates a temp table #line(can't share the SP because of company privacy). I am using tSQLt framework. I am not sure how to address this situation. Please help tSQLt ...
-1
votes
1answer
18 views

How to check if a start and end date interval is within the range of another start and end date interval

As the title says, I need to check if a start and end date period is within the range of another start and end date period. I don't know if this needs to be done in a trigger or a stored procedure. ...
6
votes
1answer
247 views

Mysterious procedure calls without parameters - but no exceptions generated

I've been tracing a handful of stored procedures with EventClass RPC:Completed that are intermittently called from .Net SqlClient Data Provider without required parameters - just "exec SprocName". ...
0
votes
0answers
19 views

Store large amounts of text is Postgres

I have a large text corpus that I am storing in Postgres. A table articles has all of the metadata for each article, about 19 million rows. It's primary key is articles.doc_id. Another table (texts) ...
0
votes
1answer
30 views

Is it better to install a very large Postgres database (billions of rows) in a real or a virtual machine?

From my common sense, my physical machine hosting a very large Postgres database (for big data) should be real rather than virtual or container. Some people say it is better to install on a virtual ...
1
vote
1answer
30 views

Can the LOG file fill up from index rebuilds where the indexes are not fragmented?

Working on SQL Server 2014. I have noticed that a log file (60GB) on a database has filled up within the past day. To my knowledge, I am the only developer using this database and I have not been ...
1
vote
1answer
23 views

Index on JSONB not improving query speed

table structure Column | Type | Collation | Nullable | Default ------------+--------------------------------+-----------+----------+------------------------...
1
vote
0answers
13 views

Asynchronous availability groups not synchronizing on SQL Server on Ubuntu

I installed SQL Server 2017 on Ubuntu and setup an availability group with cluster type = "None". I set the "Availability" Mode to "Synchronous commit" and tested it. It works fine. All transactions ...
0
votes
1answer
18 views

Correlated Subquery can't access column from outer query

Given the following query which contains a subquery: SELECT COUNT(DISTINCT sc.caseID) AS 'TotalCases', (SELECT COUNT(DISTINCT se1.caseID) FROM scEvent AS se1 INNER JOIN scCase ...
0
votes
1answer
15 views

Disable Oracle substitution parsing

I need to update a string (VARCHAR2) value in an Oracle database which contains Javascript code. The update script contains the following string: c===l&&p(a,b) which when executed from "...
1
vote
1answer
19 views

How to TRUNCATE table if the table exists

I want to run a few TRUNCATE statements. But in between some of the database doesn't exists. But SQL stops the rest of the queries. Is there any way to ignore the error and continue to execute the ...
1
vote
0answers
37 views

How avoid updating unnecessary columns in Update statement?

I have an Update statement which update several columns. Some of those columns are nvarchar(max) type and not always need to be updated. I would like to avoid updating unnecessary columns, so, the ...
2
votes
0answers
12 views

SQL Server Audit File Metrics Information

I'm currently working in an environment that requires we enable SQL Server Audit, enterprise-wide. We generate .sqlaudit files as we have retention and access guidelines, and I'm finding that we need ...
-2
votes
0answers
17 views

Can we create read only service for Oracle primary database [on hold]

We have 1 Oracle primary database 12c without any active standby. Could we cra read only service ?
0
votes
0answers
24 views

SQL Server - CASE for multiple tables

hope I can explain myself right in this question. I have three (3) tables from which I have to build a report, this is the data selection process I need to do in order to correctly output the data to ...
-3
votes
0answers
22 views

Open source database for testing algorithm [on hold]

I have developed algorithm which probably would optimize query executions and accuracy of results. I am seeking for some open source or free database systems where I could run this algorithm. Even ...
0
votes
0answers
3 views

VS 2019 - Schema Compare - “The certificate chain was issued by an authority that is not trusted” when TrustServerCertificate=True

I'm trying to do a schema compare in VS 2019 with Active Directory Password Authentication. The account I'm using works in SSMS, but fails in VS with the following error, even when ...
0
votes
1answer
14 views

Mysql not writing to binlog

Mysql is not writing events to binlog, I have tried change the binlog configurations, but can't solve. Conf: server_id = 2 log-bin = master binlog_format = row replicate-do-db = our_db log-slave-...
0
votes
1answer
33 views

SQL Server 2017 Configuration Problems

On my Development Server I have two instances configured; the default and one for our ERP system testing. I can connect to the ERP instance remotely with no problems. However, I cannot connect to the ...
3
votes
2answers
67 views

why it is doing index seek

I created a sample table as below CREATE TABLE [dbo].[StatisticsDemo]( [ID] [int] IDENTITY(1,1) NOT NULL, [Name] [nvarchar](50) NULL ) ON [PRIMARY] Then I inserted below data as below: ...
0
votes
0answers
10 views

Lock wait timeout in error.log

Is there a way to put messages like 'Error Code: 1205. Lock wait timeout exceeded; try restarting transaction' into error.log in MySQL? MySQL: 5.7.26 | log_error | /var/log/mysql/error.lo ...
0
votes
1answer
20 views

In a replication setup, does corrupted data also gets replicated?

Say one of the tables got corrupted, will that corrupted table still get replicated to the other DB? Or, will the replication stop to prevent the other DB from being corrupted too? Note: Question is ...
1
vote
0answers
18 views

Levenshtein distance on MariaDB

is there any official or "de-facto" official implementation of Levenshtein distance on MariaDB 10.2 or 10.3? I found this https://github.com/juanmirocks/Levenshtein-MySQL-UDF, but I want to be sure ...

15 30 50 per page