The tag has no usage guidance.

learn more… | top users | synonyms

0
votes
1answer
205 views

Sessionizing Log Data Using SQL window functions: tweaking a query (incrementing session ID and event length)

I'm referencing to a very good blog entry, that describes how to sessionize log data with SQL window functions. I'm no database pro and I don't really understand the logic behind this query (you can ...
-1
votes
0answers
9 views

implement audit logging in a banking channel manager [closed]

Our team is going to implement a banking channel manager. one of the biggest concern for us is the way we implement the Audit Logging. formerly we implement audit logging with this approach : we have ...
-3
votes
1answer
36 views

SQL Server 2008 R2 - Rebuild Log

I'm trying to rebuild a log file for my db and I'm wanting to know if what is happening is normal. This is what I'm doing: use master ALTER DATABASE my_db SET SINGLE_USER WITH ROLLBACK IMMEDIATE; ...
0
votes
0answers
40 views

MySQL: So many prepared statements in general log file

One of my clients complained serious performance issues in a web-application written in Java. I was suspecting that there might be some unoptimized queries which are causing the problem. I've enabled ...
1
vote
1answer
196 views

Using file .log.3.gz

I have a file which I need to look at for errors, I got it from someone its extension is mysql.log.3.gz and when I uncompressed it, it has mysql.log.3, It is a log file? And if I open it in text ...
0
votes
0answers
28 views

Why does Postgresql not write the username to the log file

I am trying to understand why, my database is logging without username in the queries. I discovered today that I can't see by looking at the logs who did a query. I think it is a configuration ...
0
votes
1answer
21 views

How to get when MySQL instance went down last

Is it possible to determine when a MySQL instance went down last? Is there a log file or literally anything at all that logs the server status in MySQL? I have trolled through countless articles ...
0
votes
1answer
153 views

Export MySQL query log to JSON format

Is there any tool which is capable of exporting MySQL query log to JSON format (or any other structured format)?
2
votes
1answer
349 views

SQL Server Log Shipping Randomly Stops Copying and Restoring

I'm fairly new to Log Shipping but have configured a few with no issues, however I have a server sitting on SQL 2008 R2 with 6 databases on there, all 6 of these are supposed to be log shipping. The ...
1
vote
0answers
24 views

How to view phppgadmin as the application name in PostgreSQL's log files?

I am using PostgreSQL 9.2.2 (Windows) with phpPgAdmin 5.1. I need to monitor who connects to the server, and with which application. In the logging parameters of postgresql.conf, I use the following ...
3
votes
2answers
15k views

How to Fix log_reuse_wait_desc=LOG_BACKUP? LOG Backup not possible

I checked sys.databases to find out which databases need LOG backups. It surprised me that I had quite a few where log_reuse_wait_desc=LOG_BACKUP meaning, the JOB I have set up to run LOG backups on ...
4
votes
1answer
2k views

What is default MySQL binlog retention in AWS RDS?

I tried to retrieve my MySQL RDS binlogs in order to run manual "rollback" for some SQLs. Unfortunately, I noticed that only 2 binlogs for the last 30 minutes are available. "call ...
3
votes
1answer
2k views

SET extra_float_digits = 3

I'm using PostgreSQL 9.2 with my web application that has three servlets with three selects. I turn on the log. When I send my first query: select * from "Nomi" limit 4 before it the log shows me ...
9
votes
3answers
18k views

How to Log All mysql queries into log file?

I am using Mysql 5.6.12 under Wamp server environment. Now I want to log All queries into ".log" file, the queries which are running by PHP or from PHPMyAdmin, I want to log them...
0
votes
1answer
324 views

Does “Connect” statement for every query indicate broken connection pooling?

there's only one client application running queries against a MySQL instance. After enabling MySQL's general query log (configured to log every query) I noticed that every query starts with a ...
3
votes
2answers
4k views

How to enable queries logs in MariaDB

I'm running mysql Ver 15.1 Distrib 5.5.46-MariaDB in CentOS 6.7 server. I'm trying to get queries logged and I'm doing by redirecting log to files as shown below: #/etc/my.cnf.d/server.cnf # this is ...
1
vote
0answers
33 views

Trying to restore a db2 database but stops at roll-forward with error 'SQL1265N'

I'm trying to restore a backup that is older than the current database. The restore went ok, but the roll forward didn't giving the following error: SQL1265N The archive log file ".LOG" is not ...
3
votes
1answer
2k views

Normalized Table Structure for Logging

How can I normalize a table that has four columns for logging the latest activity for a single row: Created On Created By Modified On Modified By We have dozens of tables, all with these 4 ...
5
votes
1answer
165 views

PostgreSQL doesn't log

I'm using ArchLinux and PostgreSQL 9.4.4 and have enabled the logging in the config file: $ sudo egrep -v "^[[:blank:]]*($|#|//|/\*| \*|\*/)" /var/lib/postgres/data/postgresql.conf max_connections = ...
0
votes
1answer
93 views

MySQL: Creating a numeric user ID from distinct combinations of IP and user agent from a server log

I'm trying to create a numeric user ID from the distinct combination of IP addresses (alphanumerically anonymized) and the user agents. The table is a pre-processed server log file and contains among ...
1
vote
1answer
32 views

Report rollbacks to log file

There are several reasons for SQL transactions to rollback. I want to log all of them to the SQL Server Log File so that I can find information about them at a later time in the SQL Server Log File ...
0
votes
1answer
22 views

MySQL InnoDB Error [duplicate]

I'm currently experiencing issues with my server MySQL databases as I keep receiving the following error: InnoDB: The log sequence in ibdata files is higher InnoDB: than the log sequence number in ...
1
vote
1answer
71 views

Is it possible to convert .trn (transaction log) file to human readable form

I have used below SQL statement to get the transaction information done on 2015-10-26, but the information not in human readable form. ** SELECT * FROM fn_dump_dblog ...
1
vote
1answer
22 views

Configure MariaDB to log row deletion ONLY

I'm investigating some rows/tables that intermittently go missing on a Magento site, and of course there's no entries in the error log. (I suspect Magento queries/rules or human error might be the ...
7
votes
1answer
157 views

Is it possible to exclude specific users in log activity of PostgreSQL?

I need to monitor the activity of users in our databases. I have set the following parameters in postgresql.conf: log_min_duration_statement = 0 log_connections = on log_disconnections = on ...
1
vote
0answers
23 views

Logging within a procedure's transaction

I have an ETL process running inside a PostgreSQL 9.3 procedure on AWS RDS. The procedure normally takes about ten minutes to run, but I'm having a rare issue where it takes several hours and never ...
3
votes
1answer
120 views

How to log all SQL queries for a single connection or user or client host?

Is there a way to log all SQL queries in Postgres 9.3.9 for a single connection or user or client host? In other words, I want log_statement = all but only for a certain username or client hostname ...
-2
votes
1answer
88 views

Why are writes failing in MongoDB?

Here is the information about my development environment: Microsoft Visual Studio Community 2015 .NET Framework 4.6 ASP.NET MVC assembly System.Web.Mvc Version=5.2.3.0 MongoDB.Driver 2.0.1.27 ...
9
votes
1answer
1k views

“truncate log on checkpoint” option in SQL Server

Long story but our long term consultants (former employees) wrote a custom script years back (2006 or so) to interface with Tivoli Storage Manager and it appears to be checking for a SQL Server DB ...
1
vote
1answer
79 views

How I compact WAL files?

I like compact WAL files. Actually I do: archive_command = 'cp "%p"C:\\%f"' What is the best way to do it?
0
votes
0answers
67 views

Error: 17806, Severity: 20, State: 14

I have frequent access error log like below: Error: 17806, Severity: 20, State: 14. SSPI handshake failed with error code 0x8009030c, state 14 while establishing a connection with integrated ...
-1
votes
1answer
165 views

How to reduce the size of ldf file? [duplicate]

We take full backups of the DB every day (in full recovery mode) and keep them for 10 days. Because of our requirements, we don't want to take incremental or differential backups of the DBs. Now we ...
0
votes
1answer
26 views

Loging queries and their error Text

I need to find out the statements that are unsuccessfully executed in sql, along with their error trace. As of now I created a trigger which is triggered on server error, which stores the sql text and ...
1
vote
1answer
112 views

PostgreSQL bug(?) - logging with a minimum log level

I am using the log_min_error_statement - Setting in the PostgreSQL configuration file, but the logger does not react on the setting, either if I turn it on, or off, or set it to another level, the ...
4
votes
2answers
601 views

How to log custom messages from inside a PostgreSQL transaction?

I have a software that generates transactions and executes them. I would like to asynchronously inspect about the transaction progress in term of the simple proportion of queries executed over total ...
4
votes
1answer
1k views

Truncate log file mirrored database

In SQL Server 2008, I have a mirrored database with a log file that has increased to 80GB, which is not normal and I have serious problem. I would like to decrease the log file size by truncating it. ...
1
vote
0answers
158 views

best way to log large amounts of data

I'm building a new logging system for our company. I'm wondering about the best way to store about 50-100GB data each year. I'm looking at both MySQL and MongoDB. I'm considering MongoDB because it ...
1
vote
0answers
113 views

Which major database platforms support TTL?

I need to store some data in a database that will be hosted on Amazon Web Services, and I have complete freedom over choosing which database platform to install, based on what I think will best suit ...
0
votes
0answers
182 views

Mysql is not starting while using xampp.

Mysql is not working when I try to view my site on locahost. I keep getting 'Error: MySQL shutdown unexpectedly.' The Mysql log says: 2015-05-06 19:39:13 5268 [Note] Plugin 'FEDERATED' is disabled. ...
1
vote
1answer
72 views

Why is my transaction file growing when db is in simple mode and there are no waiting transactions

I noticed that my database log file has reached 160GBs. My database is in simple recovery mode and I used the following query to see if there are any waiting transactions. SELECT ...
5
votes
2answers
5k views

MySQL “Statement may not be safe to log in statement format” warning

What is the meaning of the following MySQL warning: Statement may not be safe to log in statement format. I have some tens of thousands of these statements every day in my mysqld.err file, and I'm ...
1
vote
0answers
93 views

Postgres: Can't free space because I have no space

I have a Postgres DB that someone was brilliant enough to install in the log partition of my linux box. It has a serious index problem, with indexes ballooning up to 50GB per. As soon as I start ...
-1
votes
1answer
74 views

shrink transaction log [duplicate]

Can I shrink transaction log when database in online using below command ? DBCC SHRINKFILE(transactionloglogicalfilename, TRUNCATEONLY) FYI my database is in production server & highly critical ...
-1
votes
2answers
158 views

Logging all the queries in postgres

I am using Postgres as my Database. I need to know whether I can extract all the queries that got executed with out logging them as logging all the queries will degrade the performance of database. ...
0
votes
1answer
254 views

Difference between alert log and archive log in oracle databases

I don't know anything about oracle databases. Actually I'm asking this question for my friend (He currently doesn't have access to internet!). He wanted to know that what's the difference between ...
2
votes
1answer
91 views

Investigating specific SELECT queries

For a particular row in a table how can I determine the number of reads done to it such as SELECT * FROM MyTable WHERE ID = <something> and when and where the read query executed? I'm ...
0
votes
1answer
627 views

What does “as anonymous on” means in mysql's general log?

In mysql's general log I see things like: 141017 8:57:31 4 Connect root@localhost as anonymous on What is this "as anonymous on" thing even means? I log in as root@localhost. Am I still ...
0
votes
3answers
358 views

Truncating log while database is in use

New to SQL server. I have to truncate log on printing database as the server is almost out of space:(other stuff on server too) I know I must : USE master GO ALTER DATABASE DB_Name SET RECOVERY ...
1
vote
0answers
203 views

Sql server 2012 log file growth of cdc enbled db

All, I have cdc enabled on a Sql Server 2012 database that is a primary db in transactional replication and the primary in a availability group. The log file is a little over 95 GB, a historic high. I ...
3
votes
1answer
5k views

Logging to a file in PostgreSQL windows service

I need an alternative for running the following command: C:\xxx\pgsql\bin\pg_ctl" -D "C:\xxx\pgsql\data" -l "C:\yyy\log\pgsql.log" start. This way the server starts and logs to C:\yyy\log\pgsql.log. ...