Monday, April 6, 2009

View MAC Addresses of devices connected to HP Procurve Switch

Connect to HP Procurve Switch via Telnet.

Execute show mac-address command.
You will see the connected devices MAC addresses and which port they are connected to.



Read more...

Remove APEX SQL Log tables from database

If you want to remove all tables about APEX SQL Log from database after uninstalling the program.


Execute the code below;


IF EXISTS(SELECT * FROM master.dbo.sysobjects WHERE name = 'xp_ApexSqlLogMonitor_Stop') EXEC master.dbo.xp_ApexSqlLogMonitor_Stop
IF EXISTS(SELECT * FROM master.dbo.sysobjects WHERE name = 'xp_ApexSqlConnectionMonitor_Stop') EXEC master.dbo.xp_ApexSqlConnectionMonitor_Stop
IF EXISTS(SELECT * FROM master.dbo.sysobjects WHERE name = 'xp_ApexSqlLog') EXEC master.dbo.sp_dropextendedproc 'xp_ApexSqlLog'
IF EXISTS(SELECT * FROM master.dbo.sysobjects WHERE name = 'xp_ApexSqlLogApi') EXEC master.dbo.sp_dropextendedproc 'xp_ApexSqlLogApi'
IF EXISTS(SELECT * FROM master.dbo.sysobjects WHERE name = 'xp_InitLogNav') EXEC master.dbo.sp_dropextendedproc 'xp_InitLogNav'
IF EXISTS(SELECT * FROM master.dbo.sysobjects WHERE name = 'xp_UnInitLogNav') EXEC master.dbo.sp_dropextendedproc 'xp_UnInitLogNav'
IF EXISTS(SELECT * FROM master.dbo.sysobjects WHERE name = 'xp_ApexSqlLogMonitor') EXEC master.dbo.sp_dropextendedproc 'xp_ApexSqlLogMonitor'
IF EXISTS(SELECT * FROM master.dbo.sysobjects WHERE name = 'xp_ApexSqlLogMonitor_Stop') EXEC master.dbo.sp_dropextendedproc 'xp_ApexSqlLogMonitor_Stop'
IF EXISTS(SELECT * FROM master.dbo.sysobjects WHERE name = 'xp_ApexSqlLogMonitor_Info') EXEC master.dbo.sp_dropextendedproc 'xp_ApexSqlLogMonitor_Info'
IF EXISTS(SELECT * FROM master.dbo.sysobjects WHERE name = 'xp_ApexSqlLogMonitor_Enable') EXEC master.dbo.sp_dropextendedproc 'xp_ApexSqlLogMonitor_Enable'
IF EXISTS(SELECT * FROM master.dbo.sysobjects WHERE name = 'xp_ApexSqlLogMonitor_Disable') EXEC master.dbo.sp_dropextendedproc 'xp_ApexSqlLogMonitor_Disable'
IF EXISTS(SELECT * FROM master.dbo.sysobjects WHERE name = 'xp_ApexSqlConnectionMonitor') EXEC master.dbo.sp_dropextendedproc 'xp_ApexSqlConnectionMonitor'
IF EXISTS(SELECT * FROM master.dbo.sysobjects WHERE name = 'xp_ApexSqlConnectionMonitor_Stop') EXEC master.dbo.sp_dropextendedproc 'xp_ApexSqlConnectionMonitor_Stop'
IF EXISTS(SELECT * FROM master.dbo.sysobjects WHERE name = 'xp_ApexSqlConnectionMonitor_Info') EXEC master.dbo.sp_dropextendedproc 'xp_ApexSqlConnectionMonitor_Info'
IF EXISTS(SELECT * FROM master.dbo.sysobjects WHERE name = 'xp_ApexSqlConnectionMonitor_Enable') EXEC master.dbo.sp_dropextendedproc 'xp_ApexSqlConnectionMonitor_Enable'
IF EXISTS(SELECT * FROM master.dbo.sysobjects WHERE name = 'xp_ApexSqlConnectionMonitor_Disable') EXEC master.dbo.sp_dropextendedproc 'xp_ApexSqlConnectionMonitor_Disable'
IF EXISTS(SELECT * FROM master.dbo.sysobjects WHERE name = 'xp_EnableLiveLog') EXEC master.dbo.sp_dropextendedproc 'xp_EnableLiveLog'
IF EXISTS(SELECT * FROM master.dbo.sysobjects WHERE name = 'xp_DisableLiveLog') EXEC master.dbo.sp_dropextendedproc 'xp_DisableLiveLog'
IF EXISTS(SELECT * FROM master.dbo.sysobjects WHERE name = 'xp_GetLiveLogStatus') EXEC master.dbo.sp_dropextendedproc 'xp_GetLiveLogStatus'
IF EXISTS(SELECT * FROM master.dbo.sysobjects WHERE name = 'ln_open') EXEC master.dbo.sp_dropextendedproc 'ln_open'
IF EXISTS(SELECT * FROM master.dbo.sysobjects WHERE name = 'ln_is_open') EXEC master.dbo.sp_dropextendedproc 'ln_is_open'
IF EXISTS(SELECT * FROM master.dbo.sysobjects WHERE name = 'ln_is_valid') EXEC master.dbo.sp_dropextendedproc 'ln_is_valid'
IF EXISTS(SELECT * FROM master.dbo.sysobjects WHERE name = 'ln_seekga') EXEC master.dbo.sp_dropextendedproc 'ln_seekga'
IF EXISTS(SELECT * FROM master.dbo.sysobjects WHERE name = 'ln_seekgr') EXEC master.dbo.sp_dropextendedproc 'ln_seekgr'
IF EXISTS(SELECT * FROM master.dbo.sysobjects WHERE name = 'ln_tellg') EXEC master.dbo.sp_dropextendedproc 'ln_tellg'
IF EXISTS(SELECT * FROM master.dbo.sysobjects WHERE name = 'ln_read') EXEC master.dbo.sp_dropextendedproc 'ln_read'
IF EXISTS(SELECT * FROM master.dbo.sysobjects WHERE name = 'ln_close') EXEC master.dbo.sp_dropextendedproc 'ln_close'
IF EXISTS(SELECT * FROM master.dbo.sysobjects WHERE name = 'sp_ApexSqlLogMonitor_Start') EXEC master.dbo.sp_procoption 'sp_ApexSqlLogMonitor_Start', 'startup', 'false'
IF EXISTS(SELECT * FROM master.dbo.sysobjects WHERE name = 'sp_ApexSqlLogMonitor_Start') EXEC master.dbo.sp_executesql N'DROP PROCEDURE sp_ApexSqlLogMonitor_Start'
IF EXISTS(SELECT * FROM master.dbo.sysobjects WHERE name = 'sp_ApexSqlConnectionMonitor_Start') EXEC master.dbo.sp_procoption 'sp_ApexSqlConnectionMonitor_Start', 'startup', 'false'
IF EXISTS(SELECT * FROM master.dbo.sysobjects WHERE name = 'sp_ApexSqlConnectionMonitor_Start') EXEC master.dbo.sp_executesql N'DROP PROCEDURE sp_ApexSqlConnectionMonitor_Start'
DBCC LogNavXp (FREE)
DBCC ApexSqlLogXprocs (FREE)
DBCC ApexSqlServerXprocs (FREE)




Read more...

Update Statistics on SQL 2005 Database

Execute the command Below;

SELECT

sum(cache_plan.size_in_bytes)

FROM sys.dm_exec_cached_plans as cache_plan

outer apply sys.dm_exec_sql_text (cache_plan.plan_handle) as sql_text 

Read more...

Total Used Cache SQL Server 2005

Use the Query below to find total used cache in bytes;

SELECT

sum(cache_plan.size_in_bytes)

FROM sys.dm_exec_cached_plans as cache_plan

outer apply sys.dm_exec_sql_text (cache_plan.plan_handle) as sql_text 

Read more...

Check SQL Database Health Status

Execute ;
DBCC Checkdb

Read more...

Exchange 2007 Local Continuous Replication

You can provide High Availibility to your Exchange 2007 server by using Local Continious future without using another hardwares.


To enable this future open Exchange Management Console. Choose Mailbox Under Server Configuration.

In the right pane in database managment TAB, Right click "First Storage Group" and Choose "Enable Local Continuous Replication".



click NEXT .



Enter path for system and log files .



Cick Next and Enter the path for LCR database.


(Using another physical disk will increase performance of your replication.)

You must use identical name for your LCR database file name.

Click Next. And click Enable on the next screen.
After successful completion . Click finish.



Control creation of new files by comparing two locations.


LatestAvailableLogTime
The time stamp on the source storage group of the most recently detected new transaction log file.
LastCopyNotificationedLogTime
The time associated with the last new log generated by the active storage group and known to the copy.
LastCopiedLogTimeThe time stamp on the source storage group of the last successful copy of a transaction log file.
LastInspectedLogTimeThe time stamp on the target storage group of the last successful inspection of a transaction log file.
SeedingIndicates that seeding is in progress. Possible values are True and False.


Read more...

Enable Anti-Spam updates on Exchange 2007

Open Exchange Management Shell,

Execute the command below;

This command will enable Antispam automatic updates and options in Microsoft Update.

"Enable-AntispamUpdates -Identity SV2008 -IPReputationUpdatesEnabled $True -MicrosoftUpdate RequestNotifyDownload -UpdateMode Automatic -SpamSignatureUpdatesEnabled $True"

Type your Exchange server name to the bold part (SV2008).Do not use quotas.
Read more...
 
span.fullpost {display:none;}