All Questions

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

RMAN restoring datafile out of ASM

Why is RMAN restoring the datafiles out of ASM and how to restore a backup into ASM? Here is one output. The tablespace triscaltb was restored in /u01/app/oracle/product/12.1.0/dbhome_1/dbs/...
1
vote
0answers
6 views

Under load, the following job-queue design does not work reliably, why?

I have a job queue table which is meant to mark-and-return one job at a time to the caller. The stored procedure works like this: update job_queue set status = "WORKING", job_id = <...
1
vote
2answers
17 views

Infinite loop in CURSOR

I'm trying to use a cursor to clean up temp tables when they are no longer needed. I have a small table which has the names of the temp tables along with an identifier. The cursor is stuck in an ...
2
votes
3answers
39 views

How do i intentionally fragment a SQL Server Index?

I would like to create bad indexes conditions intentionally on a SQL Server 2017 test database i have, just to better understand these maintenance scripts? SQL Server Index and Statistics Maintenance ...
0
votes
3answers
21 views

What is the latest version of SQL Server native client that is compatible with Sql Server 2008 r2

Title says it all, what is the most recent version of Sql Server native client that is compatible with Sql Server 2008 R2
0
votes
0answers
6 views

Fastest method to export bacpac file from Azure SQL database

I am aware of all the methods and have used it before. While now we have a 10GB database which we need to export.Which method would take the least duration. Using SSMS Export data-tier application ...
0
votes
1answer
7 views

Auto-archive MariaDB10 database table

I am trying to auto-archive active database table to archive database table using stored procedure and event in MariaDB10. These are the steps I am following: Create new table everyday just before ...
4
votes
1answer
13 views

Add INCLUDE term to primary key index in Postgres 11

I work with Postgres 11 and would like to change the index that backs the primary key of a large table (~750 million rows). The primary key is the bigint column id and I would like to include an extra ...
0
votes
0answers
7 views

How Insert data to child table in different schema using trigger function and auto updates for these child tables

I am trying to insert data to the child tables from different schema i.e parent table and trigger function were in schema 1 and child tables were in schema 2. It throws me an error while I am doing ...
1
vote
1answer
22 views

How to determine CHECK or NO CHECK for foreign Key using SQL Server System Tables

I need to know at a low level whether a foreign key is to be exported as CHECK or NO CHECK but can't find out where to find that information. I am using -- using INFORMATION_SCHEMA to enumerate ...
0
votes
0answers
10 views

Mysql considers a constant column NULL in left join

I have a query that uses an left join between a table and a subquery. The subquery has a constant field 'Toys' as Product that in the final result set returns null for every row. The query is: ...
2
votes
2answers
19 views

composite clustered index with partitioning

I have a table with hundreds of millions of rows. Data is regularly retrieved via various queries and inserted. There is a clustered index on LookupID (int) TypeID (int) Created (datetime) (These ...
0
votes
2answers
17 views

How can I drop a view only if it exists in Oracle?

I would like to perform a DROP VIEW IF EXISTS... command on an Oracle DB as it can be done on a MySQL database. How can this be achieved?
0
votes
0answers
13 views

how the database calculate the text size?

i have a table stored in file with 2Mb size, when I moved it to the oracle DB, it became around 100 Mb size or more! why? how the DB calculate the text or number size
1
vote
0answers
29 views

New to this site. Plan question

Here is the plan: https://www.brentozar.com/pastetheplan/?id=rkM8d7ONS I am mostly interested in how to get rid of the lazy spool? This is the query: SELECT DISTINCT SM.Security_ID '...
0
votes
0answers
4 views

PostgreSQL managed by AWS RDS - rdsadmin maxusedtransaction ID not shrinking

We are using AWS RDS Postgres. We reached the 200 million limit on one of the DB and triggered VACUUM FREEZE which took down the instance for roughly 40mins however the XID didn't shrink at all. We ...
0
votes
2answers
26 views

Is there a good reason to put the company name at the beginning of the table names? [on hold]

When developing a new system, for a big corporation. Technologies: Web, Java, Spring Boot, Rest Api, Postgres, Hibernate Company: Bank System: Promissory control, and all others Company name: ...
1
vote
1answer
8 views

Update all the elements of JSON array nested in a JSON column (Postgres)

I have json column with data that looks like this: { a: [ { q: 5 }, { q: 8 }, { q: 10 } ] } I'd like to map over the elements in the array and add an extra property ...
1
vote
0answers
10 views

How to reassign all privileges to another role in PostgreSQL?

​On an existing PostgreSQL server let say that I have two users "Alice" & "Bob" and I want to clean up my policy because they actually have the same job and should have exactly the same privileges ...
1
vote
2answers
14 views

Power BI Upload to SQL Reporting Services 2016

We have SQL Reporting Services 2016 and create SSRS reports, which are published to the report server. I have started to use Power BI Desktop (free), is it possible to upload the power bi reports to ...
0
votes
0answers
12 views

Where can I find resources for new PostgreSQL server builds?

I'm pushing my server admin team to create a build for a new PostgreSQL cluster server. I'm very curious about how AMD's new EPYC Rome platform will affect storage performance, but they are not the ...
0
votes
1answer
42 views

Microsoft SQL Server Metadata Corruption

we have a bad incident right now. One of our larger SQL databases has broken metadata. unfortunately the warnings were ignored and they worked a week on the broken SQL database. Is it possible to ...
0
votes
0answers
7 views

Replicatation broker between master and slave with 'Can't find master key from keyring

I Have created new instance on AWS installed mysql on the server and made that server as Slave and added it to master. Master is in different network. 1) Installed the keyring. Started the ...
-4
votes
1answer
11 views

How to list not nullable unique column list in postgres DB?

I want the list of unique columns with not null constraint
-2
votes
1answer
48 views

SQL Server Multicasting - Will it improve performance? [on hold]

Apologies in advance for the vagueness of this question. We're having a new product installed and it's performing really badly. I don't have access to any diagnostics - for this example, let's ...
0
votes
1answer
33 views

Can Extended Events used instead of Auditing?

In BOL it is mentioned does this mean Extended Events can capture all the events that are traced by auditing? Can we get all the functionalities of auditing just by using XEvents? thanks
-1
votes
1answer
20 views

How to check existence of a value in between two columns of the same table

I have a table bills having columns id, starting_bl_no, ending_bl_no. How can I check a new bill number input is already exist in the table? id starting_bl_no ending_bl_no 1 100 ...
0
votes
0answers
11 views

P2P message system design

Database noob here, just curious to see if my design could benefit from any improvements. My goal was to keep this as simple as possible: a user can create an account, two accounts can message each ...
1
vote
0answers
15 views

Person table with list of friends (=persons) field in MySQL

New to database design. What i'm trying to do is transform a java object called "Persons" into a MySQL schema. Usual values are fields like first/last name, adresses etc. with key=numeric id. But ...
0
votes
0answers
18 views

How to Configure Always Encrypted using PowerShell

I just want to ask if there is a way to configure always encrypted columns using power shell? like for example i want to encrypt a column in a table with deterministic using powershell codes?
1
vote
0answers
26 views

Upgrading old application from SQL Server 2000 to 2017

My company currently has a project assisting an agency with an old application that is still running on SQL Server 2000. Most of my experience is with Oracle, so I'm a little out of my comfort zone ...
-3
votes
1answer
60 views

Check BIT Column [on hold]

I have the following table: Id – unique number for every user. There will be no more than 2^63-1 users. (Auto incremented) Username – unique identifier of the user will be no more than 30 characters (...
0
votes
0answers
23 views

PostgreSQL takes long time to start

I using Postgre 10.9 version: $ psql --version psql (PostgreSQL) 10.9 (Ubuntu 10.9-0ubuntu0.18.04.1) Recently I just stop my postgresql: $ ...
0
votes
3answers
17 views

Postgres Initial Setup and User Login

Full disclosure, new to postgres and new to linux. I am having trouble understanding the user management side of postgresql. I installed on a Ubuntu 19.04 based os using sudo apt update sudo apt ...
0
votes
0answers
12 views

MariaDB failing steps to reset lost root password

I'm running a local copy of MariaDB on OS X. It's working fine, but I've forgotten my root password (yeah, I know) and the usual reset is failing like this: $ mysqld_safe ‐‐skip-grant-tables & [1]...
0
votes
0answers
27 views

Designing database without knowing the structure

I am looking for a bit of advice about designing a database when I am not sure what data is required. I am using mySQL. To provide a little context, I am building a reporting system. So to start ...
1
vote
0answers
48 views

Strange sql behavior - last character is removed in the Select statement, but actual data has different length

We have a table with a column name A with type nvarchar(23). following query will always return 23 which means that the actual length of all records are 23. select length(trim(req.A)), count(*) ...
0
votes
0answers
18 views

Insert Missing Data in Slave Database

We have a master slave replication [MySQL 5.6]. However In slave database 2 rows is missing in one table. I've tried to solve this using Percona Toolkit as suggested here. But pt-table-checksum ...
1
vote
1answer
36 views

Log shipping always failing with NUL

I have configured a log shipping for our company's primary database to restore on a separate server, with the restored database serving as report database. The problem is that every few days, the log ...
0
votes
0answers
29 views

Migrate a remote oracle database (11g) into a docker oracle XE database (11g)

I am brand new to Oracle and I am trying to migrate an existing VM that has deployment scripts run on it every release to use a docker container instead. Then I can run the release scripts and tag a ...
0
votes
0answers
23 views

Postgres Trigger

I have two tables table.foo: id latest_bar_id table.bar id foo_id datetime value foo has_many bar. I'd like to have a postgres trigger (or maybe something else postgres has built in) so that ...
2
votes
2answers
56 views

Log file won't shrink - suggestions?

I have a 225GB DB with a 390GB log file, which has only recently exploded in size. I am trying to shrink it - per these instructions: https://www.brentozar.com/blitz/transaction-log-larger-than-data-...
0
votes
1answer
20 views

PostgreSQL naming conventions

Maybe double post but I could not find any answer here. I saw couple of posts how to name my tables and I understood that (semi-officially) it should contain lower cases, should be underscored and ...
0
votes
1answer
39 views

Application/MS SQL Server Express Installer

We're developing a small(ish) application that collects and stores data. It's low-throughput, low-volume, but needs to be able to archive and retrieve data from (almost) arbitrarily earlier times, ...
-1
votes
0answers
16 views

How to Return Unique Ranked Results?

I have a database with the results of races. Each race has the name of the competitor, and the time they got in that rank. If I would like to return the top 10 competitors by time, how can I do that? ...
0
votes
0answers
9 views

Is necessary to backup Google Firestore DB?

Im working a production app in Google's Firebase Firestore platform, have been development from a very long time (year and a half ago) and now that its in production I'm worried about backing up and ...
-1
votes
0answers
17 views

Data showing correct in database, but not in webpage

I have Indian languages in my database. When i check them through phpmyadmin they are shown perfectly. But in my website i can see only ?????. SHOW VARIABLES LIKE '%char%' results +----------------...
-1
votes
0answers
13 views

PostgreSQL self-join query condition not to return repeated results

I have this simplified query : SELECT a.p_key, b.p_key FROM test AS a, test AS b WHERE a.p_key < b.p_key -- symmetry breaker Below is the returned data set, the * marks already 'retrieved'...
0
votes
1answer
33 views

Disk errors in one of the SQL cluster nodes and SQL patching was failing with a lot of errors related to disk and permission issues

We have two cluster nodes in a SQL cluster and the application use this cluster is Microsoft Identity Manager. Since few month both nodes ( Node 1 and Node2) are throwing disk error and SQL team is ...
0
votes
1answer
29 views

Oracle DDL Trigger error - RDSADMIN.RDS_DDL_TRIGGER

On Oracle 11g, While calling a procedure through web application, which creates a table inside to store some data temporarily. I cannot change the mechanism as proc is already in production. I am ...

15 30 50 per page