All Questions

Filter by
Sorted by
Tagged with
1
vote
0answers
6 views

Patching after Oracle 12c install?

I am not able to find concrete information about patching after install. So I have downloaded Oracle 12cR2 software from Oracle and I have successfully installed it. But now I am wondering if I need ...
0
votes
1answer
14 views

How to properly configure SQL Database Mail to send through an Office 365 SMTP server without using an on-prem SMTP server?

We used to use SQL Database Mail through an on-prem SMTP server, but have since transitioned to Office 365. I created a new profile for O365 and tried configuring a new account in that profile like ...
1
vote
0answers
8 views

Oracle Still Auditing after NOAUDIT

We're redoing what is and isn't being auditing in a database my team has been put in charge of. Old audit settings were producing ~2M audit entries a day. Audit_trail parameter is set to DB. So we ...
1
vote
0answers
5 views

#1036 - Table 'pma__recent' is read only in phpMyAdmin / xampp / Windows

I have about 40 databases on localhost powered by xampp 5.6.15. Some of them use MyISAM and others InnoDB. The database has been corrupt and phpMyAdmin was permanently outputing error messages. I ...
1
vote
2answers
24 views

SQL server trusted connection additonal security

Using Windows authentication, how to avoid end user to connect via odbc to database?
-1
votes
0answers
8 views

I want to transpose Column values into Row of Specific values like 'GType'(values as rows) as mentioned in the below example

Example Table: Result Table: I want to transpose Column into Rows of Specific Row values like 'GType'(values) as mentioned in the below example. I want a results to be in the below example format. ...
2
votes
1answer
15 views

postgres jsonb query performance is decreased by order by

I have a table with jsonb column. When I execute query below it evaluates quite fast. But then I need to add order by clause (created column is timestamp column). Execution time decreases by 1000 ...
1
vote
0answers
10 views

How to create a SCD Type 2 table in Oracle?

I currently have 2 tables (SOURCE and TYPE_TWO_DIM ) below is table definitions: Create table SOURCE ( part_firm VARCHAR2, cp_firm VARCHAR2, charges NUMBER) Create table TYPE_TWO_DIM ( ...
1
vote
1answer
12 views

PostgreSQL 12: column proisagg does not exist

I created a PostGIS database using the following images here (i.e. 9.3-2.1, 11.0-2.5 and 12.0 tags), however I'm getting the following errors when I try to open the 'public' schema: An error has ...
0
votes
0answers
3 views

SQL - Find Results with MAXimum for given colum

I have a question on how to select best match in PostgreSQL for a given result/condition: I have a setup containing 3 tables. 1 is a result overview table with reliability and status| 2 is a ...
0
votes
1answer
16 views

SQL db query: how to add a new field and assign values

I have 3 tables as shown in the screenshot below. I have created a query using UNION as shown below. SELECT T1_ID AS ID, T1_NAME AS NAME, T1_ADD AS ADDRESS FROM Table1 UNION SELECT T2_ID AS ID, ...
0
votes
0answers
13 views

Access .sql script files on other partition or hdd

I'm running a Linux Mint 19.1 - Tessa OS, which for you who might not know it is based on Ubuntu 18.04 - Bionic Beaver. On this I have installed postgresql 11 which work well. There is one problem ...
3
votes
1answer
32 views

Solving ON DELETE CASCADE cycles with triggers on MS SQL Server

I have code that is working fine in PostgreSQL and I now have to port it to MS SQL Server. It involves tables with potential cycles on delete/update events and SQL Server is complaining about it: -- ...
0
votes
0answers
4 views

PostgreSQL will stop logging when logrotate rotate postgresql log file

I have installed PostgreSQL 10.6 on x86_64-redhat-linux-gnu, compiled by gcc (GCC) 8.2.1 20180905 (Red Hat 8.2.1-3), 64-bit And configured: log_filename = 'postgresql.log' But I would like to ...
5
votes
1answer
33 views

Internals of backup compression with TDE (SQL Server)

Does anyone have any (inside?) knowledge of how backup compression works with TDE on SQL Server (version 2016+). In general I would expect compression of encrypted data to have minimal benefit, ...
0
votes
2answers
18 views

Query Execution Details

We need to find out the list of queries which were executed between a from time and to time, which user had executed the query and what was the execution time of that query.
0
votes
1answer
15 views

How to create Polygon from Point datatype in MySQL?

I have a table like this: CREATE TABLE `aois` ( `aois_id` int(11) NOT NULL DEFAULT '0', `WS_A` point DEFAULT NULL, `WS_B` point DEFAULT NULL, `WS_C` point DEFAULT NULL, `WS_D` point DEFAULT ...
1
vote
0answers
55 views

Create sequence based on the value of another column

I have to create sequence numbers based on related user. Like: ╔════════════╦═════════════╦═══════════════════╗ ║ Row Id ║ User Id ║ Sequence Number ║ ╠════════════╬═════════════╬═══════════...
0
votes
0answers
33 views

Connecting to SQL Server 2018 from Oracle SQL Developer

Pretty much as the title says, has anyone tried connecting to SQL Server 2018 via Oracle SQL Developer? I downloaded the latest JTDS (jtds-1.3.1-dist) but this only seems to support SQL Server 2012 (...
0
votes
0answers
13 views

Calculate 12 months rolling / moving average, median, min, max, percentiles, etc. as single query in Postgres

My question has two parts: . Firstly, how to adjust the code below to calculate 12 month moving avg, median etc.? As is, the query will return a list of daily, weekly, monthly or annual values (...
0
votes
1answer
24 views

Blocking process inputbuf is empty

I was trying to capture blocking query using blocked process report past 1 hour as this link https://www.mssqltips.com/sqlservertip/4480/find-blocking-processes-using-sql-server-profiler/ I can get ...
1
vote
0answers
35 views

MYSQL - How to optimize VIEW performance?

Total profiles - 100000 Each profile is connected to one or more platform Each profile have 50 Tags Each profile have 4 themes I have a user view (total users around 100000) where I am joining all ...
-1
votes
1answer
20 views

Product part Query (BOM)

I'm using DB2 V7 and i have a product table like below : select * from product; Product |Component|Quantity |Line number| --------+---------+---------+------------ Product1|Part1 |1 |1 ...
0
votes
0answers
9 views

Calculate the percentage of LTC (List-Till-Cancelled) items from a number of live items

How to identify the percentage of LTC(List-Till-Cancelled) items from a number of live items on May 2015. I have table Listing CREATE TABLE LISTING ( object_id int NOT NULL, seller_id int ...
0
votes
0answers
8 views

How to Rename all primary key constraints from all tables at once in PostgreSQL [on hold]

I have a database with multiple schemas where table constrains named differently on a similar table.
0
votes
0answers
7 views

Problems importing innodb tablespaces

I am struggling with restoring a backup of a MySQL 5.5 database, which has been created with innobackupex --databases .... These are the steps to set up mysql and prepare the backup for restore: # ...
0
votes
2answers
35 views

Create table permissions issues with SQL Server

I have a database _Repository and a Login COMPANY\ANALYST_USERS which contains a handful of employees, and I am using Microsoft SQL Server 2017. The database has some core tables in it that I want ...
0
votes
0answers
21 views

Rebuild clustered index online on specific partition

Can I rebuild clustered index ONLINE (MS SQL 2017 Developer Edition) for specific partition which is on partitioned table with different filegroups? Selected partition is on read_write filegroup, but ...
-1
votes
1answer
31 views

How to calculate total time taken

I want to calculate total driving time excluding time between Pause and Resume Driving using sql query. Values As below mention
0
votes
1answer
14 views

Invalid Use of Group Function Using Join

SELECT a.aircraftid 'Aircraft ID', COUNT(s.serviceid) FROM aircraft a JOIN service s ON a.aircraftid = s.serviceid JOIN( SELECT ( COUNT(ser.serviceid) / COUNT(...
0
votes
2answers
31 views

Tool for migrate SQL Server 2005 to SQL 2017 [on hold]

There's any tools that can migrate SQL Server 2005 to SQL Server 2017?
0
votes
0answers
11 views

mysql threads running high issue for Percona Mysql 8.0.16

we are experiencing a threads running high issue mysql> show global status like '%buffer_pool%' -> ; +-----------------------------------------+---------------------------------------------...
0
votes
1answer
13 views

Why is it necessary to run both mongod and mongo.exe in windows? What's happening behind the scene?

Why is it necessary to run both mongod and mongo.exe in windows? What's happening behind the scene? What's the difference between these two?
0
votes
1answer
13 views

How to get all the data before the current date and data for the next 3 days from current date.DATEDIFF(now(),d.tentative_date_of_return) <= now() + 3

SELECT DISTINCT d.name AS "ID:Link/Demo Request:120", d.requester_name AS "Requester Name:Data:190", d.customer_name AS "Customer Name:Data:250", d.date_of_request AS "Date Of Request:...
3
votes
1answer
43 views

Query to find rows containing ASCII characters in a given range

I am using some scripts from another topic, but the accepted answer isn't working for all my data scenarios. I would have asked my question on the original How to check for Non-Ascii Characters post, ...
0
votes
1answer
13 views

How to auto increment value in mysql [on hold]

i have age column in MySQL database. So my question is how can i increase the age value by 1 every time a year passed. For example this year the age value is 20 and the next year the value will be 21. ...
4
votes
1answer
33 views

How do I solve the following error on attaching ldf-less database in SQL Server?

Before you write about the dangers of not having backups, etc., please withhold judgement... perhaps I just inherited the problem? I have an .mdf which which I am trying to attach to SQL Server 8. I'...
1
vote
1answer
12 views

Schema changes on sharded database

I have performance issues with one particulary large table, 500+ Million rows, 300Gb data, Postgres 10.5. It is already partitioned. I am working on optimising it here and there, but that is not ...
-2
votes
0answers
14 views

Find the functional dependencies and decompose this table if necessary into a lossless third normal form design

Each hotel has several room types (e.g. singles, doubles, doubles with views). For that hotel and room type, there are a certain number of rooms available and the room type has a description for that ...
1
vote
0answers
25 views

Is the table designer not supported for memory optimized tables?

If I right click a table, I get the normal designer option: But if I right click a memory optimized table, the designer is missing: The server is 2016 and I've tried it in SSMS 16, 17, and 18.3. Is ...
1
vote
1answer
46 views

Invoke-SQLCMD with special characters

I'm currently working on a project integrating AD with SQL Server data, which I am handling mainly via powershell (Invoke-SQLCMD in particular). The issue I'm running into is if someone has a special ...
0
votes
0answers
34 views

update trigger insert only if value is different

i have some gps modules that send data to my database. On update of the last package sent i want to compare new values with old values and insert into a new table only those values that are diferent. ...
0
votes
0answers
46 views

Operator used tempdb to spill data, spill level 1

Here I have a query which is spilling to tempdb. I understand that the cardinality estimates are wrong and causing this spill. I've read few articles that mentions updating the statistics and ...
0
votes
2answers
32 views

SQL Server 2014 DELETE with OUTPUT

Why would I get an 'incorrect syntax' error with this (on the OUTPUT keyword): DELETE tb FROM dbo.TransactionBatch tb OUTPUT Deleted.TransactionID INTO #TransactionIDs INNER JOIN @...
3
votes
3answers
213 views

Query slow when using function in the WHERE clause

This is fast (49ms): v_cpf_numerico := ext.uf_converte_numerico(new.nr_cpf); select cd_cliente into v_cd_cliente from central.cliente where nr_cpf_cnpj = v_cpf_numerico; This is slow (15 seconds): ...
1
vote
1answer
56 views

SSMS login by external developers

This is my first question so please bear with me ! We have an external company whose developers need to login into an instance on our on-premise SQL Server 2016. They have AD logins, and these are ...
0
votes
0answers
33 views

How protect Database stolen remotely by hacker [on hold]

Can a database be stolen remotely by some hacker if a backup was saved? Should I change my password to postgresql? Can't the police post trace who it was? How can I protect myself? Only by changing ...
0
votes
1answer
41 views

Computed Columns - SQL Server Function

I'm looking to improve overall SQL performance of a customers application. On each table of the application, there is a computed column, that uses GETUTCDATE and a combination of three columns on that ...
0
votes
1answer
20 views

Mongo: mongodump and the config database error

I've setup a backup script on my Ubuntu box using mongodump. However this currently doesn't work because of an error when attempting to dump the built in config database: (Apologies for the image, I ...
5
votes
2answers
121 views

Will one SQL instance work whilst the other 2 are patched?

My change request to patch 3 SQL instances on the same server was denied because of one instance - they say a server reboot is fine, but not a few hours downtime. Seeing as each instance is ...

15 30 50 per page