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

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

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 ...


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