All Questions

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

SQL 2017 log reuse issue

I have a SQL 2017 Enterprise server where more and more VLFs are being consumed and none are being released. Log backups are running every 15 minutes. It is in an AG but this is working correctly (...
Bruce Benson's user avatar
2 votes
1 answer
51 views

Is it possible to register two SSL certificates on SQLServer?

In SQLServer 2019, is there a way to install multiple SSL certificates in parallel? I have the following situation: The division the server belongs to was sold and therefore new DNS aliases were ...
Christoph's user avatar
  • 121
4 votes
1 answer
180 views

What does SQL Server's Error Log actually log?

If you have ever played around with the error_reported Extended Event, then it becomes very obvious that the SQL Server Error Log only logs a tiny fraction of the errors that are thrown by code ...
J. Mini's user avatar
  • 401
3 votes
1 answer
178 views

Granting SELECT...INTO permissions

I've created a new schema, archive, and am able to create, read, update and delete tables within it. I have an EXTERNAL_USER who I'm trying to give permissions to so that they can carry out select.....
philipnye's user avatar
  • 151
3 votes
1 answer
930 views

Most efficient way to UPDATE a billion rows in AWS Aurora PostgreSQL?

I'm using an AWS-managed Aurora PostgreSQL v15 instance as catalog for a large number of S3 objects. The level1_dataset table has about 2 billion rows and its schema has a metadata JSONB column. An ...
Sotosoul's user avatar
0 votes
0 answers
31 views

Role management in SQL Server

What is the best way to manage roles in sql server in Azure VMs (multiple). We want separate logins for each users but it should be same on all Azure SQL VMs. We are currently using windows ...
Bishal Basyal's user avatar
0 votes
1 answer
14 views

Pgbouncer: Can pgbouncer take reserve_pool_timeout in milliseconds?

Is it possible to specify pgbouncer reserve_pool_timeout in milliseconds, I have tried specifying it with '500 ms' but throwing an error and then tried specifying 0.5, this time no error but unable ...
mediocre's user avatar
1 vote
0 answers
22 views

Is there a way to optimize this query by using a comparison row value approach?

I have tried to optimize this query as much as I can, but am coming up short with a specific part of it. I initially thought that by populating a bigint column instead of using UUIDv4's it might help, ...
jpea's user avatar
  • 111
-1 votes
3 answers
50 views

How are columnar databases faster for querying?

Why do so many people prefer columnar databases? To my understanding, people prefer columnar databases because they are faster for querying due to the fact that the cpu would be able to cache the next ...
KoalaMaybe's user avatar
0 votes
0 answers
42 views

Alternate T-SQL Approach for Creating a PATINDEX Funtion to Find Multiple Occurrences of a Pattern

I'm working on a project to parse through numerous varchar max fields for multiple occurrences of specific patterns. For example, a cemetery plot was originally sold on 2/14/1928, then deeded on 7/4/...
JasonVL's user avatar
-4 votes
0 answers
29 views

Word repetition not allowed in Sql Server [closed]

create table Customer ( id int primary key, name varchar(10), referee_id int null ); insert into Customer (id, name) values (1, 'Will'); insert into Customer (id, name) values (2, 'Jane'); insert ...
Lone_ambition's user avatar
0 votes
0 answers
15 views

How to import Oracle unified audit spillover files generated by Data Guard physical standby database without switching over?

I know that I can use the DBMS_AUDIT_MGMT.LOAD_UNIFIED_AUDIT_FILES procedure to load the unified audit spillover files (*.bin) into the internal unified audit tables in an Oracle 19c database. But, ...
cdub's user avatar
  • 101
0 votes
0 answers
26 views

Workaround for a view with joined data on encrypted column

I've got a view that currently has this within: SELECT * FROM customers_1 LEFT JOIN customers_2 on customers_1.last_four_of_ssn = customers_2.last_four_of_ssn AND customers_1....
Patrick's user avatar
  • 101
0 votes
0 answers
43 views

Does a system protected password automatically get included in SSMS when it is downloaded?

I work at a company where most things are password protected by a system admin password (which I dont have). Today I downloaded SQL Server and set up a basic local server. I was able to get in but ...
Matt Damberg's user avatar
0 votes
0 answers
6 views

Oracle SQL Developer - Find Database Object -- schema checkboxes shift position on restart - anyone have a fix for this?

I'm using Oracle SQL Developer Version 21.4.1.349 on Windows We have a large number of schemas. I only work with 3 of them. When I need to find something using the Find Database Object function, I ...
J.C.'s user avatar
  • 1
0 votes
1 answer
14 views

How can I monitor query performance on my Azure read-replica database?

I'm looking at Query Performance Insight for my read-replica database. But the information it shows are the performance stats from the primary database. How can I get the performance stats for the ...
Yossi Geretz's user avatar
-2 votes
1 answer
60 views

CXSYNC_PORT & "Long running low CPU"

I have a simple query like select * from MyTable where MyTableID=@p1where sp_BlitzCache warns me about "Long Running with Low CPU". The table has a clustered index on MyTableID, which is a ...
Henrik Staun Poulsen's user avatar
0 votes
0 answers
20 views

How to create table that logs old and new value

Consider the table "Names": ID Name 1 Paul 2 Tom 3 John I would like to have a table "archive" that archives the changes that have been entered through a form in the following ...
Lurcamera's user avatar
0 votes
1 answer
36 views

Preferred seconday backup in AG - what about the primary ? Shows no backups taken

I did setup the Ola Scripts sticking to https://www.brentozar.com/archive/2015/06/how-to-configure-alwayson-ag-backups-with-ola-hallengrens-scripts/ Options are: @Databases = 'USER_DATABASES', @...
Thomas D's user avatar
0 votes
1 answer
15 views

How to enable pg_stat_user_indexes on postgres on Amazon RDS

We want to check if we have unused indexes in our postgres 15.5 RDS instances. Currently, we did "CREATE EXTENSION IF NOT EXISTS pg_stat_statements" Which enables pg_stat_satements, but what ...
John Little's user avatar
0 votes
1 answer
35 views

Unique constraint for single structure that simulates relations between tables

Imagine I have several tables in SQL Server 2016: Cat Cat carrier Cat transit box Cat car Every object can be stored in higher level, but not necessarily directly one above with N-to-1. So a cat can ...
Macok's user avatar
  • 1
-1 votes
0 answers
9 views

Migration of MYSQL Replication set from AWS RDS to EC2 without data loss

Hi everyone i am having a MYSQL replica set with 1 primary and 3 read replicas hosted in AWS RDS, I want to migrate the data to AWS EC2 instance without any downtime and no data loss. Please provide ...
user avatar
0 votes
1 answer
22 views

composite index on (A,B) + single index on (A): postgres is using single when it "should" use composite?

There are several good posts, e.g: Should I use a composite or single-column index? showing that if you have a composite index on columns (A,B), and a single index on (A), postgres will use the ...
John Little's user avatar
0 votes
1 answer
28 views

MYSQL select similar records sorted by field from another table

I have these tables movie_scores id movie_id user_id score 1 1 1 10 2 2 1 5 movies id name collection 1 Interstellar 1 2 The Dark Knight 2 3 The Shining 1 4 Forrest Gump 2 Here we know that ...
Bobby Redjeans's user avatar
-1 votes
0 answers
19 views

PostgreSql Deleting rows decrease free storage space

I'm using .net6 and Npgsql.EntityFrameworkCore.PostgreSQL 6.0.8 with AWS RDS. After running RemoveRange and SaveChanges I see a dip in the FreeStorageSpace. After the initial dip, there's a few hour ...
Hannu Hytönen's user avatar
-1 votes
0 answers
31 views

How can I solve the ERROR 1064 (42000) in mysql?

I am trying to set up MySQL Master-Slave Replication. I have successfully done everything except Starting and Testing my Replication, after entering sudo mysql, I run CHANGE MASTER TO MASTER_HOST='xx....
user avatar
0 votes
0 answers
20 views

Replication Error (SQL Server Management Studio 2019)

I am getting the following error in the Replication Monitor: "The replication agent had encountered an exception. Source: Replication Exception Type: Microsoft.SqlServer.Replication....
TenSecondTom's user avatar
0 votes
1 answer
20 views

How to Do a Sub Query and JOIN for Comparison Report

Hi I was trying to do a Sub Query and Comparison Report For Example, I have a Table of Teams with Color AND Name in a Single Table. A person can be on more than one Team and Multiple Team Colors can ...
user1207381's user avatar
0 votes
0 answers
27 views

Use bitwise operator to confirm intA "includes" intB? (e.g. @schema_option in sp_addarticle) [duplicate]

I've generated scripts for our replication publications/subscriptions, and I'd like to confirm whether the sp_addarticle @schema_option param of 0x000000000803509F "contains/includes" the ...
Bobogator's user avatar
0 votes
0 answers
13 views

technique for building result set from multiple queries for pagination/sorting [closed]

I need a way to run the same query multiple times (it will vary) with different parameters combining the results and sort and paginate the combined results. Only way that I can think of so far is ...
Joel Sherriff's user avatar
0 votes
1 answer
10 views

Cassandra query response is empty as load increases

Cluster background: We have a three node cassandra cluster. As soon as I clear the entire database and start from scratch soon the load will reach about 100 GB per node and keep on increasing and ...
Jayesh Popat's user avatar
0 votes
1 answer
37 views

Number of Real Months Between Two Dates

Background We have service contracts that can start and end on any arbitrary dates. Typically however, contracts end "X years minus a day". For example, typical date ranges: Start Date = ...
HardCode's user avatar
  • 278
0 votes
1 answer
16 views

Do the vCores in my Read-Replica process the synchronization activity?

My initial understanding of my read-replica is that it would be less busy than the primary. After all, the primary is processing all the reads, inserts, updates and deletes which are supporting my ...
Yossi Geretz's user avatar
0 votes
1 answer
24 views

SQL Pivot table splitting rows on custom column names. I need 1 row per OrderId

I have this PIVOT table below. I have to dynamically create column headings based on the itemid value (1 to 50) in each order. then horizontally list them. in this example, it works, but it splits ...
paygboy00's user avatar
0 votes
0 answers
15 views

How to enable keyring_file on replication server MySQL?

I recently activated the keyring_file plugin on my master server (5.7.44-enterprise-commercial-advanced-log), so the replication server presented errors when trying to execute alter table xxxxxx ...
alexandredelcol's user avatar
0 votes
0 answers
18 views

ER model of an online bookstore

By my study, I am required to create an ER model. This is the first time I have done this, and I am not sure if the connections are correct. Can you please tell me if they look correct? Thank you in ...
Andrenov Ruslan's user avatar
0 votes
0 answers
13 views

How to Create a Case-Insensitive Unique Compound Index in MongoDB?

How to Create a Case-Insensitive Unique Compound Index in MongoDB? Question Body: I'm trying to create a compound unique text index in MongoDB with the following fields: tenant_id: 1 seller_id: 1 ...
Brainfuck's user avatar
0 votes
2 answers
29 views

How to calculate revenue by sales team if sales agents change teams?

Agents ID | Agent 1 | A 2 | B Teams ID | Team 1 | AA 2 | BB Memberships ID | AgentID | TeamID | Start Date | End Date 1 | 1 | 1 | 2023-...
simpatico's user avatar
0 votes
1 answer
36 views

Postgres Local Prefixed vs Nonprefixed Index

Oracle has global indexes, Postgres does not. So far so good. Oracle then has local prefixed and nonprefixed indexes and Oracle makes a deal of this difference, even in V19: Oracle Docs I don't really ...
Peter's user avatar
  • 158
0 votes
0 answers
17 views

Move Default Data Directory of PostgreSQL to a network folder

I am using Windows, and have only 1 C drive. Currently, my postgreSQL data is located at C:\Program Files\PostgreSQL\16\data Following instruction here https://www.youtube.com/watch?v=uPM4SwpPP4M I ...
cdt's user avatar
  • 1
0 votes
1 answer
20 views

A foreign key that references a table and another to reference the parent table (what's the alternative)

Background I am OK-ish at Database Design...and I am building out this layer first. It is for a KPI tracker app, for real estate investment businesses. The app's business requirements This KPI tracker ...
Mike Warren's user avatar
1 vote
1 answer
45 views

Database isn't using the correct index

I have a table that contains several jsonb columns. Here is a simplified version of it create table if not exists files ( id int generated always as identity primary key, source text not null, ...
Aditya Chempakasseril's user avatar
0 votes
1 answer
15 views

Mariadb upgrade from 10.3 to 10.11

Is it possible to upgrade from Maria 10.3 to 10.11. What are the necessary steps or any script that can be followed? Also I’m planning to upgrade my os from rhel7 to 8, what additional steps should I ...
madeinindia's user avatar
-1 votes
0 answers
25 views

Get a clickable path from a select

a variable in my table contains paths to the directories in which files are stored. from a simple select, I would like to be able to click a path and directly open the folder. I can't find a data type ...
fcka's user avatar
  • 111
1 vote
0 answers
11 views

Azure SQL Migration extension don't support MFA authentication

I'm trying to migrate an on-prem Sql Server database to Azure SQL Database. I'm using Azure Data Studio with Azure SQL Migration extension. My problem is that Azure SQL Database is configured by dba's ...
Valmir Cinquini's user avatar
1 vote
1 answer
23 views

Why can't I create more than 1 geo replica for my primary database?

I have a primary database in the Premium service level. I am trying to create a second geo replica to a different region. The primary is in the East Coast, The first replica is in South Central, and ...
Yossi Geretz's user avatar
0 votes
0 answers
16 views

Groups for local users in pgadmin4 (web server mode)

I have a containerized setup of pgAdmin4 V8.5 in server mode running. Does anyone know if I can create groups for local users in pgadmin4 in web server mode and set privileges for them? Basic idea To ...
krytopes's user avatar
1 vote
1 answer
88 views

Split intervals with two tables

I have two tables that allocate employees to cost centers. The first table (CCmain) shows the primary cost center. If an employee is assigned to more than one cost center, the second table (CCfraction)...
Stefan's user avatar
  • 11
0 votes
0 answers
16 views

Is there a way to take a cross-database advisory lock in PostgreSQL?

This is a follow up to Advisory locks: private to connected database or shared across cluster? where it turns out that the space of advisory locks in PostgreSQL are private to a single database. So is ...
Michal Charemza's user avatar
9 votes
1 answer
635 views

Extra NESTED LOOP / INNER JOIN causing NO JOIN PREDICATE warning

I have the following tables in my database. LastNames Table CREATE TABLE [dbo].[LastNames]( [LastNameID] [int] IDENTITY(1,1) NOT NULL, [LastName] [varchar](50) NOT NULL ) ON [PRIMARY] GO ...
John K. N.'s user avatar
  • 17.9k

15 30 50 per page
1
2 3 4 5
2071