Questions tagged [logging]
A time-ordered, human-readable archive of activity. For questions about the database transaction log, use the transaction-log tag instead.
94
questions
-3
votes
0
answers
22
views
Serilog and Manage Sql Disk Space [closed]
1: How can set limit size for srilog sql table ??
2: how add condition When the size of the table reaches the limit?
0
votes
1
answer
48
views
Postgres 11 log all statements not working as expected
I am trying to track down a row delete that is happening somewhere in a huge and sprawling application. I know that something deleted a row in an important DB table, and I have narrowed down when the ...
0
votes
0
answers
20
views
how can I create a Query log can be enabled for Analysis Services tabular mode instances?
I know that "Query log can be enabled for Analysis Services multidimensional mode instances only. Query log cannot be enabled for tabular mode instances." But is there a way I can do query ...
0
votes
1
answer
35
views
Logging not working for PostgreSQL 14 on Windows
I have edited the postgresql.conf file and set logging parameters as follows. However, after I restart and look a the logging_collector value, it's set to off and logging is not working:
...
0
votes
0
answers
42
views
How to log operations only in one specific table in PostgreSQL
I have one very important table in psql db. I would like to log every operation possible to this table: select, insert, update, etc.
How can I achieve this?
Thank you.
0
votes
0
answers
31
views
Why can't get the create index log in logging directory?
Yesterday i have created index in my postgresql database:
CREATE INDEX idx_num_ddate
ON num(ddate);
Today i login my os :
...
0
votes
0
answers
257
views
Postgresql stops logging in docker
I am using postgres 12.12 via the official docker image and it sometimes stops logging, seemingly randomly. I am trying to figure out what could be causing this.
I'm running it on my development ...
0
votes
2
answers
77
views
Separate tables for logging?
I would like to log new products, updates to products and deletions of products (and the same for other schemata [customers, locations etc]).
Would it be best to have a separate table (e.g. ProductLog,...
0
votes
0
answers
40
views
Azure SQL MI audit logging
Would like to list out all users logging in to a SQL MI instance.
Is this possible right out of the box or do I need to set up an Audit job?
Seems SQL MI is quite different than SQL DB when it comes ...
0
votes
1
answer
200
views
MySQL 8 disk usage always grow
MySQL's disk space usage increases as time goes on, but drops all at once when I restart MySQL. After much investigation I think I have found the cause of the problem, it seems that MySQL is writing ...
1
vote
0
answers
154
views
How to direct psql errors to powershell log file?
I'm running a powershell script on a windows system. The script includes psql commands to run SQL on a postgres database.
Most stuff gets correctly recorded in the powershell log file, EXCEPT for psql ...
0
votes
1
answer
377
views
Logging in error states in Postgres transactions
I'm currently working on rebuilding some SQL Server stored procedures in Postgres, but I have the following hangup
CREATE OR REPLACE PROCEDURE public.math_proc ()
LANGUAGE plpgsql
AS $$
BEGIN
...
1
vote
2
answers
214
views
What is the fastest way to log the Input and Output parameters when executing Stored Procedure
Normally i will log this information at the end of each SP. The syntax looks like this.
DECLARE @SPContent nvarchar(4000)= (
SELECT @ServiceID [ServiceID],
@AccountID [...
1
vote
3
answers
176
views
Find which IP added a specific record to a table in SQL Server
Let's say I have an SQL Server running on Azure and multiple applications add records to it.
The problem is that some records come from an unknown application.
Is there a nice way of finding which IP ...
1
vote
2
answers
47
views
How do I enable DML logging in Cassandra 2.1?
How to enable logging DML(inserts, updates), DDL (alter, create) operations in cassandra version 2.1?
nodetool getlogginglevels
Logger Name Log Level
ROOT ...
0
votes
1
answer
576
views
How to permanetly turn of transaction logging for specific table in Db2?
In our company we are merging two systems together. Data are required to be moved from Microsoft SQL Server 2016 source database into Db2 v11.5 target database. In production environment this is going ...
0
votes
0
answers
106
views
PG 13.6 : Data corruption error not being sent to syslog
This morning I noticed this error in my PG CSV log file.
2022-05-25 23:59:17.776 JST,,,117110,,628cf2c5.1c976,1,,2022-05-25 23:59:17 JST,9/611296,0,ERROR,XX001,"uncommitted xmin 16395356 from ...
0
votes
0
answers
96
views
How can I see the queries executed on day x? (So I can find the DB change that is impacting performance.)
Since Day X (which is inconveniently just outside my DB recovery plan), I have been experiencing a significant performance degredation on an overnight process that runs Stored Procedure A, executed ...
1
vote
0
answers
18
views
PostgreSQL - is it possible to log to separate files per database? [duplicate]
I have multiple databases inside a single PostgreSQL instance. Is there some way to get it to use a separate log file for each database ?
1
vote
4
answers
897
views
PostgreSQL logging: Statements splits into multiple lines
In PostgreSQL v10 and above, I activated the logging of the statements using the extension pg_stat_statements.
My configuration:
logging_collector = on
log_line_prefix = '%t [%p]: [%l-1] db=%d,user=%u,...
0
votes
1
answer
223
views
What do these weird errors logged mean?
Today, I got these errors logged for the first time:
stats_timestamp 2022-01-16 10:58:25.625142+01 is later than collector's time 2022-01-16 10:58:23.356175+01 for database 0
statistics collector's ...
0
votes
1
answer
848
views
General Questions about using MySQL with Docker, logging options
I have a number of questions about logging / backup strategies when using MySQL with Docker specifically and also just general questions.
The particular scenario is MySQL DB's for a small medical ...
0
votes
2
answers
256
views
How to resolve INSERT contention in Azure SQL Database?
I'm working with an Azure SQL Database that has a very hot logging table. Any time a row in any other table is inserted, updated, or deleted, the web application writes a row to this logging table. ...
1
vote
1
answer
265
views
correlating postgres LOG and DETAIL loglines
We're logging slow running queries in PG (on AWS RDS) with log_min_duration_statement along with log_error_verbosity = default so we get DETAIL lines, because our app's libraries uses prepared ...
2
votes
1
answer
125
views
Why does SQL Server Trace Flag 715 behave differently from the TABLOCK query hint?
It's my understanding, based on numerous sources (including this one: https://techcommunity.microsoft.com/t5/sql-server/migrating-sap-workloads-to-sql-server-just-got-2-5x-faster/ba-p/384910) that SQL ...
1
vote
1
answer
149
views
Writing custom server logs in Postgres
We have set up a Postgres instance that is writing logs directly to AWS CloudWatch. We would like to be able to write our own logs for the purpose of automated processing. Unfortunately our current ...
0
votes
0
answers
93
views
Sql Error Message ID 3013 & 4305 for Standby / Read-Only database that we use for import data heavily
Sorry. I am not a DBA, but a SQL Developer, so I am trying to get some general support/feedback on my case (and when I Googled the issue, remedy seems so scattered so I decided to post here).
I got ...
0
votes
1
answer
268
views
How do I make PostgreSQL log the file path and line number of the errors? (If it's even possible at all.)
My postgresql.conf contains this:
log_destination = 'csvlog'
logging_collector = on
log_directory = 'C:\\Users\\John Doe\\Documents\\PostgreSQL logs'
log_filename = 'PG_%Y-%m-%d_%H;%M;%S'
...
1
vote
2
answers
610
views
Auto logging / tracking records changes at MS SQL [duplicate]
how can I set automatic recording all changes that were done at tables records (Updates) and to get some info / logging summery?
thanks
0
votes
1
answer
79
views
Log to disk all queries that waited for a lock over a period of time
I manage a mariadb 10.4.17 server, and I'm having the issues with a table, it seems randomly I will get lots of queries "waiting for metadata lock" causing my entire database to be useless.
...
0
votes
2
answers
1k
views
How to log multiple invoke-sqlcmd verbose outputs into single log file along with showing/not showing them through flag into prowershell prompt
Lets say we have multiple invoke-sqlcmd statements like below:
invoke-sqlcmd -Query "PRINT 'Hello World 1'" -ServerInstance Server\SQL2017 -Database abc -Verbose
invoke-sqlcmd -Query "...
-2
votes
2
answers
353
views
How to find out WHERE a PG error/warning/log happened?
I have PostgreSQL CSV-log its "errors" according to this structure: https://www.postgresql.org/docs/12/runtime-config-logging.html#RUNTIME-CONFIG-LOGGING-CSVLOG
It doesn't include the file ...
0
votes
1
answer
379
views
Configuring 2017 SQL Server SSISDB Server-wide Default Logging Level does not seem to work
Using SSMS, I have changed the SSIS Catalog Logging Level from Basic to Performance to a Custom Logging Level in a 2017 SQL Server Instance and then I run the report: "All Executions". It ...
-1
votes
1
answer
92
views
How do I log the actual script's name in csvlog? [duplicate]
I have PostgreSQL CSV-log its errors according to this structure: https://www.postgresql.org/docs/12/runtime-config-logging.html#RUNTIME-CONFIG-LOGGING-CSVLOG
Sadly, from what I can tell, it neither ...
-2
votes
1
answer
2k
views
What should I do about PostgreSQL logging so much "weird noise" in its own log?
PostgreSQL 12.4 on Windows 10 Pro 2004.
With the default configuration file, I start PostgreSQL with pg_ctl and the "-l PostgreSQL.txt" option.
It logs to that file. Looking in it, I'm ...
-1
votes
2
answers
5k
views
How do I get access logs from SQL Server database [closed]
I am in the process of carrying out system reviews for some systems powered by SQL Server. IS there a way of getting the access logs to these systems databases spanning a period of 6 months starting ...
1
vote
2
answers
2k
views
How can I force the MySQL client to output to stdout or a log file when importing a SQL file?
Let's say I am importing a small SQL file using the MySQL client like so:
mysql < 10k-file.sql
The mysql client does not output anything. How can I force it to show how many rows are affected for ...
1
vote
2
answers
299
views
Non-deterministic functions and row-based binary logging (MySQL)
Newbie questions. I'm working on a MySQL project that will use only row-level binary logging. There will be no replication. Since logging is row-level, does it even matter if a function is ...
0
votes
1
answer
29
views
Cannot get rid of creation of mysql.log
I have these settings in my.cnf:
[mysqld]
...
disable_log_bin
general-log = false
general_log_file = /var/log/mysql/mysqld.general.log
long_query_time = 1
slow_query_log = false
...
1
vote
0
answers
72
views
Best practices for users credentials [closed]
I am designing a C# client to connect to a MySQL DB and am having second thoughts on my design.
The users have credentials in order login in the C# client, so now it is designed like this:
1 - the C# ...
1
vote
0
answers
301
views
SQL Server 2017, XEvent: sql_text IS NOT NULL
I'm attempting to use XEvents to find out which queries are causing my templog.ldf file to grow in size. I'm getting events, but I see the sizes of the files haven't changed, and that the sql_text ...
0
votes
1
answer
34
views
Massive Transaction Logs - what are my options?
I have a fairly crazy scenario where I am processing ~250 million inserts and 250 million deletes for a table that contains data that is only relevant for the moments that it is in the database. Once ...
0
votes
0
answers
523
views
SQL Server database in Recovery mode, how to troubleshoot?
I have a SAP instance running with a 'SQL Server' database that just recently got into recovery mode without a clear reason (no backup or restore was executed).
We noticed that the storage for logs (...
-1
votes
1
answer
102
views
Login failed for user 'sa' State: 8, in short time
I have setup SQL Server on server Customer.
Recently, log files in SQL Server increase continuously. I checked the content of those logs - see here:
In my application I use an account for connecting ...
0
votes
2
answers
498
views
Logging user's id with the query he executed
So, I am trying to log not just the postgres user but his ID from my table (for example) Person (person_id) when he calls functions.
So far, from what I can tell I can get almost every information I ...
3
votes
1
answer
3k
views
What is the performance cost of enabling "log_lock_waits" on Postgres?
I am trying to understand what is the performance cost of enabling log_lock_waits on Postgres.
As per this documentation, while log_lock_waits = on:
Controls whether a log message is produced when ...
1
vote
0
answers
281
views
How to switch off statement logging from a trigger in PostgreSQL
I just spent ages working out how to record messages from triggers into a log file. And then nearly as long working out where the logs files were being created.
Anyway, I added this line to my ...
1
vote
1
answer
1k
views
Disable log ERROR: duplicate key value violates unique constraint
Running Postgresql in a better ask for forgiveness than permission mode during the inserts.
Works great, only problem: The logs are flooded with the following message
duplicate key value violates ...
0
votes
0
answers
61
views
How to Track Table Usage
I need to track usage for 1 table, and log how this table is accessed (select, insert, etc.) and by which logins
What is the proper way to do it using SQL Server Audit and Extended Events ?
If there ...
0
votes
1
answer
165
views
how can I divide log files for specific DB queries?
Currently my db has a couple of triggers for some (not all) tables that get executed when a specific number of columns has been updated. I keep track if the triggers for those rows on a boolean column ...