Posts

bird's eye view over SQL Server Performance

There is good statement that you can see what is going on Database DBCC SQLPERF('waitstats') it collects wait status group by Wait Type.

get index fragmentation status of SQL Server 2005 database

here is good trick that you can obtain fragmentation status of each table in any selected database SELECT c.name as TableName, b.name as IndexName, avg_fragmentation_in_percent as Fragmentation FROM sys.dm_db_index_physical_stats (DB_ID(), null, NULL, NULL, NULL) AS a JOIN sys.indexes AS b ON a.object_id = b.object_id AND a.index_id = b.index_id, sys.tables as c where c.object_id=a.object_id order by avg_fragmentation_in_percent; Results ; Fragmentation > 5 AND < 30 : Reorganize Index - ALTER INDEX REORGANIZE to do Sp_MSForEachTable @command1 = "PRINT 'ALTER INDEX ALL ON TABLE ? WITH Reorganize'", @command2= "ALTER INDEX ALL ON ? REORGANIZE" for every table on selected database in SQL Server 2005. Fragmentation > 30 Rebuild Index - ALTER INDEX REBUILD to do EXEC Sp_MSForEachTable @command1 = "PRINT 'ALTER INDEX ALL ON TABLE ? REBUILD' ", @command2="ALTER INDEX ALL ON ? REBUILD WITH (FILLFACTOR = 80, ONLINE = OFF,SORT_IN_TEMP

How to add .net based user control to AX 2009

if you would like to add any user control prepared on .net platform into AX 2009 you should follow the steps: 1-Create Active X and wrap the user control with unmanaged code. 2-register to windows as COM object. 3-call it from AX. 1- Here is sample code: //create Class type project in Visual Studio //Set events that will be used in AX //presents to caller [ComVisible(true)] //create interface type of Dispatch [InterfaceType(ComInterfaceType.InterfaceIsIDispatch)] //Create unique key, used by windows //you can create a guid from tools menu on visual studio easily. [Guid("102B961D-60B6-4990-8B29-4802F7F9D293")] public interface IEventInterface { [DispId(1)] //define events that we want to use void ValidateEdit(object sender, ValidateEditEventArgs e); } [ComVisible(true)] //class unique ID [ProgId("DC.ActiveX.C1FlexGrid")] //declera EventInterface class for the class [ComSourceInterfaces(typeof(IEventInterface))] //class type should be AutoDual [ClassInterface(ClassInt

How to call any web page from SQL Enterprise manager as scheduled job

Here is code with VB Script; Dim WshShell Set WshShell =CreateObject("WScript.Shell") Set oExec = WshShell.Exec("C:\\PROGRA~1\\INTERN~1\\iexplore.exe http://localhost/xxxx/app/pages.aspx ") oExec.Terminate() Set WsShell = Nothing Pay attention to terminating iexplore.exe after Job finishes on codes.

Having Trouble While Adding Entry Into EventLog

Open regedit32 (start> cmd> type "regedit") and navigate to: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\EventLog and click on "Security-->Permissions..." in the menu. check security permission for any account on the system (Such as ASPNET vs..) Important Notice : Please be careful while changing anything on Registery.A corruption or Error on file may crash Operating System.

Fetching XML return max 5000 records

One way you can do adding TurnOffFetchThrottling DWORD key into HKLM\Software\Microsoft\MSCRM with Setting value 1. 0 – default and MaxRowsPerPage(others key that CRM concerns) is respected Non-zero – no limit to the number of rows returned. MaxRowsPerPage not respected.

Error code : 80042802. xxxx.dll apperas to be an unsigned assembly which is disabled from executing as spcifed in workflow.config

When you call assemly from Workflow you may get this error. Microsoft CRM 3.0 workflow does not support unsigned assembly.You should specifically determine to Workflow engine to use unsigned assembly. To do this just add allowunsignedassemblies="true" into Workflow.config.xml which is probably in "C:\Program Files\Microsoft CRM\Server\bin\assembly" directory. result will be ;