0
votes
0answers
1 view

SQL Server 2016 Availability Group on DPM 2016 Alert me

I'm trying to backup my availability group in SQL Server 2016 using DPM 2016, but after I add the cluster in DPM, availability group show nothing to back up. I've set every secondary node to be ...
-1
votes
1answer
8 views

Left join with WHERE (microsoft access SQL)

given following 2 tables a, b: table a ID job 1 farmer 2 physician 3 bank clerk table b bID ID lang job 1 1 en farmer 2 2 en physician 3 3 en bank clerk 4 2 de Arzt 5 1 fr ...
2
votes
1answer
31 views

What Happens to dirty pages if the system fails before the next checkpoint?

Assuming a database using full recovery model, when a record is written in SQL Server (by INSERT / UPDATE etc) write ahead logging will ensure the change is written to the log file before modifying ...
-1
votes
0answers
19 views

Why does Oracle use MINUS instead of EXCEPT?

I just saw this after seeing MINUS in this powerpoint and looking for more information. MINUS Example The following statement combines results with the MINUS operator, which returns only unique ...
0
votes
0answers
9 views

How do I determine the cause of a SQL 2017 Mirroring Login Failure?

I have two SQL 2017 servers set up to create a Read-only replica on the secondary. All was working, but suddenly without any user intervention, the mirroring has stopped. I am seeing the following in ...
0
votes
0answers
24 views

Queries are super slow, a delete on an empty table takes 12 minutes

I am trying to figure out why my queries are becoming super slow. I tried a delete on an empty table, and it took 12 minutes: I am not a DB expert, so I would greatly appreciate some guidance as to ...
0
votes
0answers
20 views

Could not connect to SQL Server 2008

Tried doing this but could not solve my error Go to SQL Server Configuration Manager Start->all program->SQL Server 2008 R2->Configuration Tools->SQL Server Configuration Manager Explore ...
0
votes
0answers
17 views

Drop Table Problem: No catalog entry found for partition ID in database Server 2016 SP1 Enterprise

I am getting an error while dropping a table or its partitioned column with the following command: DROP TABLE [dbo].[TABLE_NAME] The error message is as follows: Msg 608, Level 16, State 1, Line ...
0
votes
0answers
10 views

How to setup CouchBase in Production with 3 nodes in each DC

I am planning to use Couchbase DB in production. I am planning to have two DCs, each with three nodes (for a total of 6 nodes). Some questions: What should be the setup if I am using 3 node in each ...
0
votes
0answers
8 views

I created a child table but it cant insert data when the parent table inserted data 'Cannot add or update a child row: a foreign key constraint fails

I used a trigger in a register table, when a user registered a new account it will trigger the below query Time: AFTER INSERT INTO users_reward(User_ID,reward_id) VALUES(User_ID,1),(User_ID,2),(...
-1
votes
0answers
9 views

How to insert bulk data from one table to another if not exist in postgresql

I have to insert bulk of data from one table to another only if not exists I have written following query in postgres INSERT INTO deposit.dormant_dep_accounts(dormant_date,account_number_id, ...
0
votes
0answers
7 views

Enable GTID on one node in Percona/Galera

Im having 3 node percona cluster. (5.6) Server ID is enabled on each node but all are different IDs. Binlog and log slave updates are enabled. Now I want to enable GTID on the third node alone. I ...
0
votes
1answer
19 views

Is it a good idea to index timestamp in postgresql?

Here is my table definition -- Table: public.my_table -- DROP TABLE public.my_table; CREATE TABLE public.my_table ( my_row_id text COLLATE pg_catalog."default" NOT NULL, my_item_id text ...
0
votes
0answers
5 views

Design star schema for many-many relationship

For example, I have following things: Product Entity, Employee. So I will design my fact table for Sale Transaction as: SaleTransaction - ProductID - EmployeeID - SellingDateID - Quantity - ...
0
votes
0answers
12 views

mysql how to let the foreign key table auto insert row when the primary table inserted new data

I have a user table, profile table, promotion point table etc. all these table has a foreign key refer to the user table in database, my problem is when a user register a new account the user table ...
-3
votes
0answers
22 views

Arabic question mark

Kindly I have stored an Arabic language on my database , but it is showing as question mark, How can display clear text.
0
votes
0answers
13 views

Select unique value pairs based on two participants that occur more than once inside a table

We are using MySQL where we have deals table that contains references to two users stored in two columns User_id1 & User_id2. There is no guaranty in which order those are stored. For example the ...
0
votes
0answers
8 views

How to set up a replication from a publisher to an always availability group with two replicas and a listener

There is a publisher that plays the distributor role, too. A database on the publisher is supposed to be replicated (Transactional Replication) to both replicas of a remote always-on availability ...
1
vote
1answer
71 views

How to make a table that could add many same number of different item?

I wanted to create a table to store coupons of users. For example, there is 3 coupon which is A, B and C etc. A user can have 10 coupon A, 20 coupon B and 5 coupon C etc. How should I create a table ...
0
votes
1answer
15 views

MySQL/MariaDB: Comparing performance between two queries

I am trying to compare the performance between two queries which give otherwise the same results. The idea is that I want to compare using Windowing Functions available to newer versions to faking ...
0
votes
1answer
32 views

Instead of C:\SQLDBA\ServerName\Instance rather C:\SQLDBA\ServerName_Instance

I am trying to create a folder based on the servername\instance to backup up to, i want the folder to create as servername_instance. Could you please point out where i am going wrong as it creates as ...
0
votes
1answer
10 views

Access Database Over Network (accde)

I have been creating an access database for my assignment. I am using SQL SERVER 2014 for the datasource for the access tables. Now the problem is that according to the assignment i need to make ...
1
vote
1answer
12 views

Why does pg_hba.conf sometimes have random rules added to it? (postgresql)

I have postgres 10.4 set up on a Linux machine, and sometimes there will randomly be rules at the top of pg_hba.conf that only allows an MD5 connection by a user "pgdbadm". I'm not sure if the ...
1
vote
1answer
19 views

Probable update error to mysql 5.7.21

I have a VM with Ubuntu 16.04.4 LTS. I use it for wordpress sites, so it haves mysql, nginx and php. I migrated from Azure to Vultr. For doing so I backed up all the databases in Azure and restored ...
2
votes
1answer
32 views

Directly go to Hadoop or use SQLite/Postgres as a stepping stone towards Hadoop/Spark?

In our organization, some people are working on setting up Hadoop with a lot of security restrictions etc. By the rate of progress, this seems complex, especially considering security restrictions, ...
2
votes
1answer
8 views

Are these relations in BCNF?

I have a homework question that I am trying to understand but having a tough time with this question. Any explanation or even pointers would be very appreciated (no exact answer expected - I am trying ...
3
votes
1answer
41 views

Running two MySQL servers that use the same data directory

The situation I have two MySQL instances, deployed on two different remote machines. Both MySQL instances access the same data directory, which is stored on a persistent volume (this volume is ...
-4
votes
1answer
35 views

Each record in a table references another unique table [on hold]

I have a table every record in which references another unique table with unique set of fields. How correct is this approach? Is there a better way to organize data in such scenarios? Database schema:...
1
vote
1answer
83 views

Split datetime records that fall between 10pm to 7am into new record

I am very new to SQL Server. I am trying to split time in time out records that fall between night shifts from a employee shifts table but I am having a difficult time doing so. Night Shift runs from ...
0
votes
1answer
18 views

How to create trigram by joining two columns

I am new to sql so this might be overly simple question that I am confused about. I am trying to create trigram index by joining three columns (images, tags, images_tags). I used string concatenation ...
-1
votes
1answer
31 views

Database design for a timesheet app?

I'm designing the database schema for a time tracking application and I need a little piece of advice. The application must permit the user: To enter for each day of the week the amount of time he ...
-2
votes
0answers
42 views

TSQL compare the values of the same column cells without knowing their values [on hold]

I have a table which contains just two columns, it is X and Y type of int. Column | Type X | int Y | int This are coordinates. I should write a procedure now while I have no access to ...
0
votes
1answer
21 views

How can I disable database lock in sqlite with python?

I made a application in python and it should read and write simultaneously in multiple instances(multi CMD widows)(multi-threading). each thread is configured independently so it will not change the ...
0
votes
1answer
29 views

Calculate Total Minutes of attendance in MySql

I have a design a table for attendance and here are the genral fileds AttendanceMachineLoginId EmpId AttendanceDateTime Whenever user come to office he has to make his attendance. The first ...
-2
votes
1answer
24 views

ERROR: ORA-00257: archiver error. Connect internal only, until freed [on hold]

The archiver process received an error while trying to archive a redo log. Please give me solution. enter image description here
1
vote
1answer
20 views

recover postgresql database after removal with --purge

I noticed, after a while, that when I got new versions of postgresql (I'm using debian testing) they were being installed while keeping older versions of the DBMS running in parallel (one listening on ...
2
votes
1answer
27 views

Do MySQL (5.6) triggers support 4 byte emojis?

I'm using MySQL 5.6.34 with the following settings: "character_set_client","utf8mb4" "character_set_connection","utf8mb4" "character_set_database","utf8mb4" "character_set_filesystem","utf8mb4" "...
0
votes
0answers
49 views

Wildly inaccurate Postgres EXPLAIN ANALYZE results

I have a postgres 9.5.12 table (~10M rows) running on an AWS RDS m4.xlarge instance, which has a coordinates column of geometry type, and a status column (enum) (both indexed). I need to know which ...
0
votes
1answer
23 views

data translating issues

I have these two table here in ssms: one is called client table, which have a column called city, and it is really city name, like new york, etc. Another table is called city table, it has city's ID ...
1
vote
1answer
14 views

Migrating PostgreSQL DB from AWS to Alibaba Cloud

I'm migrating PostgreSQL RDS instance from AWS located in Frankfurt to the RDS instance in Alibaba Cloud also located in Frankfurt. I use Data Transmission tool from Alibaba Cloud. It connects both DB ...
1
vote
3answers
37 views

Cant restore database from A to B using any method in SSMS GUI

I have two databases. One is production (A), the other is development (B). I use to be able to restore database from a backup.BAK file of A in B by using SSMS > right clicking databases > restore ...
0
votes
1answer
25 views

mysql update based on select result, How combine?

Here are two SQL statements. One is an select statement and the other is a update statement. I want to combine them. Select SELECT * FROM test WHERE `id`='1' Update UPDATE test SET `select_count`=...
-2
votes
0answers
15 views

maintenance plan updating table in different frequency shall not collide

Task is to update "main_table" with Content_A and Content_B. If both run at the same time they lock each other. All queries work as expected and can be executed by maintenance plan (let's call them ...
0
votes
1answer
25 views

Ola Hallengren Index Maintenance with compressed indexes

If the Ola Hallengren index maintenance solution is installed onto a server which already has compression applied to several of the indexes, will the script respect the current compression level when ...
5
votes
4answers
316 views

How to most efficiently find out if a record has child records?

I am writing a query that returns a single record from the parent table. I would like to also return in this query if it has any children. This is a one to many relationship. parent: -parent_id -...
0
votes
3answers
40 views

Insert Values Into Table, Putting Duplicates In Another Table

So I posted this question yesterday. Some of the responses I got were helpful, however it seems my issue is a bit more complex than I originally thought. After doing some looking the reason I was ...
2
votes
1answer
19 views

Access denied error in trying to connect to a MySQL db in Python

I am trying to write a script that connects to a server, then connects to a MySQL db (which I currently can do via Navicat - so I know my username and password for the MySQL connection are correct). ...
1
vote
3answers
34 views

Should a privileged port (<1024) be used to deploy Postgresql in production?

I've never found a recommendation to run Postgresql on a privileged port in production. What type of port should be used in production regarding security and best practices?
1
vote
1answer
12 views

Why MongoDB not running SSL?

I need to run MongoDB with SSL, the version that is currently installed is 3.4.16 without SSL. Can I download 3.4.16 with SSL and just stop the service copy the Bin files across and then start up the ...
1
vote
1answer
26 views

Is it good practice to have relationship between the tenant table and all other tables in a multi tenant application?

I am developing a multi tenant SaaS that uses Azure SQL for data storage. I make use of sp_set_session_context to make sure that any query only touches records relevant to the current tenant. I ...

15 30 50 per page