Skip to main content
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 ...
Zsmaster's user avatar
  • 218
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 ...
jjanes's user avatar
  • 41.3k
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 ...
John K. N.'s user avatar
  • 18.3k
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 ...
mustaccio's user avatar
  • 26.9k
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 ...
Brent Ozar's user avatar
  • 43.2k
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 ...
jjanes's user avatar
  • 41.3k
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 ...
RolandoMySQLDBA's user avatar
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 ...
Stennie's user avatar
  • 10.3k
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 ...
Serexx's user avatar
  • 121
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 ...
Nivas Shelke's user avatar
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....
Donovan Bergin's user avatar
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 (...
Laurenz Albe's user avatar
  • 56.5k
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. ...
dotancohen's user avatar
  • 1,095
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 ...
Rick James's user avatar
  • 79.4k
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') ...
Balazs Papp's user avatar
  • 41.1k
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.
Gordan Bobić's user avatar
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 ...
Petr's user avatar
  • 186
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 ...
pifor's user avatar
  • 1,196
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 "...
Gandolf989's user avatar
  • 1,520
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 ...
Gerard H. Pille's user avatar
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 ...
Laurenz Albe's user avatar
  • 56.5k
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 (...
Rick James's user avatar
  • 79.4k
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 ...
Solomon Rutzky's user avatar
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 ...
mathewb's user avatar
  • 1,154

Only top scored, non community-wiki answers of a minimum length are eligible