How to shrink a SQL Transaction Log

For 2005:
–* you can get the logical log file name usingthe following command in Query Analizer:

exec "databaseName".dbo.sp_helpfile

Now execute the following command to shrink the database log to 200MB:

DBCC SHRINKFILE ("logicalLogFileName", 200)
BACKUP LOG "databaseName" WITH TRUNCATE_ONLY
DBCC SHRINKFILE ("logicalLogFileName", 200)

–if it doesn’t work, run the two commands again.

–When done with that, do a full backup of your db as you will have broken your tlog backup chain.

For 2008+

USE databasename;
GO
-- Truncate the log by changing the database recovery model to SIMPLE.
ALTER DATABASE databasename
SET RECOVERY SIMPLE;
GO
-- Shrink the truncated log file to 1 MB.
DBCC SHRINKFILE (2, 1);  -- here 2 is the file ID for trasaction log file,you can also mention the log file name (dbname_log)
GO
-- Reset the database recovery model.
ALTER DATABASE databasename
SET RECOVERY FULL;
GO

MCSA 2003 70-292 Tips & Trics

Tips & Weetjes MCSA 2003:

1. De PDC emulator (FSMO role) is verantwoordelijk voor de tijd sync. De handig weetje is dat je met het w32tm /config /syncfromflags:manual /manualpeerlist time_source de tijd kan syncen.
2. Voor de meest optimale werking van een Windows machine moet er minstends 5% vrije RAM zijn. Voor 512 mb komt dat dus op minstends 25.6.
3. Perfmon: Memory – Pages/Sec mag niet hoger zijn dan 5 anders is het een memory probleem
4. Perfmon: Logical Disk – Avg Disk Queue Length mag niet hoger zijn dan het aantal 2 + het aantal spindles in het systeem. Voor 1 schijf is dat dus 1 (schijf) + 2 (standaard) = 3 (max)
5. Private houdt in beveiligde verbinding in
6. WPAD = Web Proxy Auto Detect
7. 80/20 Rule voor een 192.168.1.0/24 segment houdt in:
DHCP-A (80%)
192.168.1.10 192.168.1.254 Range
192.168.1.10 192.168.1.205 Excluded adresses

DHCP-B (20%)
192.168.1.10 192.168.1.254 Range
192.168.1.206 192.168.1.254 Exclude adresses
8. Gereserveerde DHCP netwerk adressen zijn altijd met kleine letters en zonder tussenvoegsels
9. System monitor:

Hardware Status Explenation Accepting Valeus
Memory : Pages/Sec pages between disk and ram 30 low
Memory: Page Faults/Sec OS not found page in RAM 40 old pc´s 150 new pc´s
Disk: Time
Disk Avg Disk Queue Length mag niet hoger zijn dan het aantal 2 + het aantal spindles in het              systeem
Processor: Time greater than 85 not always a problem
Processor Queue Length greater than 2 * cpu´s = too much

Exchange 2003 Disaster recovery

With a good backup in hand and Exchange databases and logfiles on different hard drives, it is no problem to recover from an Exchange disaster.Just restore the data from backup and initiate a roll forward of the transaction logs. Well done, the Exchange information store goes online.

But what should you do when your backup isn’t readable or you don’t have a backup? Here’s how these tools come to play.

Before you start:

  • Make sure that the databases are really not startable
  • Check the Application log for Exchange events that can tell you the cause of the failure
  • Make a backup of the database
  • Restart the server so that a soft recovery can be done

ESEUTIL /P parameters

ESEUTIL /p repairs a corrupted or damaged database. Ensure that you have a minimum of 20% free disc capacity in association to the Exchange database size.


Figure 9: ESEUTIL repair modus

Example:

ESEUTIL /P „c:\program files\exchsrvr\mdbdata\priv1.edb“ /Se:\exchsrvr\mdbdata\priv1.stm /Te:\tempdb.edb

This command will repair the database PRIV1.EDB. If you have no .STM file, you can create one with ESEUTIL /CREATESTM. Read more about this here.

After running ESEUTIL, you can open a detailled logfile called >database<.integ.raw to see the results.

As a last Step run ISINTEG –fix -test alltests. You can read more about ISINTEG later in this article.

Note: Sometimes you must run the fix over and over again till it fix all problems. Its like a defrag of a harddrive

Source: http://www.msexchange.org/tutorials/Exchange-ISINTEG-ESEUTIL.html

Ubuntu

Hi everyone,
this is a simple Howto for owners of laptops with Intel 2200 or 3945 wifi cards. Using these commands will use laptop-mode automatically at bootup to improve your battery life. Additionnaly, there are two scripts to be added to laptop-mode so that it manages the power saving modes on the intel wifi cards. This howto assumes you already have a working wireless setup, there are other threads on getting you wifi working, please keep this thread about power management.

To use laptop-mode by default:

Code:

sudo gedit /etc/default/acpi-support

Scroll down change laptop-mode to true:

Code:

ENABLE_LAPTOP_MODE=true

For some reason, laptop-mode is only started when the AC is unplugged. This might seem fine unless you bootup the laptop on the battery, in which case laptop-mode never gets started. Thus, to enable laptop-mode at boot (taken from a lost thread):

Code:

sudo update-rc.d laptop-mode multiuser

Now that laptop-mode is started automatically, we can make sure it manages the power saving on the intel wireless cards (ipw3945 & iwp2200) this way.

To use the power management, you will need to install the wireless tools:

Code:

sudo apt-get install linux-restricted-modules-generic wireless-tools

For both intel 3945 (ipw3945 driver) and 2200 (ipw2200 driver) cards:

First, create the helper function file (taken from largecat’s post on page 2 of this thread):

Code:

sudo gedit /etc/acpi/intelWifiPwr.sh

copy & paste this code in the editor, save and exit.

Code:

#!/bin/bash
# Power saving setting for the Intel 3945 and 2200 wireless adaptor
#
# This script relies upon the name of the driver.

I3945_DRIVERNAME=ipw3945
I2200_DRIVERNAME=ipw2200

IWPRIV=/sbin/iwpriv
IWCONFIG=/sbin/iwconfig

SET_I3945_AC_PARMS="set_power 6"
SET_I3945_BAT_PARMS="set_power 7"

SET_I2200_AC_PARMS="power off"
SET_I2200_BAT_PARMS="power on"

#
# Find all the wireless devices using the supplied driver names.
# Place the interface names on the list WIFI_IFNAMES.
#
function findWifiIfsByDriver {
    local DEVICE;
    local LINK_TARGET;
    WIFI_IFNAMES=""

    for DEVICE in /sys/class/net/*; do
	if [ -d $DEVICE/wireless ]; then
# See if the driver for $DEVICE matches the supplied one by checking the link to
# the driver.
	    if [ -h $DEVICE/device/driver ]; then
		LINK_TARGET=`readlink $DEVICE/device/driver | sed 's/.*\///'`

		if [ $LINK_TARGET == $1 ]; then

# add the interface name to the list
		    WIFI_IFNAMES=$WIFI_IFNAMES" "`echo -n $DEVICE | sed 's/.*\///'`
		fi
	    fi
	fi
    done
}

#
# Set all the adaptors using the supplied driver into the supplied
# power saving mode
#
# $1 - driver name
# $2 - power command
# $3 - power command arguments
#
function setWifiPwrSave {
    local DEVICE;
    findWifiIfsByDriver $1;

    for DEVICE in $WIFI_IFNAMES; do
#	echo "Would execute $2 $DEVICE $3"
	$2 $DEVICE $3
    done
}

function intel3945_BatPwrSave {
    setWifiPwrSave "$I3945_DRIVERNAME" "$IWPRIV" "$SET_I3945_BAT_PARMS"
}

function intel3945_AcPwrSave {
    setWifiPwrSave "$I3945_DRIVERNAME" "$IWPRIV" "$SET_I3945_AC_PARMS"
}

function intel2200_BatPwrSave {
    setWifiPwrSave "$I2200_DRIVERNAME" "$IWCONFIG" "$SET_I2200_BAT_PARMS"
}

function intel2200_AcPwrSave {
    setWifiPwrSave "$I2200_DRIVERNAME" "$IWCONFIG" "$SET_I2200_AC_PARMS"
}

Then we will create 2 scripts. The first will run when the laptop is unplugged, the later when it runs on AC.

On battery:

Code:

sudo gedit /etc/laptop-mode/batt-start/20-wireless-battery.sh

Then copy and paste this code into the editor, save and exit:

Code:

#!/bin/bash

# source the helper script
. /etc/acpi/intelWifiPwr.sh

# set Battery power saving
intel3945_BatPwrSave
intel2200_BatPwrSave

Make it executable:

Code:

sudo chmod +x /etc/laptop-mode/batt-start/20-wireless-battery.sh

On AC:

Code:

sudo gedit /etc/laptop-mode/batt-stop/20-wireless-ac.sh

Then copy and paste this code into the editor, save and exit:

Code:

#!/bin/bash

# source the helper script
. /etc/acpi/intelWifiPwr.sh

# set Battery power saving
intel3945_AcPwrSave
intel2200_AcPwrSave

Make it executable:

Code:

sudo chmod +x /etc/laptop-mode/batt-stop/20-wireless-ac.sh

That’s it, you can give it a try by plugging and unplugging the AC and running iwconfig to verify that the Power management: on/off changes (this can take up to 15 seconds to change)

Bron: http://ubuntuforums.org/showthread.php?t=419772

LET OP:

Ik wil deze week de website weer online gooien. Zeker omdat alle carnavals plaatjes straks weer op de website moeten komen natuurlijk 😉 Er zal dan gevraagd worden voor een gebruikersnaam en wachtwoord.

Vul dan in bij gebruikersnaam: wipneus  en als wachtwoord pim

Zonder dat wachtwoord kun je straks niet meer op de site komen, totdat deze volledig is dichtgetimmerd. Wanneer dit actief is zal ik ook nog ff een mailtje sturen.

Groetjes,
Thomas

Wipneus en Pim Spamgang

Jullie zullen wel denken…. huh waarom is de pagina veranderd in zo’n rare blog….

Mijn collega heeft alle Joomla sites op de webserver geblokkeerd. De oorzaak hiervan is dat er op dit moment verschrikkelijk veel joomla sites gehackt worden die vervolgens allemaal andere joomla sites aanvallen. Omdat er klachten kwamen van andere joomla webhosters is de pagina per direct op non-actief gezet 🙁

Ik heb me ondertussen al verdiept in een oplossing. De oplossing is de rechten op de site aanpassen, de laatste versie van joomla installeren en een aantal componenten updaten of helemaal uitschakelen. Wat ik sowiezo wil doen is de pagina niet meer publiek maken. Er zal een gebruikersnaam en wachtwoord ingevoerd moeten gaan worden.

Ik vind het echt jammer dat een paar van die kl**tz*kken ons pleziertje op deze manier moeten bederven. Maar we doen er helaas helemaal niks aan…

Groetjes,
Thomas