All Questions

0
votes
1answer
20 views

Splitting row into multiple records based on row value

I have an Orders table (text customer_id, int total_orders) which contains overview stats of total orders for each customer. What I am trying to do is generate a query output that will represent a ...
1
vote
1answer
33 views

How to copy all firewall rules and apply them on a new server?

I often install new SQL Server Servers. Be them production, test or development. There is one thing I still have not automated and it is time consuming: the firewall settings. I know how to ...
0
votes
0answers
6 views

Integrating MongoDB metrices with Cloud watch

We are hosting mongodb in AWS environment and planning to create incident in Servicenow using AWS Cloud watch alarm facility Has anyone integrated MongoDB Monitoring metrices with Cloud watch to ...
0
votes
0answers
28 views

What makes ALTER TABLE X SET UNLOGGED; to be slow?

We develop and maintain a JEE Application with Postgres (multiple version of it as we've got different customers using different versions). The Code evolves over time; database changes are organized ...
0
votes
0answers
28 views

How can i add a sub query for a new column on this table?

This query creates a table but the resultant table has dups on ACT_CAND , i can get the correct count on ACT_CAND but only after running a subquery on the table. I am looking for way that i can get ...
0
votes
1answer
38 views

Will frequent creation and deletion of TABLE (not indexes) cause fragmentation in database?

Does frequent creation and deletion of physical table in database causes fragmentation? I am frequently creating and deleting database for loading data warehouse load. I am using these table to hold ...
0
votes
0answers
22 views

Aggregate per Group returns Duplicates

I have the following scenario a user belongs to several Groups. The Groups are organized in a hierachy: I want to aggregate all the Person Information of the Groups the User Belongs to. Eg. Person 1 ...
0
votes
0answers
18 views

LDAP Database representation

I have to make a centralized repository for appliance configurations. We planned to use LDAP as it's already present to provide centralized auths on our embedded system. I'm facing some issues ...
9
votes
2answers
1k views

Why is this faster and is it safe to use? (WHERE first letter is in the alphabet)

Long story short, we're updating small tables of people with values from a very large table of people. In a recent test, this update takes ca 5 minutes to run. We stumbled upon what seems like the ...
-2
votes
0answers
16 views

Connection to SQL Db from Linux server [on hold]

How can we establish connection from a Linux machine to a SQL DB to execute a batch script
0
votes
1answer
35 views

How to sort categorical values by an arbitrary order?

I have a table called ANIMALS which looks like this | name | category | ------------------------ | fluffer | CAT | | tooter | ELEPHANT | | tooter_jr | ELEPHANT | | woofer | DOG ...
0
votes
0answers
15 views

How to ignore errors in mysqldbcopy

Is there an option to ignore errors and continue copy in mysqldbcopy
1
vote
0answers
15 views

MySQL FullText Search returning Zero rows

I have a query that works really good on searches in my table. However, I came across this certain search that resulted in no rows, even though I just added these rows and I know they are there (about ...
0
votes
2answers
15 views

Upgrading 5.6 to 8.0 without losing any data

I am using windows server. As per need of project I need to upgrade MySQL from 5.6 to 8.0 but I already have the existing databases and tables. How should I upgrade without losing any data in windows?
0
votes
1answer
20 views

MSSQL Agent Task Failing - Stored Procedure

I have a stored procedure that is giving me some issues as an Agent Job When running the task, I get the following error: Executed as user: SQLUserName. Access to the remote server is denied because ...
0
votes
0answers
15 views

DDLTrigger_Audit error “The user does not have permission to perform this action”

I have a DDLTrigger_Audit enabled in my database when I try executing a stored procedure having Drop and Create index statement in it fails with the below error. database "XXX" failed on Jan 17 2019 ...
0
votes
2answers
29 views

Get data from both tables what join should I use

I have T1 as table 1 ---------------- field1 | field2 --------------- val1 | val2 I have T2 as table 2 ---------------- field1 | field2 --------------- val11 | val22 I want to write a query ...
0
votes
1answer
12 views

Time addition based on previous column partition by different object

I asked a question on Time addition based on the previous row. Now I have another one related to that question. Appreciate if someone could give me some help. I use the following code to create the ...
-2
votes
0answers
29 views

How Sql query for tree from two tables [on hold]

table : Group id parentId name ---------------- 1 0 Category1 2 1 Category1_2 table : Depart_Group id parentId name Group_Id ---------------- 1 0 Name1 1 2 1 Name2 ...
1
vote
1answer
21 views

What happened to pg_xlog?

There uesd to be a directory called pg_xlog that stored all of the WAL logs in PostgreSQL? Part of restoring a basebackup under the archiving scheme required me to copy the WAL into DATA_DIR/pg_xlog. ...
0
votes
0answers
17 views

RING_BUFFER_CONNECTIVITY - LoginTimers - Error 17830 logs when releasing unused database connection in MS SQL

Good day, can anyone please help me with my problem? I have this program that uses QLOLEDB (also tried using the MSOLEDBSQL) to connect to local sql server express 2014 (ver 12.0.2). The program ...
0
votes
0answers
15 views

Help with high load MySQL configuraiton

Server: Disk: 2X 500 SSD RAID 1, 3 TB HDD RAM: 256 GB DDR4 CPU: Intel Xeon 10 core Database: Percona for MySQL 5.7.23 Average number of active connections: 1700 I have 4 schemas, and ...
1
vote
1answer
19 views

How to set Parent field according to another hierarchy field

I need some help to set a parent field according to hierarchy field like this: declare @Chart table([ChartId] int NOT NULL identity(1,1), [ParentId] int, [Number] varchar(5), [Serial] varchar(5),...
0
votes
2answers
32 views

Fastest tool or technique for occasionally syncing Postgres 9.6 databases

Occasionally I need to sync latest data and schema from production to staging db server. What tools or techniques do you recommend if syncing speed is a priority? The sync doesn't need to be in ...
-1
votes
0answers
34 views

Software to read or extract the data flow from databases

I want to know if exists some application or an easy way to retrieve the data flow from databases through triggers. Problem: Know all the data flow since the data comes to the the first database and ...
2
votes
0answers
40 views

Recursive query

I'm not sure if I need exactly a recursive query but this is what I'm trying to do. This is my Minimal Complete Verificalbe Code: I have a similar table like this (MySQL v5.7, InnoDB): CREATE TABLE ...
0
votes
0answers
24 views

CHECKDB run times issue

When using the PHYSICAL_ONLY option and NOINDEX with CHECKDB, my run times are longer! But, on the weekend, it is 1/4 the time without those options. Yes, there are more data changes during the week ...
1
vote
1answer
32 views

Using LIKE for a Range of Numbers

In my WHERE clause, I'm trying to use LIKE for a range of numbers. For example: WHERE rr.sequence LIKE '05600%' OR rr.sequence LIKE '05601%' OR rr.sequence LIKE '05602%' OR rr.sequence ...
2
votes
2answers
65 views

Get the max value from a slice of a JSON Array?

I would like to get the max value within a slice of a Json object (typicaly [1,2,3,5,6,7,9,10]) which is contained in a field named Data of the table raw. The limits Start & End of the slice are ...
1
vote
2answers
33 views

postgres parse_indent() function hang

select parse_ident('abc,efi&xyz'); Will stay there for ever, not returning. But a similar command will finish. select regexp_split_to_array('abc,efi&xyz', '[,&]'); ...
1
vote
2answers
50 views

Recovering a SQL Server database

In a series of unfortunate mistakes, I managed to lose 4 months of data and rapid database modifications. I’m not a database administrator, I’m a programmer that also designs and maintains a database. ...
0
votes
0answers
11 views

How to Total all Records in a Field?

this is probably very basic but I can't figure it out. I'm trying to total two records to give the output: £2,100 in the Total field but they keep coming out separate. Any help? Thanks.
-1
votes
0answers
18 views

Postgres Sql Stored Function suddnely slows after first five queries?

postgres SQL Stored procs suddenly slow down to ~1.2 min after first five queries, When recompiled it speeds up to ~ 200 ms for the next five then slows down afterward. the above behavior is seen ...
0
votes
1answer
33 views

Rebuild index error: “The job was stopped prior to completion by User”

I have a rebuild index job that is set to run every night. The job used to run fine, but last night for some reason the SQL Server Agent Job was stopped. The rebuild index job was running on 9 ...
0
votes
0answers
14 views

MariaDB Remote machine Data at rest encryption

I'm work on setting up a MariaDB local instance on laptops that will spend most of their time disconnected/unable to connect to the internet. One of the requirements of the project is to encrypt ...
-1
votes
1answer
31 views

Can I INSERT the result from a query INTO a new table with a TRIGGER?

I have a table named Stadistics which contains the data shown below: date hour num_prodcuts -------------------------------- 2019-01-16 12:42 3.2 2019-01-17 13:40 ...
1
vote
1answer
56 views

Issue with a “weird” deadlock in SQL server

I'm working with a database that has the characteristics that follow: GO /****** Object: Table [dbo].[ADS_EVENT_TYPE_STR] Script Date: 1/17/2019 8:20:36 PM ******/ SET ANSI_NULLS ON GO SET ...
8
votes
1answer
83 views

Why can you only drop a SQL Server view in the current database?

Just noticed this and was having a hard time coming up with a technical reason for it. Tables can be dropped using three part names, but views are restricted to two part names. What is the ...
0
votes
2answers
29 views

Postgres jsonb vs composite type performance differences

What considerations are involved in choosing between a jsonb column and a composite type column of the same structure? For example, consider a column like that used in the Postgres documentation: ...
0
votes
1answer
18 views

How to repair corrupted PostgreSQL pg_toast error

The hard drive on my PostgreSQL 9.5 server died, but I managed to recover most of the data. I've restored the database to a solid state hard drive, and I can access most of the data. However, when I ...
1
vote
1answer
45 views

Poor SQL Server Performance With Nested “OR” Conditions In LEFT OUTER JOIN

I have a tricky bit of SQL that's giving me a bit of trouble. I'd like to introduce several new columns to a key table whose components may or may not be used based on user configuration (Dimension's ...
5
votes
0answers
46 views

SHRINKFILE Failure - Why does increasing file size resolve it?

I am running some SHRINKFILE operations to clean up a bunch of tiny, unnecessary files in a filegroup. For one of the shrinks, the command below results in an error: DBCC SHRINKFILE (N'myfile' , ...
1
vote
2answers
31 views

Reverse SQL Server Listener?

The company that I work for runs our DMS database in an HA group with Always On. So there is a listener that we connect any applications to. We also have SSIS on the secondary replica of the HA ...
1
vote
0answers
28 views

Log shipping large database

I have Question on log shipping: I am migrating a VLDB (12TB) SQL database from a physical environment (server A) to virtual environment (server B), and from version SQL 2008 R2 to SQL 2014. The ...
2
votes
2answers
27 views

Storage pool configuration for SQL Server

We are in the middle of building a new SQL Server 2017 always-on cluster in Azure VM. The data disk layout of VM are as follows TempDb : 2 Azure Disk Read Cache TempDBLog : 1 ...
0
votes
1answer
7 views

configsvr and nojournal

trying to start mongo config server : mongod --configsvr --dbpath /data/config-1 --port 27019 --logpath /data/config-1.log --fork --journal gives: F CONTROL [main] Failed global initialization: ...
2
votes
2answers
26 views

How to select blocks with sequential data and aggregate the ids

I have the following table: id(int) startDate(timestamp) endDate(timestamp) plan_id(int) planned(bool) machine(int) --------------------------------------------------------------...
0
votes
1answer
16 views

operand should contain 1 column select query mysql

SELECT events.*, location.*, provider.name as provider_name,provider.name_ar as provider_name_ar, category.name as category_name, category.name_ar as category_name_ar, sub_category.name as ...
-1
votes
0answers
16 views

AlwaysOn Recovering Databases [on hold]

We rebooted Last Saturday, the AO groups failed over to DR except 1. When DR was rebooted, everything went into 'Recovering' mode on both nodes. Nothing is standing out to me to find the root cause. I ...
2
votes
1answer
36 views

What's an “object”?

The Postgres documentation frequently uses the term "object". For instance, the descriptions of various \d commands at https://www.postgresql.org/docs/current/app-psql.html (like \dt for listing ...

15 30 50 per page