8
votes
Accepted
Failed to start TSQL debugger
Debugging is a highly privileged operation. Therefore, only members of the sysadmin fixed server role are allowed to debug in SQL Server.
See How to: Enable Transact-SQL Debugging for details on the ...
4
votes
Postgres - how to 'print' a variable within a function (similar to python)?
From SQL, you can use pg_notify to send yourself messages. You will need to LISTEN to the channel you are using, in order to receive the messages. (This is unlike RAISE in pl/pgsql, where they are ...
4
votes
Accepted
SQL Server Debugger Permissions without Granting sysadmin to Devs
You could add a declare @idebug int variable to your stored procedures and then code around the important bits when you require relevant information.
Your stored procedure would then look a bit like ...
4
votes
Accepted
Display line number where error occurred in DB2 stored procedure
If you are on a currently supported version of Db2 for LUW (11.1 or 11.5) you can use either DBMS_UTILITY.FORMAT_CALL_STACK() or DBMS_UTILITY.FORMAT_ERROR_BACKTRACE() in your signal handler to log ...
3
votes
SQL Server Management Studio - Debugger buttons greyed
You need to open the network ports & firewall ports between your desktop running SSMS, and the remote computer.
Just generally speaking, though, I'd highly recommend against running the debugger ...
3
votes
Mysterious postgres process pegging CPU at 100%; no running queries
Most likely you've been hacked and are now mining cryptocurrency for the hacker.
Chances are, you have a weak password for your postgres superuser account (probably named "postgres") and you let ...
2
votes
Identify mysqldump activity in MySQL log file?
SUGGESTION #1
The quickest way to locate any dump activity is the enable the slow query log
You should find queries that resemble something like the following
SELECT /* SQL_NO_CACHE */ from ...
Any ...
2
votes
Accepted
MongoDB Implicit And
The problem is that your query object uses the same key ($ne) twice, so the second value is overwriting the first. Most languages do not support duplicate keys in a standard object / hash / dictionary ...
2
votes
How do I determine why a MongoDB document is failing validation?
Of course the original answer is right, handling validation prior to arriving at the db is absolutely best practice, but as a practical matter if you need to chase it down like right now, you can ...
2
votes
Is it possible in Oracle to trace SQL statements that result in errors?
To find failed queries. Use following plsql trigger to find queries.
CREATE TABLE QUERY_LOG (ID NUMBER,ORA_ERR VARCHAR2(10),EXE_DATE DATE,QRY_LOG NCLOB);
CREATE ...
1
vote
Accepted
The debugger only stops at the breakpoints of the first Script Component. How do I debug more than one Script Component in an SSIS Data Flow Task?
Thanks for asking. With respect to SSIS versions after 2008, debugging script components is now possible.
Microsoft has updated their documentation with more details, which I am providing here as well....
1
vote
Problem with case statement and dynamic table name
After the parameter has been substituted, the SQL statement will look like
...
case 'mytable'::text
when 'lookup_relation_job' then
case mytable.relation
...
When this statement is parsed (...
1
vote
Accepted
Debug application performing transaction
User J.D. answered in a comment, I'm putting the info here for my future self and others. If J.D. posts back with an answer, I'll accept it.
The term for reading uncommited transactions is Dirty Read. ...
1
vote
mariadb (mysql) innodb not optimizing SELECT for partitions?
PARTITIONing with fewer than 10 partitions is rarely useful.
Perhaps PARTITION BY RANGE(TO_DAYS(date)) would be better? Perhaps daily partitions is best for your application.
Is your goal to purge ...
1
vote
Accepted
How to get syntax and logical ORA in a trace file?
You can trace specific errors like below:
SQL> alter session set events '1722 trace name errorstack level 1';
Session altered.
SQL> SELECT TO_NUMBER('asdf') from dual;
SELECT TO_NUMBER('asdf') ...
1
vote
Accepted
Is it ok for MySQL to always use 18-25% of Memory (I have 2 GB Ram)?
It's normal. Memory usage is determined by various configuration parameters, some of which are shared (e.g. innodb_buffer_pool_size), while others are per thread.
1
vote
Why is an Oracle Package Variable Intermittently Incorrect after Multiple Updates
I'd investigate if the issue is caused by update restart
the restart is done when:
a) consistent read (the search component of your modification) says
"this row, when we started, was one you ...
1
vote
Investigating an Oracle 12c outage after the fact, while limited to SQL*Plus
Try to check if statspack is installed (any user name PERFSTAT in the database ?) and if yes if it configured (look for DBMS_JOB in view DBA_JOBS running something like statspack.snap). If yes you ...
1
vote
Investigating an Oracle 12c outage after the fact, while limited to SQL*Plus
someone has access to the alert log. Try to get access. Maybe they can send it to you. Do you have full rights on that database? If so try to figure out what directory has the alert log. For example "...
1
vote
Accepted
Investigating an Oracle 12c outage after the fact, while limited to SQL*Plus
You can inspect V$SQL for statements that don't use binds, eg.
select substr(sql_text,1,80), count(*)
from v$sql
group by substr(sql_text,1,80)
order by count(*) desc
Then inspect the full ...
1
vote
Accepted
Query stuck in mattermost postgresql communication
The query has already ended 9 minutes ago. PostgreSQL is sitting idle and waiting for the next statement on this connection, which isn't coming.
The block must be somewhere else in your startup ...
1
vote
Accepted
Finding the cause of a stuck "Sending Data" query in MySQL
I will give you several ways to prevent, not clear up, the problem...
Speed up the query
Sounds like you are missing INDEX(updated_at). In particular, it is the difference between reading one row (...
1
vote
SQL Server Debugger Permissions without Granting sysadmin to Devs
Not sure why the debugger would be set up this way.
Most likely due to the invasive / insecure nature of debugging: the debugger attaches to the SQL Server process itself so that it can see inside ...
1
vote
SQL Server Debugger Permissions without Granting sysadmin to Devs
If you're not totally opposed to giving each developer a copy of the database to play with locally, then consider taking the time to setup a script in your test/dev environment that will pare the ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
debugging × 78sql-server × 23
mysql × 21
postgresql × 16
oracle × 5
ssms × 5
stored-procedures × 4
sql-server-2014 × 3
mongodb × 3
mariadb × 3
trigger × 3
ssis × 3
plpgsql × 3
remote × 3
performance × 2
sql-server-2012 × 2
sql-server-2008 × 2
sql-server-2008-r2 × 2
backup × 2
innodb × 2
permissions × 2
memory × 2
functions × 2
plsql × 2
deadlock × 2