Friday, November 13, 2009
NetApp Perfstat tool Usage
Usage of perfstat is;
perfstat -f IPAddressofNetAPP -t 10 -i 12 > perfstat.out
10 : Get statistics for every 10 minutes;
12 : Number of sample
perfstat.out : Name of the file that log will be saved into.
Read more...
Monday, August 24, 2009
Reindex SQL Server Database
Execute the command below(Write your db name instead of mydatabasename)
DECLARE @Database VARCHAR(255)
DECLARE @Table VARCHAR(255)
DECLARE @cmd NVARCHAR(500)
DECLARE @fillfactor INT
SET @fillfactor = 90
DECLARE DatabaseCursor CURSOR FOR
SELECT name FROM master.dbo.sysdatabases
WHERE name NOT IN ('master','model','msdb','tempdb','distrbution')
ORDER BY 1
OPEN DatabaseCursor
FETCH NEXT FROM DatabaseCursor INTO @Database
WHILE @@FETCH_STATUS = 0
BEGIN
SET @cmd = 'DECLARE TableCursor CURSOR FOR SELECT table_catalog + ''.'' + table_schema + ''.'' + table_name as tableName
FROM ' + @Database + '.INFORMATION_SCHEMA.TABLES WHERE table_type = ''BASE TABLE'''
-- create table cursor
EXEC (@cmd)
OPEN TableCursor
FETCH NEXT FROM TableCursor INTO @Table
WHILE @@FETCH_STATUS = 0
BEGIN
-- SQL 2000 command
--DBCC DBREINDEX(@Table,' ',@fillfactor)
-- SQL 2005 command
SET @cmd = 'ALTER INDEX ALL ON ' + @Table + ' REBUILD WITH (FILLFACTOR = ' + CONVERT(VARCHAR(3),@fillfactor) + ')'
EXEC (@cmd)
FETCH NEXT FROM TableCursor INTO @Table
END
CLOSE TableCursor
DEALLOCATE TableCursor
FETCH NEXT FROM DatabaseCursor INTO @Database
END
CLOSE DatabaseCursor
DEALLOCATE DatabaseCursor
Read more...
Hide SQL Server Database(s)
To show SQL databases to only authorized users follow the steps below;
Open New Query;
Execute the command below to remove "view all database(s) right" from public role;
USE master
GO
DENY VIEW any DATABASE TO public
Thsn Execute command below to append users to view and own database
USE database_name
GO
EXEC sp_changedbowner username
Read more...
Thursday, May 28, 2009
Event ID: 17896
Event Source: MSSQLSERVER
Event Category: (2)
Event ID: 17896
Description:
The time stamp counter of CPU on scheduler id 2 is not synchronized with other CPUs.
Check the Links Below;
http://blogs.msdn.com/psssql/archive/2006/11/27/sql-server-2005-sp2-will-introduce-new-messages-to-the-error-log-related-to-timing-activities.aspx
http://support.microsoft.com/default.aspx?scid=kb;en-us;931279
CPU number | Statements to enable processor affinity |
---|---|
02 CPUs | exec sp_configure 'affinity mask', 0x00000003 GO reconfigure GO |
04 CPUs | exec sp_configure 'affinity mask', 0x0000000F GO reconfigure GO |
08 CPUs | exec sp_configure 'affinity mask', 0x000000FF GO reconfigure GO |
16 CPUs | exec sp_configure 'affinity mask', 0x0000FFFF GO reconfigure GO |
32 CPUs | exec sp_configure 'affinity mask', 0xFFFFFFFF GO reconfigure GO |
Read more...
Wednesday, May 27, 2009
Get Missing indexes on your Database(s)
SELECT DB_NAME(database_id) AS [DATABASE],
Equality_Columns, Inequality_Columns,
Included_Columns, STATEMENT
FROM sys.dm_db_missing_index_details
ORDER BY 1
where DATABASE is your DB Name where missing index(es) found.
equality_columns index is required on these columns
inequality_columns is list of columns that are used for inequality comparison and index is required on these.
included_columns is list of columns that are used in query for other than comparison and covering index on these is suggested.
Statement is name of table along with column where index is missing
Read more...
SQL Server 2005 recovery Models
The recovery model of database determines the type of database transactions are logged and the degree of concern that provided to data loss in case of any failure.
Full Recovery Model of SQL Server 2005
The full recovery model does the most extensive logging and allows the database to be recovered to the point of failure. Full recovery model presents the highest protection against data loss. You should always configure all production databases to use full recovery.
Bulk-logged Recovery Model of SQL Server 2005
The bulk-logged recovery model fully logs transactions but mostly bulk operations, such as bulk loads, Select statements. Bulk-logged recovery model allows the database to be recovered to the end of a transaction log backup only when the log backup contains bulk changes. Recovery to the point of failure is not supported.
Simple Recovery Model of SQL Server 2005
Simple recovery model logs most transactions, logging only the information required to ensure database consistency after a system crash or after restoring a database backup. With simple recovery model the database can be recovered only to the most recent backup. This recovery model has the should not be used where data loss in the event of a crash cannot be tolerated.
Read more...
View SQL Server Error log's detail by SQL Commands
exec sp_enumerrorlogs
Then execute ;
exec sp_readerrorlog archivenumber
Read more...
Wednesday, May 20, 2009
SQL Server System Statistical Functions
Number of millionths of a second in a timer tick.
@@CONNECTIONS
The number of connections or attempted connections.
@@CPU_BUSY
Timer ticks that the CPU has been working for SQL Server.
@@IDLE
Time in timer ticks that SQL Server has been idle.
@@IO_BUSY
Timer ticks that SQL Server has spent performing I/O operations.
@@PACKET_ERRORS
Number of network packet errors that have occurred.
@@PACK_RECEIVED
Number of packets read from the network.
@@PACK_SENT
Number of packets written to the network.
@@TOTAL_ERRORS
Number of read/write errors during I/O operations.
@@TOTAL_READ
Number of disk reads.
@@TOTAL_WRITE
Number of disk writes.
Usage:
Example : (Get SQL Server I/O)
Read more...
Tuesday, May 12, 2009
Check if index(es) used in your Query.
Read more...
Monday, May 11, 2009
Check if Trace is running on your SQL Server
SELECT * FROM fn_trace_getinfo(default);
GO
Read more...
Saturday, May 9, 2009
HP NC373i Disappears after Installing HP PSP Version 8.x
To resolve this issue, delete the wdf01000.sys from c:\windows\system32\drivers\ , and then re-run the HP PSP package.
Read more...
Blue Screen Error 0x0000007E (0x00000005, 0x80888D615, 0xF7906C08, 0xF7906904) on HP Servers
Cause : You probably have installed the PSP 7.80 nic drivers (v3.0.5).
Solution : You should rollback your driver to previous version or apply the latest version of your Nic drivers.
I have applied the CP008415.exe pack from PSP 8.00 and the problem has gone away now.
If your are trying Nic drivers coming with PSP 8.20 , you could experience the problem;
Notice: (Revision) HP NC-Series Broadcom 1GbE Multifunction Driver for Windows Server - First Update to Version 4.6.16.0 To Avoid Message "HP Virtual Bus Device Installation Requires a Newer Version. Version 4.6.16.0 is Required."
Check the Link Below;
http://h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp?objectID=c01684544&dimid=1002159936&dicid=alr_apr09&jumpid=em_alerts/us/apr09/all/xbu/emailsubid/mrm/mcc/loc/rbu_category/alerts
Read more...
Thursday, May 7, 2009
SQL Server Detailed Memory Usage Information.
Check http://support.microsoft.com/kb/907877 for meanings
Read more...
Wednesday, May 6, 2009
Enable Network Connection for MSDE
Read more...
Monday, May 4, 2009
View MAC Address(es) and IP Address of devices connected to Cisco Router
Read more...
CPU(s) operating at reduced performance level due to a low power cap
Read more...
Message Tracking in Exchange 2007
You can get message tracking system settings by using Get-TransportServer for Edge and Hub transport roles and the Get-MailboxServer for Mailbox server roles.
You can modify the message tracking settings by using the Set-TransportServer and Set-MailboxServer
Using these commands above you can ;
Enable or disable message tracking system (Enabled by default)
Enable or disable logging of message subject lines (Enabled by default)
Set the maximum size of log files (10MB by default)
Set the maximum size of the log file directory (250MB by default)
Change the path of the log file (‘C:\Program Files\Microsoft\Exchange Server\TransportRoles\Logs\MessageTracking’ by default)
Set the maximum age of message tracking log files (30 days by default)
Example Command
Set Maximum Directory size 1 GB maximum log file age 40 days
C:\>[PS] C:\Users\Administrator\Desktop>Set-TransportServer SV2008 -MessageTrackingLogMaxDirectorySize 1GB -MessageTrackingLogMaxAge 40.00:00:00[PS]
Searching Message Tracking Logs
Message sent from ittips@tricks.com to test@exchange2007.net between dates releated. (First 50 Result)
[PS] C:\>Get-MessageTrackingLog -Server SV2008 -EventID SEND -Sender ittips@tricks.com -Recipients test@exchange2007.net -Start 1/1/2009 -End 2/4/2009 –ResultSize 50
Search By Subject
$hubs Get-MessageTrackingLog -MessageSubject "Production" -Start "1/01/2009 00:00:00" -End "1/04/2009 23:59:59
Read more...
The properties on 'user name' have invalid data Error on Exchange 2007
1)Remove the users from within Exchange Server and Reboot Server,
2)Add users again and assigen them to the primary mail database
or check!
http://support.microsoft.com/kb/951710
Read more...
Saturday, May 2, 2009
Terminal Services Black Screen RDP Session
Cause to this situation can be MTU settings.
Try the following Steps Below.
1. Start > Run > Regedit
2. Navigate to HKLM \ System \ Current Control Set \ Services \ TCPIP\ Parameters
3. In the right hand pane, Right Click > New > DWORD
4. Call it EnablePMTUBHDetect set its hex value to 1
5. Reboot
Read more...
Expired Credentials. Windows needs your current credentials to ensure network connectivity.
Follow these steps below,
1) Check if your computer system time is matched +/- 5 minutes to your DC's time.
2)Try Use "net use * /d" command to delete all mapping drives. Then use "net use \\servername password /u:domainname\username" to cache the credentials. Relogon
3)Check the link
http://searchwindowsserver.techtarget.com/tip/0,289483,sid68_gci1022111,00.html
Read more...
Wednesday, April 29, 2009
Deleted Files are shown while performing search on Windows Vista
Read more...
Tuesday, April 28, 2009
Disable Cisco Password Recovery
Use the “no service password-recovery” command
When you do this carefully read the warning message.
Router(config)#no service password-recovery
WARNING:
Executing this command will disable password recovery mechanism.
Do not execute this command without another plan for
password recovery.
Are you sure you want to continue? [yes/no]: yes
Router(config)#
Read more...
Block Dictionary Attack on Cisco
By using this command we can block for ‘x’ seconds after failed ‘y’ logins are tried within ‘z’ seconds.
The following example shows how block login access for 100 seconds after 4 failed login attempts within 20 seconds:
login block-for 100 attempts 4 within 20
During this block period all types of login attempts( Telnet, SSH, and HTTP) are denied.
But it is possible to exclude IP address for this blocking.
Ex: Exclude 192.168.1.0 Network (C Class)
login quiet-mode access-class 10
access-list 101 permit ip 192.168.1.0 0.0.0.255 any
Read more...
View Possible Bad indexes on SQL Database
SELECT object_name(s.object_id) AS 'Table', i.name AS 'Index ', i.index_id,
user_updates AS 'Total Number of Writes', user_seeks + user_scans + user_lookups AS 'Total Number of Reads',
user_updates - (user_seeks + user_scans + user_lookups) AS 'Difference'
FROM sys.dm_db_index_usage_stats AS s WITH (NOLOCK)
INNER JOIN sys.indexes AS i WITH (NOLOCK)
ON s.object_id = i.object_id
AND i.index_id = s.index_id
WHERE objectproperty(s.object_id,'IsUserTable') = 1
AND s.database_id = db_id()
AND user_updates > (user_seeks + user_scans + user_lookups)
AND i.index_id > 1
ORDER BY 'Difference' DESC, 'Total Number of Writes' DESC, 'Total Number of Reads' ASC;
Read more...
View SQL Server Hardware Information by SQL Commands
SELECT cpu_count AS 'Logical CPU Count', hyperthread_ratio AS 'Hyperthread Ratio',
cpu_count/hyperthread_ratio As 'Physical CPU Count',
physical_memory_in_bytes/1048576 AS 'Physical Memory (MB)'
FROM sys.dm_os_sys_info;
Read more...
Monday, April 27, 2009
Hide Users from Global Address List on Exchange 2007
Read more...
Enable HTTPS-HTTP Bridging on the TS Gateway
Read more...
Friday, April 24, 2009
View SQL Server Database Columns Collations that different from Database
SELECT TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME, COLLATION_NAME FROM information_schema.columnsWHERE COLLATION_NAME IN (SELECT DISTINCT COLLATION_NAME FROM INFORMATION_SCHEMA.COLUMNSEXCEPT(SELECT DATABASEPROPERTYEX('sds', 'Collation')UNION ALLSELECT NULL))
Read more...
Wednesday, April 22, 2009
Get Creation Time for SQL Database
select @@servername + ' '+ convert(varchar(20),crdate,111) + ' '+ [Name] from sys.sysdatabases order by crdate desc
Read more...
Get Last Modified Date for SQL Server Objects
SELECT name
FROM sys.objects
WHERE DATEDIFF(D,modify_date, GETDATE()) <>
Read more...
Monday, April 20, 2009
Block Conficker Script ISA 2004 & ISA 2006
Block_Conficker_Script
Execute on the server that ISA server installed by double clicking the file.
New HTTP signatures will be automaticly created.
Read more...
Friday, April 17, 2009
Disable Autorun via Group Policy
Open Group Policy Object Editor , and edit releated Domain Policy.
Locate Computer Policy\Computer Configuration\Administrative Templates\System in the left pane then find "Turn Off Autoplay" in the right pane.
Double click and set feature to enable set Turn of Autoplay to : All Drives
Disable Autorun in Vista;
Open : Gpedit.msc
Locate the following policy;
Local Computer Policy\Computer Configuration\Administrative Templates\Windows Components\AutoPlay Policies
Read more...
Thursday, April 16, 2009
SQL 2005 Processes Detailed Status Query
How many process are working? , How many are sleeping..., and the total number of processes.
SELECT COUNT(*) AS ProcessStatusCount,CASE Status
WHEN 'Running' THEN 'Number of Process Currently Running One or More Requests '
WHEN 'Sleeping ' THEN 'Number of Process Currently Sleeping'
ELSE 'Dormant – Session resets
END Status
FROM sys.dm_exec_sessions GROUP BY Status
Read more...
Exchange 2007 Mailbox Size
Get-MailboxStatistics -database “Mailbox Database” Select DisplayName, TotalItemSize Format-Table
Read more...
Wednesday, April 15, 2009
W32Time Error Event ID:48
List of time servers is available at ;
http://support.microsoft.com/kb/262680
After choosing time server follow the steps below;
net stop w32time
w32tm /unregister
w32tm /register
net time /setsntp:TimeServerIPNumber
net start w32time
If you want to use a FQDN instead of the IP address as time server, add ",0x1" at the end of the net time command
net time /setsntp:time-a.nist.gov,0x1
Read more...
Block or Allow Google Earth Through Firewall
http://maps.google.com/
http://auth.keyhole.com/
http://kh.google.com/
Read more...
View SQL 2005 Database Logical File Name
First Columns indicates the logical name of database file(s).
Read more...
Friday, April 10, 2009
Check if Group Policy Applied on Domain Group
GPRESULT command.
Start -> Run -> (Execute the Commands Below) .
GPRESULT
GPRESULT /USER targetusername /V
GPRESULT /S system /USER targetusername /SCOPE COMPUTER /Z
GPRESULT /S system /U username /P password /SCOPE USER /V
Read more...
Check If Group Policy Applied on Client
Execute Start -> Run -> rsop.msc
After policy is processed;
Check if your Group Policy is applied on Client successfully.
Read more...
Thursday, April 9, 2009
Disconnect all users from SQL Database
DECLARE @User VARCHAR(8000)
SELECT @user=COALESCE(@user,'')+'Kill '+CAST(spid AS VARCHAR(10))+ '; '
FROM sys.sysprocesses WHERE DBID=DB_ID('EF_GR') EXEC(@user)
//EF_GR is a name of database
Read more...
Wednesday, April 8, 2009
Exchange 2007 Check User Storage Limits
Read more...
Exchange 2007 "Send As" Feature
Open Exchange Management Shell.
Execute the following command.
Add-ADPermission "Mailbox" –User "Domain\User" –Extendedrights SendAs
Example:
This command grant test2 user to send as permission for egemen mailbox
Read more...
Tuesday, April 7, 2009
Remove, Disable, Enable etc .. Devices by Command Prompt (Devcon.exe)
Download And Extract it to any Folder.
Enter to the folder by using command prompt.
Example (Com port remove and rescan)
devcon remove @ACPI\PNP0501\*
devcon rescan
Example (Listing all classes)
devcon classes
Example (Listing all usb devices Hardware IDs)
devcon /hwids *usb*
Read more...
If you get [::1] while ping to localhost
::1 is a short way of writing 0000:0000:0000:0000:0000:0000:0000:0001
Disable IPv6 from network connections properties , if you don't use.
Read more...
Modify Group Policy Refresh Interval
We can modify these refresh intervals by following the steps below.
Open the relevant Group Policy Object (GPO). Then click Edit.Expand Computer Configuration, Administrative Templates, System, Group Policy.
For Computers
Find "Group Policy refresh interval for computers," then select Enabled. Enter the new refresh rate and the maximum random time to wait for the refresh (to prevent all machines getting GPO updates at the same time), click OK.
For DCs
If required, open Group Policy refresh interval for domain controllers," then select Enabled. Enter the new refresh rate, this refresh rate must be significantly less than average computer policy refresh rate, and the maximum random time to wait for the refresh (to avoid all machines updating at the same time), click OK.
For Users
Expand User Configuration, Administrative Templates, System, Group Policy.
Double-click "Group Policy refresh interval for users."
Select Enabled, set the values, then click OK.
Close the Group Policy Editor (GPE).
Read more...
Monday, April 6, 2009
Block Skype using Group Policy
Read more...
Block Skype on ISA 2006 & ISA 2004
http://www1.cs.columbia.edu/~library/TR-repository/reports/reports-2004/cucs-039-04.pdf
By preventing all protocols access to 80.160.91.11 (Skype Auth Server), you can Block Skype.
Read more...
View MAC Addresses of devices connected to HP Procurve Switch
Read more...
Remove APEX SQL Log tables from database
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
Read more...
Total Used Cache SQL Server 2005
Read more...
Exchange 2007 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
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...
Exchange Server 2007 Limit Mailbox Sizes
Chose Limits TAB from the window and enter the limits for users mailbox.
Read more...
Exchange 2007 Mailbox Sizes
Read more...
Search and Delete Files on Windows Domain Structure
strComputer = "."Set objWMIService = GetObject("winmgmts:" _& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")Set colFiles = objWMIService.ExecQuery _("Select * from CIM_DataFile where Extension = 'mp3' OR Extension = 'mp4'")For Each objFile in colFilesobjFile.DeleteNext
Read more...
Friday, April 3, 2009
Windows DHCP Server MAC Filtering
To enable this function you should install "MAC Filter Callout" third party tool to enable this feature.
You can download this tool from the link below.
Download
After downloading. Install it on your DHCP Server. And Restart DHCP Server service from services console. After installation check for registry keys for macfiltercallout.
HKLM\System\ControlSet001\Services\DHCPServer\Parameters\
In the right pane check for registry keys stated in the picture below.
CalloutEnabled (DWORD) value = 1 (Enable) 0(Disable)
CalloutErrorLogFile = Indicating the place of Error Log file
CalloutInfoLogFile = Indicating the place of Information Log file
CalloutMACAddressListFile = Indicating the place of file that will be used for allowing or denying MAC Address
MAC Filtering
Locate and open the MACList.txt file. This file can be used for one purpose at a time.(Allowing or Denying)
For using allowing purpose first line in the file should be like MAC_ACTION={allow} (Devices that have these MAC addresses will be allowed other will be denied to get IP Address from DHCP Server)
For using denying purpose first line in the file should be like MAC_ACTION={deny}
MAC Address should be written in Lowercase.
You should Restart DHCP Server service every time you change MACList.txt
Read more...
Thursday, April 2, 2009
SQL Query that search all column names based on criteria
select * from INFORMATION_SCHEMA.COLUMNS where
"COLUMN_NAME" LIKE '%at%';
Read more...
GFI Mail Essentials Log View
Open the GFI MailEssentials configuration.
Expand ‘Anti-Spam’ and click on the module you want to enable logging for.
Click on ‘Properties’ and select the ‘Other’ tab.
Enable ‘Log occurrence to this file’.
Configure the path to the log file or leave as default.
Read more...
Wednesday, April 1, 2009
SQL Server failed with error code 0xc0000000 to spawn a thread to process a new login or connection.
Add the following registry key and reboot the server. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\SycAttackProtect{DWORD} = 0
SynAttackProtect
Read more...