Because I always forget – SQL Server 2005 Logins

Posted on February 27th, 2009 in Technology, Work by Jim Prince

How to transfer the logins and the passwords between instances of SQL Server 2005.

On Source Server
Create stored procedure sp_help_revlogin from code on http://support.microsoft.com/kb/918992/.
Run the stored procedure and copy the output.

On Destination Server
Paste the Output from source server into a query window and run it.

Job done!


Because I always forget – Export all SPNs in a domain

Posted on February 18th, 2009 in Technology, Work by Jim Prince

To export all the Service Principle Names (SPNs) from a domain use

ldifde -f spns.txt -d DC=resource,DC=domain,DC=local -l serviceprincipalname

LDIFDE queries any available domain controller to retrieve/update AD information.

More information about LDIFDE can be found here

http://support.microsoft.com/kb/555634


Because I always forget – Apache remote connections

Posted on January 16th, 2009 in Technology, Work by Jim Prince

Oh, the wonders of selinux.

To allow Apache to make remote connections to, for example, MySQL, POP or IMAP services type the following as root or using sudo;

setsebool -P httpd_can_network_connect=1

To temporarily disable selinux (not recommeded) type;

echo 0 >/selinux/enforce

Use

echo 1 >/selinux/enforce

to enable.


Because I always forget – SSL with Host Headers

Posted on January 16th, 2009 in Technology, Work by Jim Prince

Type the following command at the command prompt:

cscript.exe adsutil.vbs set /w3svc/<site identifier>/SecureBindings ":443:<host header>"

where host header is the host header for the Web site.

Shamelessly lifted from http://technet.microsoft.com/en-us/library/cc756897.aspx


Because I always forget – Autostart of Linux Services

Posted on January 5th, 2009 in Technology, Work by Jim Prince

As superuser or with sudo use the following to list the status of the service.

chkconfig <service_name> --list

e.g. chkconfig httpd --list

To enable autostart of service use

chkconfig <service_name> on

e.g. chkconfig httpd on

To disable autostart of service use

chkconfig <service_name> off

e.g. chkconfig httpd off

Piece of piss, if only I could bloody rememeber it.

Off course this only applies to RedHat based distributions.


Because I always forget – Windows 2003 Server Uptime

Posted on July 15th, 2008 in Technology, Work by Jim Prince

Instructions

  1. Go to “Start” -> “Run”.
  2. Write “CMD” and press on “Enter” key.
  3. Write the command “net statistics server” and press on “Enter” key.
  4. The line that start with “Statistics since …” provides the time that the server was up from.

Lifted from http://support.microsoft.com/kb/555737