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:
Additionally, an Event ID 4 on Source: Kerberos is logged. You can only log on using local accounts.
Mixed 2012R2 and 2003 AD environments require hotfix 2989971 to be installed on every 2012R2 DC. See the KB for a full explanation.
String x = JComboBox.getSelectedItem().toString();
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.
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.
Cisco AnyConnect VPN client may fail on Windows 7 for no apparent reason with the following error:
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.
You can retrieve a list of stored procedures in a SQL Server database through T-SQL by querying the built-in information_schema partition.
SELECT * FROM db_name.information_schema.routines WHERE routine_type = 'PROCEDURE'
Replace db_name with the name of the database you wish to retrieve the list of stored procedures. You can adjust the WHERE-clause even more to get a more narrow list.
You can also do this with the master database which will return all (system and non-system) stored procedures.
You can hide user accounts from the Windows Welcome (log on) screen through the registry. This works with Vista and all later versions.
This is a Perl script I wrote and used for the migration of a linux DHCP server (running dhcpd to a Windows DHCP server. The script looks in the dhcpd.conf configuration file for fixed reservations and exports these to a CSV for processing and importing in another server.
Usage is simple, as it takes its input from STDIN and outputs to STDOUT.
cat /etc/dhcpd.conf | perl export-dhcpd-reservations.pl > output.csv
The script is very simple and can probably do with a lot of improvements, but it's a start for anyone willing to develop it further. It is licensed as GPLv3.
Probably MSSQL 101, but this is how to quickly retrieve the structure of a table:
EXEC sp_help tbl_name GO
tbl_name is the name of the table.