| Login

Search this Blog

Here are the most recent postings to this blog. Use the archive calendar or search to find other entries.
Author:R TeachoutCreated:6/15/1999 6:20 AM
Ramblings, SQL Scriptlets, VBS Scriptlets, Linux Stuff, and more!

ZCS 6.0.4NE - ZCS 6.0.7NE Migration from one provider to another
A global admin account WAS available for the remote server (old provider)
The (new server) was provisioned and 100% under our control.
This *should* work for just about any zimbra version, from one server to another (between seperate LDAP's)
none of this is necessary if you can do a NE backup and restore.. but if you are (say) moving from a dedicated Zimbra server in someone's office, to a NE cluster (with other domains on it) you couldn't do that, or if you are moving a domain from a cluster with others, to a dedicated server... these scripts might help (although, if you control both LDAP servers 100%, you may be able to use other scripts to also export and import the user passwords through raw ldap, to reduce customer impact)

I also posted this on http://wiki.zimbra.com/wiki/ZCS_to_ZCS_With-Different-LDAP-Servers_Migration_Example for others, archived here for personal record

Read More »

I generally like to keep the current months web logs around for convenience, and I’m not the kind of IT guy who likes to delete log files.. no waste disk space.. so I use this script to accomplish the goal.  Yes, this could be better written, but for now, it serves my goals of archiving my weblogs to individual .zip files (I hate super huge zip files, as it can be tedious to extract a single file).

I set the variables at the top, then configure this as a scheduled task to run monthly.  Voila, all log files from previous months get automatically archived to individual zip files for me.  Lots of disk space savings (Especially on large log files)

Option Explicit     Const ForWriting = 2 'on error resume next Dim objFSO, objTxt, intMonth, intYear, filenam, objNewZipFolder, THISintMonth Dim objApp, myFolder, objItem, objItem2, myZipFile, found, logprefix

'************************** CHANGE THESE VARIABLES ******************************** logprefix = "ex" myFolder = "D:\inetpub\website\W3SVC1002222222"...

Read More »

I take no (ok, very little) credit for this script.. It is a combination of a number of scripts I merged together, and tested, to archive a Linux based SVN server.  I use this script to create the backups, and after it runs, it has a “post” script which I have spawning a ncftpput script to ftp it to another internal server.  You could have the post script ssh/sftp it somewhere, or just copy it to a nfs share, whatever you want.

 

Here’s the bash script I run:

#!/bin/bash

# Backup directory location e.g /backups BACKUPDIR="/backup" DATEST=`date +%Y-%m-%d_%Hh%Mm`

# Mail setup # What would you like to be mailed to you? # - log   : send only log file # - files : send log file and sql files as attachments (see docs) # - stdout : will simply output the log to the screen if run manually. # - quiet : Only send logs if an error occurs to the MAILADDR. MAILCONTENT="log" #MAILCONTENT="stdout"

# Set the maximum allowed email size in k. (4000 =...

Read More »

NOTE: THIS THIS SHOULD ONLY BE USED AS A LAST RESORT TO FREE SPACE IN AN EMERGENCY (such as when you have a server drive with 1Mb free, and have to free space to prevent the databases from causing errors)

USE AT YOUR OWN RISK

exec sp_MSforEachDb 'print "[?]"; USE [?];ALTER DATABASE [?] SET RECOVERY SIMPLE WITH NO_WAIT;'
exec sp_MSforEachDb 'print "[?]"; USE [?]; DBCC SHRINKFILE ("?_log" , 1);'
exec sp_MSforEachDb 'print "[?]"; USE [?];ALTER DATABASE [?] SET RECOVERY FULL WITH NO_WAIT;'

 

To export the mailbox for user@acme.com as a zip file use this command:

/opt/zimbra/bin/zmmailbox -z -m user@acme.com getRestURL \
'//?fmt=zip&query=is:anywhere' > user_at_acme_com.zip

Read More »

This was a booger, as the install kept bombing, even thought it said I needed latest SP.

This was the FIX: http://support.microsoft.com/kb/969985 

Took me a few to figure that out, and find this KB article !

Install piece of cake after that.

Archived from http://sqlserverbuilds.blogspot.com/   What version of SQL Server do I have?

This unofficial build chart lists all of the known KB articles, hotfixes and other builds of MS SQL Server 2008, 2005, 2000 and 7.0 that have been released.

Useful articles:

321185 How to identify your SQL Server version and edition913089 How to obtain the latest service pack for SQL Server 2005Microsoft SQL Server HomeMicrosoft SQL Server Developer CenterMicrosoft TechNet: Microsoft SQL Server TechCenterMicrosoft Knowledge BaseSqlservr.exe versions...

Read More »

These errors for me were occurring when trying to change the “log on as” user for SQL Server via SQL Server Configuration Manager

image WMI Provider Error [call to WMI Provider returned error code 0x8007481d]

To work around this problem, add the user account to the SQLServerMSSQLUser$ComputerName$InstanceName group. To do this, follow these steps:

Click Start, point to Administrative Tools, and then click Active Directory Users and Computers. In the Active Directory Users and Computers snap-in, click Users.  (or in the local groups in computer manager) ...

Read More »

To add environment variable overrides, so IIS doesn’t read the system environment variables, but rather reads it from a reg key Do the following (from a dos prompt, or manually but the key in)

REG.EXE add "HKLM\SYSTEM\CurrentControlSet\Services\IISADMIN\Parameters\Environment" /v TMP /t REG_SZ /d "C:\windows\temp" /f

REG.EXE add "HKLM\SYSTEM\CurrentControlSet\Services\IISADMIN\Parameters\Environment" /v TEMP /t REG_SZ /d "C:\windows\temp" /f

Then do an ‘iisreset’ / restart IIS to force IIS to re-read the variables and activate it.

VOILA !

I found this when troubleshooting a Microsoft Jet DB error.  Jet uses environment variables for “TEMP” which in recent SP’s for Windows 2003 get set to ‘%CURRENTUSER%\Application Data\Temp” which doesn’t exist for “Network Services” or whatever the IIS app pool is running as, so the easy override is to force it back to c:\windows\temp. Note: Sometimes, the temp variables get reset when adding new applications/sites to IIS, or when doing...

Read More »

READ COMPLETELY BEFORE YOU DO ANYTHING

 

Here was the error I received when running a maintenance plan

Request to run job XYZ (>) refused because the job has been suspended.

I checked in the ~/MSSQL/Logs/SQLAGENT.OUT And I get: Subsystem 'SSIS' could not be loaded (reason: Access is denied) AHA, now to troubleshoot that

I opened up procmon, and started a watch excluding Operations containing Reg, and only including path containing my MSSQL folders…Set autoscroll, and restarted SQL Agent… I found: ~ MSSQL\MSSQL10.MSSQLSERVER\MSSQL\Binn\SQLDTSSS.DLL  QueryOpen SUCCESS Odd, that meant it’s not an NT permission error (to me) But I still got “Subsystem 'SSIS' could not be loaded (reason: Access is denied)” in the SQLAGENT.LOG folder humm… Reading more in the procmon output.. I find a “FILE LOCKED WITH ONLY READERS” on MSSQL\MSSQL10.MSSQLSERVER\MSSQL\Binn\SQLDTSSS.DLL Maybe this is it???  Google finds nothing (Great) and to humor myself, neither does...

Read More »

Shell commands are used when you want to access relatively inaccessible locations in Windows. They can also be used to create desktop shortcuts.

Windows 7 has a few new shell commands.

Some of the useful ones are:

shell:CommonRingtones
shell:Device Metadata Store
shell:DocumentsLibrary
shell:ImplicitAppShortcuts
shell:Libraries
shell:MusicLibrary
shell:OtherUsersFolder
shell:PublicSuggestedLocations
shell:User Pinned
shell:PicturesLibrary
shell:Ringtones
shell:UsersLibrariesFolder
shell:VideosLibrary

Source: TheWindowsClub

Ever wanted a way to get to rather useful shortcuts, without having to go through a very awkward way to access them?

Try making a shortcut on your desktop (or wherever) give it a good looking icon, to the following commands.. or just run them from the run command.

Enjoy!

(found these online, and absolutely needed to archive them here)

Add/Remove Programs RunDll32.exe shell32.dll,Control_RunDLL appwiz.cpl,,0

Content Advisor RunDll32.exe msrating.dll,RatingSetupUI

Control Panel RunDll32.exe shell32.dll,Control_RunDLL

Delete Temporary Internet Files: RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 8

Delete Cookies: RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 2

Delete History: RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 1

Delete Form Data: RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 16

Delete Passwords: RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 32

Delete All: RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess...

Read More »

Fixing the IE 8 warning - ‘Do you want to view only the webpage content that was delivered securely?’ In IE 7 and ealier, this dialog would cause annoyance to users but generally didn’t cause any other significant problems. This was because it was worded in such a way that most users would click on the Yes button and allow non-secure content to be downloaded.

However, the wording in the IE 8 version of this dialog has changed:IE8 Security Warning

To download the content a user would now have to click on the No button. As we know, most people using the web only scan text and avoid reading it if at all possible! They will usually go for the Yes button if there is not an OK button

Some sites are going to find that their secure pages in IE 8 have the following problems:

Any non-secure HTTP image beacons used for analytics...

Read More »

This blog post is just a test on using Windows live Writer on my workstation.

Kewl

Hopefully this means I will be posted more blogs now, it’s soooo frickin easy.

04-03-06hellocoffee_eyesthatslay (Even easy upload of pics) I love it!

I got the how-to on using LiveWriter on my site: This link at DNNprofessor. (Thanks)

I was having problems purging my data using

exec sp_delete_backuphistory @oldest_date='1/1/2010'

in my msdb database, so I instead ran the following code to purge the data successfully

Read More »

Just run on source, then run the output on destination.  Voila!

Read More »

  1. Click Start, and then type cmd in the Start Search box.
  2. In the search results list, right-click Command Prompt, and then click Run as Administrator.
  3. When you are prompted by User Account Control, click Continue.
  4. At the command prompt, type powercfg.exe /hibernate off, and then press ENTER.
  5. Type exit, and then press ENTER.

Read More »

Be able to Right Click on any directory, and make a "filelist.txt" file for that directory.  So simple, I do not know why this hasn't always been around!

Get a directory listing of all files in a directory and automatically output it to a txt file.

Read More »

Quick down and Dirty script to clone hard Drives in the free version of ESXi (assuming you have ssh access)

Read More »

Just a snippit I needed to run to resolve an issue - it is a dos script that re-takes ownership of a roaming profile, then re-sets up the user security, so it still runs

BE CAREFUL

Read More »

A bunch of notes I found online about terminal services roaming profiles

(targeted at a 2008 TS, at least that is what the article is referencing)

Read More »

Is This Possible?  NO, but you CAN ACCOMPLISH THE GOAL YOU WANT ANYWAY...Sorta, but it works !!!!

Getting queries to use multiple clustered indexes.

Read More »

Determine the MTU Size Limits of the full path of an internet route

Read More »

Can't figure out how to Activate Windows 2008 Server - If you installed from a Volume License CD, it never prompted you for the license key, so it will not activate.  Here is how to change the Product Key & then Activate the server.. easy!
(I've also included a number of other common activation stages you can "jump" to - and a shortcut on how to activate a windows 2008 core installation)

Read More »

how to use gdb to debug something in asterisk (I used this to help the chan_sccp_b developers to find a bug in the module unloading/loading process

Read More »


It's Suprising how much you can get done. - If you don't care who gets the credit.
-Harold Warp

Inspired by Nina