Tag Info

Hot answers tagged

6

I would suggest not logging the "latest activity" but rather keeping a full audit trail. In order to minimize space requirements, you might want three tables: CREATE TABLE dbo.Users ( UserID TINYINT IDENTITY(1,1) PRIMARY KEY, -- assuming <= 255 users Username NVARCHAR(128) NOT NULL UNIQUE, /* , other columns */ ); CREATE TABLE dbo.Tables ( ...


4

This means that your binary log format binlog_format is STATEMENT, which is the default binary log format. STATEMENT-based format logs the statement issued, while ROW-based format logs how individual tables were changed. The problem with STATEMENT logging is certain statements cannot guarantee that the same data written on the Master will end up on the ...


3

If you have shell access to the server on which mysql is running, you can use tcpdump + pt-query-digest. First, do a tcpdump with the appropriate switches necessary for pt-query-digest: tcpdump -i [your interface] port [3306,etc] -s 65535 -x -nn -q -tttt > tcpdump.out Then, after you are done with your packet capture, do this: pt-query-digest tcpdump.out ...


3

Locate your postgresql.conf in the datadir Find the section that looks like this #------------------------------------------------------------------------------ # ERROR REPORTING AND LOGGING #------------------------------------------------------------------------------ # - Where to Log - #log_destination = 'stderr' # Valid values are ...


2

LOGPRIMARY, LOGSECOND and LOGFILSIZ combine to define the maximum size of the transaction log on your server using the following formula: Total Size = (LOGPRIMARY + LOGSECOND) * LOGFILSIZ * 4096 bytes In your case, this results in (13 + 15) * 4096 * 4096 = 469762048 bytes. The maximum transaction log size limits 2 things: 1) the absolute size of a ...


2

If you use these two lines in my.cnf, I find that it works fine. This will log all queries to the server, from any source, not just PHP/PHPMyAdmin. Paul... [mysqld] general_log = on general_log_file=/users/ugrad/linehanp/mydb/logfile.txt


1

[mysqld] # Set Slow Query Log long_query_time = 1 slow_query_log = 1 slow_query_log_file = /usr/log/slowquery.log log_queries_not_using_indexes = 1 #Set General Log general_log = on general_log_file=/usr/log/general.log Note that enabling general_log on a production server has overhead you should avoid it. You can check problematic queries from slow log.


1

When you enable archive logging in a database, you're telling DB2 that you want to retain a copy of all transaction logs that have been created. LOGPRIMARY and LOGSECOND only control how many active log files can be in use in the active log path at any given time. Please read the documentation on database logging for more details.


1

This log just indicates that you didn't shut down correctly, so upon startup, InnoDB had to do a "crash recovery". It's not the crash recovery that would have lost data -- it's your operating system or hardware. Crash recovery is designed actually to avoid losing data due to crashes (that's its entire purpose). The log message indicates a severe problem: ...


1

UPDATE: I figured it out! Because the ola hallengren scripts check for log shipping roles and skip log backups if it finds the current db in either msdb.dbo.log_shipping_primary_databases or msdb.dbo.log_shipping_secondary_databases AND because the databases I have been fighting with recently DID have old log shipping entries that were not proiperly ...


1

Now that you've changed the recovery model on the database from full to simple and back to full again, the database is running in 'pseudo-simple' mode. Taking a database backup is required now before a log backup will do any meaningful work. See here for some further details. To summarize: In order for a log backup to be useful for a restore, there needs ...


1

See disclaimer at the end. First you need to figure out if there is a reason that the log is large/growing. A quick way to do that is to run this query (see http://sqlity.net/en/556/t-sql-tuesday-25-%E2%80%93-sql-server-tips-tricks/ for more info): SELECT log_reuse_wait_desc,name FROM sys.databases; If that comes back with "NOTHING" in the ...


1

From mysqlperformanceblog Log Sequence Number (LSN) : Log Sequence Numbers correspond to given position in the log files and typically incremented for each log record. Innodb uses number of bytes ever written to the log files however it could be something different. LSNs are often extensively used in recovery check pointing and buffer management ...


1

It sounds like you have a high volume of transactions happening with your replication. If so, that "clean up: distribution" job should probably be running far more often. It sounds to me like it's happening once a day. On my high transaction replication server I have it running every 15 minutes to keep just the latest 36 hours. That way it paces itself and ...


1

You can do that with the help of the additional module dblink. Install once per database (the one where the trigger is executed): CREATE EXTENSION dblink; You need superuser privileges (in the database cluster where the trigger runs) for some of the involved functionality. Since you want to write to the external database, you will probably want to use ...


1

There is another reason for “Statement may not be safe to log in statement format” warning My employer has a DB Client who is always running a query like this DELETE FROM mydb.mytable WHERE ... LIMIT 1; This query will succeed on a DB Server. However, if you are using MySQL Replication, this could present data inconsistency problems because when either ...



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