• Display advanced properties of scheduled tasks in command line

    The following command requests a detailed display of the tasks on the local computer. It uses the /v parameter to request a detailed (verbose) display and the /fo LIST parameter to format the display as a list for easy reading. You can use this command to verify that a task you created has the intended…

    Continue reading

  • A simple batch file which compresses every folder into a 7z Archive

    For backing up old files I tend to sort into lots of different folders, anything I am finished with I put in a 7zip Archive The following batch makes use of a For loop in the batch, uses 7-zip with Ultra Compression and names the archive the same as the folder. for /D %%X in…

    Continue reading

  • Rebuild a V1 DBCapture Database Queue

    We have an issue where on a rare occasion a scan from V1 DBScanner to DBCapture can corrupt the queue and cause DBCapture Admin to state it is unable to open a document rendering the whole application unusable. I have a batch script to perform some maintenance. Over time I have commented out lines which…

    Continue reading

  • Updating a network location in Windows 2012

    I had an issue where a server which was joined to a domain had incorrectly set its network as Public. A TechNet article and TenForum article provided the answer (As it states Windows 10 it also applies to Server 2012) so I have placed credits above the steps I followed. Following a re-occurrence I have…

    Continue reading

  • Filtering in Event Viewer Windows Server 2008 onwards

    The Event Viewer from Server 2008 onwards is XML based. Filters based on XML syntax can be used such as: <QueryList>   <Query Id=”0″ Path=”System”>     <Select Path=”System”>                  *[EventData[Data and (Data='<Search Parameter>’)]]               </Select>   </Query> </QueryList>   <QueryList>   <Query Id=”0″ Path=”Application”>     <Select Path=”Application”>                  *[EventData[Data and (Data='<Search Parameter>’)]]               </Select>   </Query> </QueryList> You…

    Continue reading

  • Method of working out check digit for an SSCC code

    Method of working out check digit for an SSCC shipping code in SQL on a system with Sage Line 500 and Datalinx WHM (Although its easy enough to change, the first “set @SSCC” basically gets the digits, the rest of the code simply calculates the check digit). This proc uses the Datalinx WHM Pallet ID…

    Continue reading

  • Apply ALLOW_SNAPSHOT_ISOLATION and READ_COMMITTED_SNAPSHOT to SQL Server

    We needed to enable ALLOW_SNAPSHOT_ISOLATION and READ_COMMITTED_SNAPSHOT to specific databases on a SQL Server 2008 instance, I found to do this even with users off I was being shown errors stating it must be done in Single User Mode. I decided I wanted to do this as quickly as possible so slapped together some SQL…

    Continue reading

  • Add a user to DatabaseMailUserRole on msdb

    I had a user unable to use a script which generated an email, I found the user didn’t have permission, Microsoft state: To reduce the surface area of SQL Server, Database Mail stored procedures are disabled by default. To send Database Mail, you must be a member of the DatabaseMailUserRole database role in the msdb…

    Continue reading

  • Simple error checking when running batch files from T-SQL in SQL Server

    A while ago we added error trapping to the batch file called by a SQL script, this was to ensure if a program failed the rest of the process would not run: After ensuring the program would return an error level if something went wrong we then I then used the ErrorLevel and an if…

    Continue reading

  • Microsoft Access 2010 loader

    Credits (As what I consider the hard stuff was actually done by other people): TheSmileyCoder for the solid awesome little VBS File, this basically gets around the limitation of not actually getting Access to load another Access Database. At the time I only ever needed one modification (A rarely issue affected two P4 machines with…

    Continue reading