Quantcast
Channel: Active questions tagged debugging - Database Administrators Stack Exchange
Browsing latest articles
Browse All 43 View Live

How to debug INSERT statements

I have issues importing "not-so-small" dumps to MariaDB 10.4.6 in CentOS, but the error log and stderr is empty. I dumped many databases with mysqldump sized around 50MB / 500.000 rows each, and tried...

View Article



Identify mysqldump activity in MySQL log file?

I have a database that is being regularly backed up by mysqldump by... something. It's not a script that I wrote, not sure whose it is. I'm trying to find out more about these dumps, such as what...

View Article

Finding the cause of a stuck "Sending Data" query in MySQL

I'm running MySQL on a 1gb DigitalOcean droplet, and I have a number of scheduled tasks through the Laravel framework that run. One task in particular (seemingly) randomly causes MySQL to sit at 100%...

View Article

Query stuck in mattermost postgresql communication

Ubuntu 18.04PostgreSQL 10.10Mattermost 5.15On mattermost startup process stay forever on {"level":"info","ts":1570609055.2422519,"caller":"sqlstore/supplier.go:223","msg":"Pinging SQL master...

View Article

How to profile the PostgreSQL query planner diagnose what is causing it to...

I'm fighting with a specific "generated" query (the SQL is generated from a proprietary system, and I won't be able to share it or the execution plan here), and running into simply massive memory usage...

View Article


How to get the name of a variable instead of its value in plpgsql?

I write a lot of debugging code in plpgsql along the lines:RAISE NOTICE 'var1 = %', var1;(there can be more than one variable to print out). Is it possible to avoid having to repeat the variable var1...

View Article

Investigating an Oracle 12c outage after the fact, while limited to SQL*Plus

Warning up front: unfortunately I'm limited to using SQL*Plus on remote site, with no other tools available. This is Oracle 12c (12.2.0.1.0) Standard Edition running on Windows Server 2012R2. Over the...

View Article

Image may be NSFW.
Clik here to view.

A workaround for restoring HierarchyId in SQL server 2014

After installing VS 2015 CTP 4, HierarchyID stopped working in SQL Server 2014. This is the bug listed here.I am looking for a workaround.To that end, I have tried reinstalling everything associated...

View Article


Image may be NSFW.
Clik here to view.

How to make SQL Server Agent job history less verbose?

So, I've created a SQL Server Agent job, according to the answer to my prev question:running nightly (at 2:11) according to the schedule:There are 9 .bak files in 3 subdirectory of d:\backup\ source...

View Article


Image may be NSFW.
Clik here to view.

Is it ok for MySQL to always use 18-25% of Memory (I have 2 GB Ram)?

I have MySQL 8 in my Server with Ram of 2GB. And MySQL is always using 18-25% of Ram even when everything is off. Is it normal? If not then plz let me know how to debug it.

View Article

How to get syntax and logical ORA in a trace file?

there is an application with tons of queries and one of them cause ORA-1722To check: I turn trace on session like:alter session set events '10046 trace name context forever, level 12'and say to...

View Article

SQL Error 1452 : Cannot add or update a child row: a foreign key constraint...

I am trying to install Zabbix by following this guide. I ran into the following problems when trying to run data.sql after running scheme.sql successfullymysql -D zabbix -uzabbix -pPassword <...

View Article

How use raise notice in nested and sub-function?

I'm using PgAdmin to create multiple pgsql functions.I'm beginner on this environment.I'm using 'raise notice' to help me for debugging phase.I have two functions with 'raise notice' statement.The...

View Article


IN clause not working on mysql 8.0.17

I was on mysql:8.0.15 and I updated to mysql:8.0.17On 8.0.15 ... and (col1, col2) in (('a', 'b')) the query return results, this is what I expectOn 8.0.17 the same query with same data return 0...

View Article

Display line number where error occurred in DB2 stored procedure

I have added an EXIT handler in my procedure that captures the SQLSTATE and SQLCODE, and even found a way to get the procedure name, but I also need to know where the error occurred. Suggestions...

View Article


Image may be NSFW.
Clik here to view.

Why is an Oracle Package Variable Intermittently Incorrect after Multiple...

I am supporting an application that runs on Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production.We have a table that stores hourly data that uses triggers call a package to...

View Article

Query all of a sudden stopped working - Simple left join but cannot see what...

I had a query that was a simple left join between two tables with IS NULL included in the where clause because I needed all of the rows of the left table shown, even if it gave null values in the right...

View Article


Include stored procedure text output in the maintenance plan log

I have a maintenance plan subtask in SQL Server 2012 Enterprise that executes a stored procedure (or a SQL Server agent job).In the log file for this maintenance plan, there are a few lines for this...

View Article

Duplicate rows with primary key constraint in PostgreSQL 10.6

I have a table that's had CONSTRAINT table_pkey PRIMARY KEY (id) since setup.However, I recently found that I have around 100 duplicate rows (I ran select count(*) from (select count(*) from table...

View Article

Identifying processes that open MySQL connections

I need to identify which application process issues a large number of MySQL connections on a Linux system.The show processlist sql command or tools like innotop do not really help, as they only show db...

View Article

Has anyone ran into this replication breaking bug before?

I've been having this issue where replication was breaking on colliding primary keys. The annoying thing was these were auto increment generated.I think my issues been tracked down to...

View Article


Second Subquery Inside INSERT Into saves int 0

Read it carefully, we have this query which is inserting values in the table called users. For the value member_id we are running a subquery to select from the table admin_users the id of the member....

View Article


--- Article Not Found! ---

*** *** *** RSSing Note: Article is missing! We don't know where we put it!!. *** ***

View Article

--- Article Not Found! ---

*** *** *** RSSing Note: Article is missing! We don't know where we put it!!. *** ***

View Article

Image may be NSFW.
Clik here to view.

How to determine the backup source

We are trying to identify what is taking a SQL backup. The physical device name is just a guid which I have seen before when using a VSS type backup but I don't see any backup agent software installed...

View Article


Problem with case statement and dynamic table name

I have the following case statementcase %1$s::text when ''lookup_relation_job'' then case %1$s.relation when ''followers'' then ''get-followers'' when ''following'' then ''get-following'' when...

View Article

Does Azure Data Studio have a debug Menu or option to debug a stored procedure?

I installed SSMS 19 Preview 4 and it doesn't have a Debug Menu or Debugging option. I also learnt that SSMS V17 was the last version with that capability. Then I decided to try Azure Data Studio, but...

View Article

Postgres - how to 'print' a variable within a function (similar to python)?

How to print(var) in postgres like python?Given the following code:CREATE OR REPLACE FUNCTION custom_sum(c1 integer, c2 integer)RETURNS integer AS $$ SELECT c1 + c2;$$ LANGUAGE SQL;CREATE aggregate...

View Article

MySQL gives Unknown column error when forward engineering database from diagram

I have a MySQL EER diagram the I forward engineer into a database. I also use the forward engineer feature to generate insert statements for data automatically. After entering about 120 rows of data I...

View Article



Image may be NSFW.
Clik here to view.

Where to look for possible deadlock causes?

We've been having several problems the past days in our production environment, and some of them seem to boil down to database issues.Just realized we are having deadlocks (68 actually), on database...

View Article
Browsing latest articles
Browse All 43 View Live




Latest Images