All Questions

Filter by
Sorted by
Tagged with
0
votes
0answers
9 views

What should I index when joining on a table with conditions?

I have a query like this: SELECT "main_table".* FROM "main_table" INNER JOIN "other_table" ON "other_table"."deleted_at" IS NULL AND "other_table"."id" = "main_table"."appointment_id" WHERE "...
0
votes
0answers
4 views

How to reclaim disk space on a MongoDB Atlas replica set?

I migrated a replica set from mLab to MongoDB Atlas. mLab offered an automated process to reclaim disk space after dropping large amounts of documents from a collection. Compacting (or resyncing) ...
0
votes
0answers
5 views

sqlpackage RegisterDataTierApplication errors with Azure SQL Database

I am trying to run sqlpackage from an locally hosted Azure Function inside a Docker container (so Linux), I have downloaded the latest 18.4.1 sqlpackage and running the following :- sqlpackage /a:...
0
votes
0answers
15 views

SUM(CASE) Creating 4 new columns based on conditions

So, I have survey tale where someone is asked roughly 5 questions. 4 of those questions are the same questions but the options to their answers are different since they were to understand their ...
0
votes
0answers
6 views

Is it safe to use an output (to_char) date format string of more than 22 characters (ORACLE 11)

The ORACLE SQL manual (Page 2-58 of the main 11.1 SQL Manual) states: The total length of a datetime format model cannot exceed 22 characters. However, I've been able to use a format string for ...
0
votes
0answers
7 views

Comparing 2 items at different dates

I have a Netezza database which gets a daily feed of account information. I’m trying to write a query which will only return accounts when they experience a price change and advise what the price ...
0
votes
0answers
14 views

MySQL capability become insufficient

My ex-colleague deployed a MySQL database on Alibaba Cloud Elastic compute service (ECS) instance. I have taken over for 2 months. Due to traffic increase, the service capability (concurrent ...
1
vote
0answers
35 views

Weird memory pressure for SQL Server 2016

We have been battling an issue with weird memory pressure on a specific server for a couple of months now. Here's what the last incident looked like in SentryOne: System Memory SQL Server Memory ...
1
vote
0answers
19 views

SQL Server: Help in writing a query to get 3 rolling months average for a table

Query Thus far: select month,year,vol, --sum(vol) over (order by month,year ROWS BETWEEN 2 PRECEDING AND current row) sumnetvol, avg(vol) over ( order by month,year ROWS BETWEEN 2 ...
0
votes
0answers
5 views

Change PBIRS Layout

Does anybody know if it is possible to change the color of the PBIRS Reporting Portal. Currently its only black and we did not found a way so far to change it. Thank you...
1
vote
1answer
21 views

SSIS Package execution fails when started by user logging in with FreeTDS

I am attempting to let a login kick off an SSIS package via the built-in SSISDB stored procedures instead of doing so through SQL Agent. The login will be connecting through an Airflow DAG on a ...
1
vote
0answers
17 views

Why does querying for records that violate a foreign key return incorrect results?

While doing some pre-checking on a table before adding a new Foreign Key, we were querying to see how many current rows would violate the new key. This is a fairly active database with near constant ...
1
vote
0answers
21 views

SQL Server Agent is not ending some jobs correctly

we observed a strange behaviour after migrating our datawarehouse from SQL Server 2012 to SQL Server 2019. Our Agent runs most of the jobs correctly after the migration. However there are a few were ...
0
votes
0answers
12 views

Storing Large Quantities of Time Series

What is the recommended (type) of database design for storing large amounts of time-series data? The dataset: 2 million time-series; Each of the time-series contains around 500 timestamps; At ...
0
votes
0answers
13 views

Unable to view all schema and tables in Postgres DB in SQL Developer via a Putty Connection

I am trying to connect to a Postgres Database via an SSH connection. I am able to connect via SQL Workbench but when in SQL Developer, though the connection is successful I am unable to view any ...
0
votes
0answers
5 views

Postgres replica out of sync

we have a postgres 9.6 replica configured among 2 servers. We used the following configuration to create the replica: postgresql.conf wal_level = hot_standby max_wal_senders =...
0
votes
0answers
23 views

XA transactions - timeout errors

We have recently setup XA Transactions as per the document - https://docs.microsoft.com/en-us/sql/connect/jdbc/understanding-xa-transactions?view=sql-server-2017 However, app team is facing the ...
1
vote
0answers
11 views

SQL Server Encrypted Connections - Configuration Manager does not see Certificate

My goal is to implement encrypted connections on Test SQL Server instance First, tried to create self-signed certificate in the Certificates snap in (certlm.msc), Personal > All Tasks > Request New ...
0
votes
0answers
20 views

Database design of a simple teach-kids-to-read web-app

The question is about my database design. Is it OK? I feel uncomfortable about having 2 separate WordTraining and SyllableTraining tables and about too simple design (not much normalized). Maybe ...
0
votes
1answer
16 views

PostgreSQL full text search words delimiter

Please help me to understand how to change words delimiter when I use gin index. The problem is that "," ";" and " " signs are words delimiters but the "." isn't. So in phrase "Some 11.22.33.44 IP" I ...
1
vote
1answer
93 views

Can I use OUTPUT from an UPDATE in an INSERT?

I want to add a record to my app's "SystemSettings" table and set the PK value using the value from an UPDATE. The PK value comes from the "TS_LASTIDS" table which contains the maximum PK value for ...
-3
votes
1answer
18 views

Task Scheduler not sending emails

I have one Task scheduler. it was working fine before but now it is not working. i have connected this with my MVC application.when I connect my application with my test database it works good but ...
0
votes
1answer
24 views

Why does this stored proc cause a clustered index scan, but seek when using OPTION RECOMPILE?

I think I may know the answer based on my research, but am looking for confirmation on how/why the engine compiles the plan the way it does with Parameters being passed in: @ID int ,@OtherID INT ...
0
votes
1answer
11 views

How to find historical sql_id executed by users

I'm trying to find historical sql_id executed by users within interval between snapshot_id from AWR. I'm using the view DBA_HIST_ACTIVE_SESS_HISTORY,DBA_USERS and DBA_HIST_SNAPSHOTS to try find the ...
0
votes
1answer
12 views

Performance issues on json field update

I have a postgreSQL database on which I am experiencing huge latency issues when trying to update a json field using the following query: UPDATE collections SET "layout" = jsonb_set(layout, '{actions}...
0
votes
0answers
4 views

One or more subscriptions have been marked inactive. Drop and re-create all subscriptions for this node that are failing with this error

We have a production server error causing replication agent got failed and subscription became inactive. When I tried to restart synchronizing process, it is getting failed. Should I delete/drop the ...
0
votes
0answers
12 views

Fastest way to make full text searches through 2 columns?

I actually have 200 GB of data indexed on MongoDB, spread over 2 columns, each containing one string. The user search for 'cowboy', if this string is found anywhere, it returns the content. i.e: ...
0
votes
1answer
17 views

When should I extract a field into a new table?

Given a table : CAR --- id model_id condition fuel_id release_year Since many cars would have the same Model and same Fuel, there are 1:N tables created. Though, many Car objects can have the same ...
-3
votes
1answer
25 views

What is a connection pool?

Please explain me what is connection pool in Postgres and MongoDB database.
0
votes
0answers
7 views

MySQL Plugin failed to install due to “undefined symbol”

For several years now I have used the MariaDB Audit Plugin on my MySQL databases. I am now looking to start Upgrading my databases to MySQL 8, and so have just tried installing it onto MySQL 8.0.19, ...
0
votes
1answer
27 views

COUNT after CROSS JOIN

I have a script that cross joins about 4 tables: SELECT * FROM Districts CROSS JOIN Seasons CROSS JOIN Sectors CROSS JOIN Sites The above query will combine all the tables into one, see a sample ...
0
votes
0answers
14 views

How do I change the default ports for my Oracle database?

I can use Terminus app from my iPhone to connect to my oracle database. From my corporate network, I can't. So what ports do I need to change?
0
votes
0answers
29 views

MS SQL virtual hosted and coping with high latency on MDF disk

My current setup is a SQL Server on a virtualized platform with virtual disks which are distributed on separate SSD disks. Still I have 5 databases with different data load. Some are update very ...
0
votes
0answers
18 views

After doing latest windows10 update 1909 SQL Server Management Studio 17 not working

yesterday I have an update for windows version 1909, after updating to the latest version, When I tried to open SSMS it shows me an error like this(please check the screenshot).
0
votes
1answer
19 views

how to find backup history of SSAS database

Shockingly on Internet, I am unable to find backup history of SSAS database. Is there no way to do it? Also should we take multiple backups of SSAS database? I am not much aware of SSAS database. ...
0
votes
0answers
5 views

sqlite3 SELECT with COUNT, Group and order by

'm pretty new in sqlite3. I have a database with about 21 tables. I need to generate a report that will include District, Season, Sector, Site, (these are all tables in the DB), GroupCount, ...
0
votes
1answer
11 views

Need a query for accumulated values

I need query for accumulated values from particular column with specific time interval. time | value -------------------------- 2020-02-26 09:30:00 | 5 2020-02-26 09:31:00 | 3 ...
0
votes
0answers
12 views

Setting collection collation for master slave replication

I am trying to replicate a MySQL 8 server (master) to MySQL 5.7 (slave) instance. I know it is not officially supported, but the thing is we need to use a service that has only supports MySQL 5.7. I ...
1
vote
0answers
30 views

How to select all files of a SQL Server database from blob folder?

I have a SQL Server database. You can use the following script to create similar database: CREATE DATABASE [test] CONTAINMENT = NONE ON PRIMARY (NAME = N'test', FILENAME = N'C:\Program Files\...
0
votes
1answer
23 views

Trigger with multipe IF conditions doesn't trigger

I am trying to update the table latest_activities with the latest activity a employee had. An activity has multiple conditions to be considered as the latest activity. The reason why I don't do a ...
0
votes
0answers
34 views

Failing to insert into table getting error: ORA-00600: internal error code, arguments: [ktssinseg2]

I am facing problems inserting records into my oracle database 12C R2. I have no Oracle Support. All this time I was able to do inserts into my database, but all of a sudden it is now failing. Below ...
0
votes
0answers
12 views

Specifying MySQL user hosts with IPv6 addresses

Inspired after making the move to IPv6 on my MySQL server, and intrigued by the lack of documentation regarding 'user'@'[IPv6]' nomenclature I proceeded to discover how to limit my users based on ...
1
vote
1answer
17 views

Circular reference and multi-tenancy

I'm have an issue with circular reference in my DB design. As see the ER diagram below have 2 circular reference that I highlighted with Red and Orange arrow. Anyone know how to resolve this issue?
0
votes
1answer
12 views

What's the optimal way to query data using another table column as a between filter

sorry for the ambiguous question title. I don't know what's it called. The thing is let's say I've a order table storing uid , order_id and ip looks like this | uid | order_id | ip | 10000 | ...
0
votes
0answers
13 views

SQL Server 2017 - CU19 - Curroption of Tabular SSAS Db's

We've recently applied CU19 to our SSAS Dev server and immediately had db corruption errors on instance start-up. Event Viewer showing errors such as: Errors in the metadata manager. An error ...
0
votes
0answers
15 views

Storing type in each table or give item a type

I need to design schema for a project that involves two things. 1. providing services ( realted to vechicles) 2. Also sells insurance and spare parts Below is the schema that I have designed so far. ...
0
votes
1answer
16 views

Select query on information_schema is too slow

SELECT * FROM information_schema.TABLE_CONSTRAINTS WHERE CONSTRAINT_SCHEMA = DATABASE() AND CONSTRAINT_NAME = 'FK_FOLDER_FILTER_CONTRACT_CATEGORY_CONTRACT_CATEGORY' AND CONSTRAINT_TYPE = '...
-1
votes
1answer
32 views

How to Addition two Sums with Groups

( ( SELECT Sum(itemb.qty_invoiced*( CASE WHEN cod.disc > 0 THEN itemb.price * (1-cod.disc/100) ELSE itemb.price ...
0
votes
0answers
16 views

can we create edition in PostgreSQL like in oracle create edition edition name?

create edition e1; it giving missing keyword error. In oracle we create like this is. I wanted to create to edition in PostgreSQL like splitting the post db into 2 parts to make it zero down time.
0
votes
0answers
18 views

Migration of domain controller in a clustered environment

Recently we have switched our domain controller and during the migration I have noticed on the cluster manager the below error     Cluster network name resource 'Cluster Name' encountered an error ...

15 30 50 per page
1 2 3 4 5 1627