Backtrack:  
 
showing all posts
edited by on June 2nd 2015, at 12:12
I got these messages in the error log of a SQL Server instance:

SQL Server has encountered 1 occurrence(s) of cachestore flush for the 'Bound Trees' cachestore (part of plan cache) due to some database maintenance or reconfigure operations.SQL Server has encountered 1 occurrence(s) of cachestore flush for the 'SQL Plans' cachestore (part of plan cache) due to some database maintenance or reconfigure operations.SQL Server has encountered 1 occurrence(s) of cachestore flush for the 'Object Plans' cachestore (part of plan cache) due to some database maintenance or reconfigure operations.

I also saw messages about starting a certain database, even though the instance itself remained running. T  ...
edited by on May 29th 2015, at 14:51

For some time now, installing/updating Java prompts you to install the Ask.com toolbar and search page. After installation, this is offered each time you install a new update of Java, which can be very annoying. A somewhat undocumented feature is that you can disable these offers from the Java Control Panel, preventing future updates from prompting you to install this thing.

  1. Open the Java Control Panel from the Windows Control Panel.
  2. Click the tab Advanced, scroll all the way to the bottom.
    There, under the Miscellaneous section, check Suppress sponsor offer when installing or updating Java.
edited by on May 29th 2015, at 14:43
You can set up an e-mail signature in Office365's OWA (also works with on-premise Exchange 2013 OWA) quite easily. While it's no problem to apply any kind of formatting to your signature, you'll find out that adding images is not as straight forward.

To set up an e-mail signature, follow the steps below.

For best results, use either Internet Explorer or Firefox. Google Chrome has some (minor) issues with OWA.

Log onto OWA. For Office365, this is https://outlook.office365.com/.

Click on the gear icon in the upper-right corner, and choose Options.

In the left tree, follow Mail > Layout > Email signature.

Edit your signature, or copy/paste it from another source (e.g. Word).
If you   ...
edited by on May 29th 2015, at 13:24
The old method of disabling Java updates through the registry or GPO, mentioned in this article is no longer valid for Java 7 (1.7) and 8 (1.8), nor does it prevent the UAC prompt from appearing when the updater runs in the background. The method explained here is a better, more up-to-date solution to completely disabling Java updates from running, and includes the required registry change to stop the updater from running, preventing the UAC prompt from ever appearing.

Disabling Java update from control panel is not as straight forward as it seems to be. Java update can only be disabled with administrative rights, so you need to run the Java control panel elevated. Since you can't do this t  ...
edited by on May 29th 2015, at 12:46
If you completely want to disable Java Update (which is especially useful on Remote Desktop Servers), you have make a few adjustments to the registry.

EDIT (2015-05-29): this method is depecrated, and only applies to Java 1.6 on Windows XP or older. Only the alternate method is still valid as this prevents the updater program from running.

To disable Java Update, navigate to the key (32-bit and 64-bit differs):

32-bit: HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Update\Policy

64-bit: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\JavaSoft\Java Update\Policy

Find the value EnableJavaUpdate and set it to 0. This will disable Java Update in the Control Panel.

To prevent the update check  ...
edited by on May 28th 2015, at 12:10
You can compile for older versions of the JRE by setting the compiler target compliance level. This allows you to generate class files that are usable on older versions of the JRE as well as the current one.

From your IDE, you will be able to select the compliance level, but if you're compiling manually using javac, this can be done by setting the appropiate command line parameters: -source and -target.

For example, to compile for JRE 1.6, do this:

javac -source 1.6 -target 1.6 MyClass.java

A quick explanation:

-source sets the source compatibility to the specified version, and ensures that your code is usable on the specified JRE.

-target specifies the compliance level o  ...
edited by on May 28th 2015, at 11:39

For debugging purposes, I often prematurely abort a function by adding a return statement in the middle of it. With most compilers this works flawlessly, accept with Java...

The Java compiler bums out with an unreachable statement error, and won't allow you to compile a class until all code is reachable within a function.

Luckily, you can trick the compiler by adding an if-statement that's always true:

if (1==1) return;

This way, as the return is supposedly conditional, and the compiler doesn't consider the result of an if-statement, it is tricked into believing the following code is still reachable.

edited by on May 28th 2015, at 11:17

A nice article about how to set up NIS on Red Hat linux: http://bradthemad.org/tech/notes/redhat_nis_setup.php.

edited by on May 28th 2015, at 10:46

When attempting to log on with a domain account on a computer joined to a domain that has both 2012R2 and 2003 domain controllers, you may encounter the following error:

Error message
unknown username or bad password

Additionally, an Event ID 4 on Source: Kerberos is logged. You can only log on using local accounts.

Solution

Mixed 2012R2 and 2003 AD environments require hotfix 2989971 to be installed on every 2012R2 DC. See the KB for a full explanation.

The hotfix requires Update 1 (2919355) to be installed first. The hotfix is also included in update rollup 2984006.

edited by on May 27th 2015, at 15:47
A collegue ran into an issue with Microsoft Outlook (2010) and the AVG Outlook plugin: when attempting to open mails on a shared Exchange mailbox, the message body would be cleared from that e-mail. The message body would be deleted from Exchange itself as well, resulting in other users accessing the mailbox to also see empty message bodies. If a mail contained attachments, they would be left alone.

After a long search, the culprit seemed to be the AVG Outlook plugin. Upon opening an e-mail, the plugin would scan the e-mail, which somehow went wrong, resulting in clearing the message body (probably because it was marked as bad?). Because of the nature of the mailbox (it's a shared Exchange   ...
edited by on May 27th 2015, at 15:25

Preferred:

String x = JComboBox.getSelectedItem().toString();

or

String x = String.valueOf(JComboBox.getSelectedItem());

The second method protects against null values as well.

Avoid using casting:

String x = (String)JComboBox.getSelectedItem();

This would work fine if the item is indeed a string, but will fail if it can (also) be any other data type. To be safe, use either of the first two methods.

edited by on May 26th 2015, at 16:25
Some notes about my experience with the upgrade of a Trend Micro OfficeScan 10.6 to 11.0.

Check the version requirements before upgrading: Upgrade path to OfficeScan 11.0.

Basically, be sure to have the latest version of your current major version and service pack installed.

Upgrade considerations for OfficeSCan (OSCE) servers and clients/agents

Check the system and OS requirements, as they have changed since 10.6 and 11.0. When upgrading, it is also recommended to create a backup, in case something goes wrong during the upgrade.

Upgrading from a version prior to 10, you may have to workaround losing your defined scan methods. This is not required when performing an in-place upgrade fro  ...
edited by on May 26th 2015, at 16:17
Two methods of truncating the transaction logs for a database for SQL Server 2008 or newer:

Perform a backup to the nul device, essentially a "black hole":

BACKUP LOG [databaseName] TO DISK = 'nul:'

Temporarily set the recovery model to SIMPLE, then shrink the transaction log:

ALTER DATABASE databaseName SET RECOVERY SIMPLEDBCC SHRINKFILE('databaseName_log', 0, TRUNCATEONLY)ALTER DATABASE databaseName SET RECOVERY FULL

WARNING: truncating the transaction log without a backup may result in data loss in case of a database failure!

EDIT (26/05/2015):

You could attempt the backup/shrink routine without changing the recovery mode, but this will most likely onl  ...
edited by on May 26th 2015, at 14:49

By default, it is not possible to specify passwords (the SecureString type) directly as a plain-text cmdlet parameter because it is unsecure to do so (and they are right). But sometimes, there's no other way to run a cmdlet without specifying the password as plain text as a cmdlet parameter. Luckily, there's an easy workaround by performing a conversion from plain text and store the password in a SecureString object.

$pw = ConvertTo-SecureString -String "your-pw" -AsPlainText -Force

You can then use the $pw object to specify the password in a cmdlet.

For example: resetting the password of an AD account:

Set-ADAccountPassword -Identity my-account -NewPassword $pw
edited by on May 26th 2015, at 14:17
You can move the tempdb of a SQL Server instance to another location using T-SQL, but this requires a little bit of downtime: setting a new location will only take effect after a restart of the SQL Server instance.

First, retrieve the tempdb's current location and logical name:

Use tempdbGOSELECT name,filename FROM sys.sysfilesGO

This should give you two entries: one for the actual database, and one for the transaction log of tempdb. Now that we have the location and logical name, we can change it:

ALTER DATABASE tempdb MODIFY FILE (NAME = tempdev, FILENAME = 'T:\newdir\tempdb.mdf');GOALTER DATABASE tempdb MODIFY FILE (NAME = templog, FILENAME = 'T:\newdir\templog.ldf');GO

Replace the p  ...
edited by on May 26th 2015, at 14:05

If, when attempting to start SQL Server instance, you get an error 1814, this means there's a problem with the tempdb database. Either it can't be created because the disk or volume is not accessible for writing (i.e. a security permission problem), or the volume on which the tempdb resides does not have enough space available. If the latter is the problem, you'll need at least 2 MB of free space for tempdb to be created.

edited by on May 22nd 2015, at 11:26
You can perform resource configuration for SQL Server Analysis Services (SSAS) through SQL Server Management Studio (SSMS). Simply connect to the SSAS (select Microsoft Analysis Server as server type and connect to the instance name). Using SSMS allows to change only a limited number of common and advanced parameters. Many of the very advanced parameters (usually those that require a restart of SSAS) can only be configured through a file called msmdsvr.ini.

The INI-file msmdsvr.ini, by default located in %PROGRAMFILES%\Microsoft SQL Server\<ssas-instance-name>\Config and in fact is an XML-file, allows you to configure both common and advanced parameters of SSAS. By default, the file i  ...
edited by on May 22nd 2015, at 09:21

Cisco AnyConnect VPN client may fail on Windows 7 for no apparent reason with the following error:

Error
Unable to establish VPN

A possible reason may be that Internet Connection Sharing has been enabled on one or more network interfaces (e.g. used for making a hotspot out of your laptop). Try disabling ICS, then try connecting again.

showing all posts