All Questions

0
votes
1answer
20 views

How to use COLUMN and TABLE options in a RAISE statement

According to the docs, there are options to RAISE called TABLE and COLUMN. However , if I explicitly set them, they do not end up in the resulting error message. It seems only DETAIL and HINT are ever ...
2
votes
0answers
38 views

Solving inheritance without sacrificing data consistency in a relational database

Trying to get better at designing databases, I noticed I'm always stuck trying to solve variations of the exact same problem. Here is an example using common requirements: An online store sells ...
1
vote
1answer
19 views

SQL 2017 CU10 on Windows Server 2019 - Availability Group Listener fails to obtain IP from DHCP

We have a few instances of SQL 2017 CU10 Standard on several Windows Server 2016 machines, and normally we create Basic Availability Groups with Listeners obtaining IPs from our DHCP (192.168.112.0/22 ...
0
votes
1answer
18 views

MySQL - Split results of count function into columns derived from a separate column

The title seems a bit confusing, but I am struggling to put down what I need this query to do so best to explain it. I have 3 tables in my database (Using MySQL Workbench), but for this query I'm just ...
0
votes
1answer
27 views

Linux error: ORA-12514

I'm receiving the error below and as I'm not a DB expert, would love to have someone to help me. Error: ORA-12514, TNS:listener does not currently know of service requested in connect descriptor ...
4
votes
0answers
48 views

How do I identify the source of the 17886 errors (“server will drop the connection”) in my SQL errorlog?

I have a SQL 2012 server that is throwing the following error every 5 minutes or so: Error: 17886, Severity: 20, State: 1. The server will drop the connection, because the client driver has ...
1
vote
4answers
159 views

AG Cluster db upgrade by vendor

Vendor wants to put db into simple mode prior to upgrade then back into full recovery mode after upgrade. I do not want to do this because I am not sure what impact it will have on the db cluster. Won'...
0
votes
1answer
44 views

Loop Block with execution doesn't persist

I need to iterate over a result set and update records from the data. I am using an anonymous block but the information does not persist. Like this... do $$ declare dados Record; begin for ...
0
votes
0answers
14 views

Query to get the “Item — (1,n) --> Attributes” relation table?

given is the following database scheme and I am wondering how to build the appropriate query on a Postgres system. It is defined that Items can have multiple (1 -> n) Attributes which relation is ...
0
votes
0answers
10 views

Getting last modification date of a schema [duplicate]

Is there a way to discover the date a schema was last modified? I'm trying to decide if a schema's still being updated and is therefore "active" in my system. I use PostgreSQL 9.2 under Linux CentOS ...
1
vote
3answers
51 views

Long/complex INSERT and UPDATE query parser or visual editor/query builder [closed]

I have long INSERT queries that insert values to table with over 50 columns. Is there any tool to parse this long query to key-value representation? like: INSERT INTO sometable(col1, col2, col3) ...
5
votes
4answers
194 views

Giving EXEC (@Variable) a Column name and Concatenation

I'm trying to writing a stored procedure that will check for orphan data before our customers attempt an upgrade, as orphaned records can cause issues. This is what I have thus far; IF EXISTS (SELECT ...
0
votes
1answer
20 views

Syntax Error on Create Trigger

CREATE TRIGGER new_trx_tmp_on_transaction_update AFTER UPDATE ON transaction FOR EACH ROW BEGIN IF NEW.trx_status = 1 AND ( NEW.cat_id = 'CASHBACK' || NEW.cat_id = 'REFUND') THEN INSERT ...
0
votes
0answers
30 views

Audit for specific users

We would like to audit the activities of a few users (logins) in a SQL Server database. We have enabled auditing on the database we would like to watch, but we wonder if we can selectively view the ...
0
votes
1answer
40 views

Find rows with specific string inside column text

I'm new in working with SQL Server and I'm trying to select all rows which has a specific string inside a column. The field has a big string of characters, for example: ...
0
votes
0answers
30 views

postgresql - trouble to order a list obtained by string_agg

I obtained a list of numbers (and text) by a string_agg. For instance, that : "09,12,20,200,217,400,500,90,91,92,Exp3" This is the string_agg: string_agg(DISTINCT t_ligne.ligne_code::text, ','::...
0
votes
0answers
21 views

help to monitor and trigger script which then send mail [on hold]

I need some help to run query which monitor a db account (SSMS), and once account is on a certain value, it must send me an email. I have my SELECT script I have already set up the : EXEC msdb....
0
votes
1answer
24 views

Make primary key and unique id as foriegn key

I have two tables as follows: UserProfile CREATE TABLE IF NOT EXISTS USER_PROFILE ( id BIGINT NOT NULL AUTO_INCREMENT, user_id BIGINT NOT NULL, name ...
0
votes
0answers
11 views

Adop prepare failed due to the Node Manager is not up

While i am running adop prepare stage in 12.2.6 , getting a error WLSTException: Error occured while performing nmConnect : Cannot connect to Node Manager. : Connection refused. Could not connect to ...
0
votes
0answers
24 views

Sync PostgreSQL with Cloud and multi Local Locations

I need help with a complex (for me) multi server setup with PostgreSQL. I have to setup a Cloud Server and 3 Local Servers for our company. Each Server will have: Linux Ubuntu 16.04 Docker ...
1
vote
1answer
35 views

Left join that has more than 0 matches [on hold]

Let's say that in the on clause of a left join (a on b), some products of a and b satisfy the on clause and some don't. Will the products that do not satisfy the on clause be included in the result ...
0
votes
1answer
23 views

Our replica set config is invalid or we are not a member of it - MongoDB

I have started the mongodb server with replica set name 'rs01' enabled on port 27001. enter image description here Then started another command window to start the mongo db on the same port. enter ...
-1
votes
0answers
25 views

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible [on hold]

I am trying to connect remote SQL server 2014 from windows services which is installed in windows server 2012.The below is the connection string using in application <connectionStrings> &...
0
votes
0answers
22 views

ERROR 1794 (HY000): Slave is not configured or failed to initialize properly

This is my my.cnf file: [mysqld] server_id = 1 log_bin = /var/log/mysql/mysql-bin.log log_bin_index = /var/log/mysql/mysql-bin.log.index relay_log = /var/log/...
0
votes
0answers
28 views

Need Help in extended events SQL Server

I have created an extended event as below. I want to know how to query the historical data using T-SQL to see the issues at particular timestamps. The trace is running as of now CREATE EVENT SESSION [...
0
votes
0answers
10 views

How many keys does wallet keystore have?

I my scenario I have configure transparent data encryption with password based software keystore only for example 'ewallet.p12' and create a master key for software keystore. I want to know can we ...
0
votes
1answer
13 views

Group json data in db using a query

I have a db whose values are as follows:img Can I call the json value of listing_id(23,27....so on) in properties column(with having row value as "listing") using a single query, I would Really ...
0
votes
2answers
27 views

Select rows where one row meets a condition

I have a table with 3 columns: UserId ProductId Status 1 100 1 1 1 0 2 100 0 4 100 0 5 1 1 5 100 1 6 ...
0
votes
1answer
17 views

Oracle Loop through values from one table and join with another table

I have a table (table1) with fields package_id and contract_id. Data in table 1 is like that 1 package_id can have 1 or more contract_id associated with it. I have another table (table2) with ...
0
votes
1answer
25 views

Can an AlwaysOn Availability Group be used to mitigate downtime when there's replication syncing issues on the primary server?

Once in a while I'll run into syncing issues with my subscriber server in a transactional replication setup. Taking a new snapshot of the publisher causes significant downtime on my subscriber server. ...
2
votes
1answer
28 views

Implicit Conversion of VARCHAR Column to NVARCHAR does not cause expected table scan

Given the following script, I can see implicit conversion and Data type precendence have a negative impact on a query plan -- create objects CREATE DATABASE ConvertTest GO USE ConvertTest GO CREATE ...
0
votes
0answers
36 views

Always On Availability Groups does not have permissions

I have configured "Always On" on SQL server 2017, and also created a backup maintenance job using the wizard, but when I executed the backup job I got following error: Could not process the operation....
0
votes
1answer
14 views

Mariadb times out on startup after system reboot

This is continued from: https://stackoverflow.com/q/55071021/8644833 Mariadb shuts down after running for a minute or two. If I remove Mariadb and reinstall (keeping my databases), everything works ...
2
votes
3answers
43 views

How to group many information une one select

There are my database articles id | art_code | art_name 1 | 5678 | computer 2 | 0987 | display 3 | 8547 | keyboard action id | code | action | qte 1 | 5678 | IN ...
0
votes
0answers
12 views

MySQL slave connect to master error_code 2005

I have a master running MySQL 5.6.17 on Windows 10, and a slave running MySQL 5.7.25 on an Ubuntu 17.10 box on a (Windows) LAN. Replication ran fine until Ubuntu upgrade to 18.04. Now slave ...
0
votes
0answers
14 views

Postgres ALTER TABLE xyz REPLICA IDENTITY FULL

I am trying to alter a table in a database with (postgres 10.6) ALTER TABLE xyz REPLICA IDENTITY FULL; However, the command does not return. Is there any way to diagnose what the issue is, or any ...
6
votes
0answers
113 views

SQL dumping all pages from buffer cache every few minutes

I have a single SQL2012 SP4 node running several databases. The server has 20GB of memory available, 14GB allocated to SQL (nothing else running on the box). Every few minutes SQL dumps the whole ...
0
votes
0answers
15 views

Are multiple simultaneous direct loads a better strategy than individual inserts in PostgreSQL?

In our application we run a background processor called Sidekiq which allows us to run hundreds of idempotent jobs against the database in parallel. We have one job which can add up to 3,000 inserts ...
1
vote
0answers
14 views

Enabling FileStream in existing clustered servers in SQL Server 2012

I have heard that enabling FileStream in an already existing clustered environment is tough. I'm working on a consolidation project and currently analyzing the impact it will have if we migrated DBs ...
1
vote
1answer
13 views

Remove text from columns that may or may not be present multiple times

I have the following table in SQL Server 2008. create table OrgUnits ( OrgUnitId int not null constraint PK_OrgUnits1 primary key, OrgUnitName varchar(100), OrgUnitLevel int not null, ...
4
votes
1answer
111 views

SQL Server Primary Login Restrictions

I have read only routing setup and working fine. I have a SQL login that accesses the readable secondary via the listener using ApplicationIntent=ReadOnly. However I want to prevent the user from ...
1
vote
0answers
17 views

AlwaysOn Replicas set to manual but failing automatically

My two synchronous-commit SQL AO replicas are set for manual failover mode but are failing over automatically. When I look through the logs and extended events, it looks just like what would happen if ...
0
votes
0answers
17 views

PostgreSQL - Which SQL commands I need to create a column and insert it images base64 strings? [on hold]

I'm trying to save 3 base64 strings from 3 images, so I think the best way to do this is storing the content in an array of strings. So, I want to know, In Postgres, How to create the specific column ...
2
votes
3answers
120 views

How to get the name of the database a stored procedure is executed in within that stored procedure while it's executing?

Weird question?...maybe, but I have a need. :) I have a stored procedure that I want to use universally in any database. The stored procedure generates some dynamic SQL and then executes that SQL in ...
0
votes
1answer
23 views

Mysql replication rebuild dump database lock

I need to rebuild master-slave replication of whole instance of mariadb on innodb. What I often see is that people do read lock then dump master then unlock, like: FLUSH TABLES WITH READ LOCK; SHOW ...
0
votes
1answer
28 views

How does MySQL DELETE work internally?

I have two major doubts: Does a DELETE query first identify all rows to be deleted (from the where clause) and then delete them all, or does it delete rows as and when they match the where clause? ...
0
votes
1answer
13 views

Microsoft SQL secondary read-only DB for SSRS?

I know that Microsoft SQL has AlwaysOn with a read-only secondary replica. However the cost of enterprise edition for all of our SQL servers makes this not possible. We have SSRS configured to run ...
-1
votes
2answers
27 views

Always On Failing Over Back to Primary [on hold]

IF Primary server is down for a day and Log is increasing. What steps should I take to failover back to Primary. What is log has grown too big and there is no chance of sychronizing.
2
votes
2answers
62 views

Remove string after first and second specific character in a string

I have some text in a field like below; Confirmed Diagnosis ================ Stroke || Entered: 19-02-2019 01:36:39 || Notes: Suspected Diagnosis ================ Transient ischaemic attack || ...
0
votes
1answer
33 views

How can I reset Aborted_connects in MySQL?

A recent issue in our network caused a large number of aborted connects, which is now being displayed on the health dashboard of our web application as a potential issue. Aside from restarting MySQL, ...

15 30 50 per page