Friday, April 25, 2014

Shrink transaction log

When transaction log has grown to size that is too big to take backup, or space just isn’t available AND the database just isn’t that important that it should drag all others to lag-hell this might be done to solve the issue.

Note that there is a point to transaction files. If the database is so important that you can’t loose a minuts worth of transactions its really a necessary feature. But if that need isn’t there, the recovery mode could easily be changed to Simple to avoid the risk of losing space on an old server and therefore halting critical applications.

But here it is anyways.

  1. Change recovery mode to Simple on the overgrown database.
  2. Run query: dbccshrinkfile (mydatabase_Log,0)
  3. Change recovery mode to Full again to restore the logging.

If the transaction logs grows, its usually because their isn’t a real backupsolution running for the database. Use maintenance jobs or stored procedures if a real one isn’t available.

Thursday, April 24, 2014

Can’t create maintenance plans

For some security reason these are disabled on SQL Server 2008-2012 on some occasions. Might be a servicepack disables it. But maintenance plans are a nice tier 2 security precaution.

Get thrown this error when trying to create a maintenance plan

image

Ran following query on victimserver to solve it.

image

Wednesday, April 23, 2014

Manage stored wireless networks in W8

Microsoft, in all their wisdom, have removed the Manage my wireless network option that was available on the wireles interface in Windows 7 and earlier. So, how to we manage it now?

See stored wireless profiles

/> netsh wlan show profiles

Delete a profile

/> nets wlan delete profile name=mynetwork

To show saved information, including key

/> netsh wlan show profiles name=mynetwork key=clear

 

Or to use the gui-way

Charms>PC Settings>Networks>Connections>WiFi>Manage known networks

But only thing you can do from here is see the name and forget the network, so learn the cli way.

References:

http://social.technet.microsoft.com/Forums/windows/en-US/ac80d8ec-21ad-4d44-9a0c-c8777f861db7/windows-8-manage-wireless-networks?forum=w8itpronetworking