Questions tagged [logging]

A time-ordered, human-readable archive of activity. For questions about the database transaction log, use the transaction-log tag instead.

Filter by
Sorted by
Tagged with
0 votes
1 answer
15 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 ...
user avatar
  • 97
0 votes
0 answers
20 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 ...
user avatar
0 votes
0 answers
42 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 ...
user avatar
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 ?
user avatar
0 votes
2 answers
77 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,...
user avatar
  • 1
0 votes
0 answers
42 views

The amount of mongodb log is generated excessively

I’m using mongodb 3.6.8 for log collection. I want to get only slow query and error level logs. I set profilinglevel to (1, 5000), loglevel to 1 for queries only and 0 for everything else. However, ...
user avatar
0 votes
1 answer
49 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 ...
user avatar
0 votes
1 answer
88 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 ...
user avatar
  • 103
0 votes
2 answers
74 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. ...
user avatar
  • 2,028
1 vote
1 answer
43 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 ...
user avatar
  • 131
2 votes
1 answer
74 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 ...
user avatar
  • 135
1 vote
1 answer
36 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 ...
user avatar
0 votes
0 answers
50 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 ...
user avatar
  • 195
0 votes
1 answer
42 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' ...
user avatar
1 vote
2 answers
61 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
user avatar
0 votes
1 answer
25 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. ...
user avatar
  • 188
0 votes
2 answers
368 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 "...
user avatar
-2 votes
2 answers
79 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 ...
user avatar
  • 1
0 votes
1 answer
153 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 ...
user avatar
  • 33
-1 votes
1 answer
45 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 ...
user avatar
-2 votes
1 answer
774 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 ...
user avatar
-1 votes
2 answers
2k 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 ...
user avatar
1 vote
2 answers
1k 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 ...
user avatar
  • 111
1 vote
2 answers
185 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 ...
user avatar
0 votes
1 answer
22 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 ...
user avatar
1 vote
0 answers
55 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# ...
user avatar
  • 19
1 vote
0 answers
193 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 ...
user avatar
0 votes
1 answer
29 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 ...
user avatar
0 votes
0 answers
467 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 (...
user avatar
-1 votes
1 answer
54 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 ...
user avatar
0 votes
2 answers
84 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 ...
user avatar
2 votes
1 answer
2k 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 ...
user avatar
  • 55
1 vote
0 answers
172 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 ...
user avatar
1 vote
1 answer
660 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 ...
user avatar
  • 135
0 votes
0 answers
41 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 ...
user avatar
0 votes
1 answer
49 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 ...
user avatar
  • 103
1 vote
1 answer
169 views

Writing MongoDB logs to a remote logging server

I am trying to forward MongoDB logs from several remote servers to a central logging server. To do this, I changed my mongod.conf files to use syslog like so: systemLog: destination: syslog ...
user avatar
1 vote
0 answers
32 views

How to measure durations (import, update) in Postgres DB?

we have a Postgres database which receives data by an extern web client. We would like to measure the duration of the UPDATE, INSERT and DELETE processes on our tables. Until now, we used the ...
user avatar
0 votes
2 answers
132 views

PostgreSQL failsafe start after disk crash

We use PostgreSQL to store logs. A disk crashed and some files in the file system were corrupt. I read this: https://wiki.postgresql.org/wiki/Corruption But this page does not solve my needs. I ...
user avatar
  • 1,331
1 vote
1 answer
5k views

Does SQL server log when and who enabled / disabled jobs by default?

Is there any default logging or history of when a SQL job was enabled or disabled?
user avatar
  • 24.6k
1 vote
1 answer
2k views

Why mongodb logs commands in the log file and how to avoid that?

OS: Windows 10/ Server 2012 Mongodb verison : 3.4.9 I have set the mongod --logPath and --quiet command line parameter The logs are just growing beyond 100mb and not rotating. Seeing the logs I see ...
user avatar
1 vote
1 answer
2k views

Find SSIS package which calls stored procedure

We are trying to catch errors into an Error Log Table, similar to below. We have many Master SSIS packages, calling many stored procedures. Following code will log into the Error Log Table. Is there ...
user avatar
1 vote
1 answer
270 views

Is it possible to audit query results in SQL Server?

I want to find out if it is possible to audit the results of any query that gets executed on an instance of SQL Server. We currently have C2 auditing enabled, but this only showed what query was ...
user avatar
  • 111
-2 votes
1 answer
225 views

Centralized Logs (error, deadlocks, slow queries) For SQL Servers

I want to establish a centralized log for many SQL Servers, similar to the products Graylog or elk stack. What is the best and performant way to send these kind of logs to a log collector? I ...
user avatar
2 votes
1 answer
5k views

Can't create/write to file '/var/log/mariadb/mariadb.log'

I'm troubleshooting a MySQL no-start on CentOS 7 VM. It is a bit unusual to see this since we have not made any configuration changes. The manual start command was taken from systemd logging. The ...
user avatar
1 vote
3 answers
84 views

Want to get executed query users log in SQL-server

Yesterday one of my team members has truncated a few tables, but who have truncated those tables is still a mystery. Can I have user based query log with the timing of execution? Or something where I ...
user avatar
  • 189
1 vote
1 answer
172 views

MongoDB as a log storage. Choosing shard key

I'm designing a log storage system based on MongoDB. I want to shard a log collection to increase ingestion and capacity (distribute writes to several machines) while allow fast search. I should be ...
user avatar
0 votes
1 answer
26 views

VoltDB Logging Level

How much (estimated percentage) is going to worsen the response-time of the database if the logging level is lowered to "DEBUG". ?
user avatar
2 votes
1 answer
100 views

Replication with encrypted columns, does the 2nd server have to have the same master key and symmetric key or is it done automatically?

I have two questions actually: If you set up a table with encrypted columns and replicate it to another server does the other server have to have the same master key and symmetric key or is it ...
user avatar
  • 123
3 votes
1 answer
665 views

PostgreSQL: Log statements which do sequential scans

I use this snippet to detect missing indexes: https://stackoverflow.com/a/12818168/633961 Example: SELECT relname AS TableName, to_char(seq_scan, ...
user avatar
  • 1,331