Posts

Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

Image
if any installed application does not run after upgrading operating system with followings Windows Vista,Windows 7 , Windows 2008 Server Family and gives an error such as "Attempted to read or write protected memory. This is often an indication that other memory is corrupt." The porblem mostly about memory permission. You can try this;(based upon Windows 2008 Server,if you use different once, some step may be changed) 1-Right Click to "Computer " 2-Select "Properties" 3-Click "Advanced System Settings" on the left panel of newly opened window. 4-Select "Settings" on the first Group Box,name is "Performance",in the Advanced tab 5- Select "Data Execution Prevention" tab 6-Turn off DEP for you application or Turn off for all application except Windows Programs and Services. 7-You have to restart the server. Here is the screen shut : cheers, P.S:Please do not hesitate to share your comments.

Windows Management Instrument Tester

Just run 'wbemtest' from Command Prompt. You can connect kind of domains to intearct with WMI. Ex: The majority of the WMI classes for management are in the root\cimv2 namespace you can run "Select * from Win32_OperatingSystem"statement over WMI with WQL type under the Query button.The result will be information about the operating system, such as version, whether it is activated, or which hotfixes are installed. good lucks, P.S:Please do not hesitate to share your comments.

search text in Stored Procedures

Do you want to find any text in Stored Procedures in SQL Server Database ? "select * from INFORMATION_SCHEMA.ROUTINES" returns Procedure,Function exist in specific database. You will see objects and details in columns. P.S:Please do not hesitate to share your comments.

Notes about Merge Replication

some usefull stored procedures you may use during merge replication; * - EXEC sp_adjustpublisheridentityrange @publication='Publication_Name' //adjust identity range,if you get any error related with identity renge , you can reset identity offset managed by agent * - EXEC sp_helpmergearticle @publication='Publication_Name' //retrieve article(s) information in given Publication_Name * - EXEC sp_changemergearticle @publication='Publication_Name', @article = 'Article_Name' , @Property = 'identityrangemanagementoption', //What would you like to do.ie disable identity management by agent @Value = 'Manual', @force_invalidate_snapshot = 0 //change article property ( http://msdn.microsoft.com/en-us/library/ms174386.aspx )
ERROR MESSAGE : The Publisher failed to allocate a new set of identity ranges for the subscription. This can occur when a Publisher or a republishing Subscriber has run out of identity ranges to allocate to its own Subscribers or when an identity column data type does not support an additional identity range allocation. If a republishing Subscriber has run out of identity ranges, synchronize the republishing Subscriber to obtain more identity ranges before restarting the synchronization. If a Publisher runs out of identit (Source: MSSQL_REPL, Error number: MSSQL_REPL-2147199417) EXECUTE : sp_adjustpublisheridentityrange @publication='PUBLISHED_DATABASE_NAME' (ref : http://msdn.microsoft.com/en-us/library/ms181527.aspx )

set Not For Replication True via Stored Procedure

Some administrator may not prefer to use SQL Server Management Studio for the strictions such as timeout or following Foreign Key exists; To set or UnSet "Not for Replication" property of any column you want to use in Replication; DECLARE @ObjectID INT = OBJECT_ID('dbo.tFileProvider') //get Object Id exec sys.sp_identitycolumnforreplication @object_id = 246291937, @value = 1 //0 : No ; 1 : yes

How to copy last updated file into other location by command batch

this scripts copy lastlly updated file from given path into target path.It looks only selected directory it does not look for sub-directory. just create xxx.bat and call with 2 parameters usage : xxx.bat source_path target_path ex: command.bat d:\sil\from d:\sil\to ::Copy Files Made Or Modified Today @echo off set y=0 set source=%1 set dest=%2 pushd "%source%" for /f %%a in ('dir /b /a-d /o-d') do call :PROCESS "%%a" popd goto :eof :PROCESS if %y%==0 copy %1 "%dest%" if %y%==0 set y=1