SQL Queries: Capturing changes to DB, Analyzing the changes

Backing up default tables: Select * Into USERS_Backup from USERS (6 row(s) affected) Duplicating Rows: INSERT into [USERS] SELECT * from [USERS] where [USERNAME] = ‘DEMO’ Msg 2601, Level 14, State 1, Line 1 Cannot insert duplicate key row in object ‘dbo.USERS’ with unique index ‘USRRECID’. The duplicate key value is (PQ$&3-#5U1). The statement has been terminated. Modifying existing rows: UPDATE [MYDB].[dbo].[USERS] SET [USERNAME] = ‘DEMO’, [NAME] = ‘DEMO’ WHERE USERNAME = ‘NEWDEMO’ GO Creating new users: SET ansi_warnings OFF INSERT INTO [USERS] VALUES (‘TESTUSR1′,’TESTUSR1′,NULL,NULL,NULL,NULL,NULL,NULL,’0_’,’encryptedpasswordstringhere’,NULL,’TESTUSR1′,’2011-12-16 00:00:00.000′,’13:23′,NULL,”,’new-recid’) Compare two tables having identical layout: SQL Query: SELECT * FROM CONTACT1 WHERE NOT […]

Read more

How to create and manipulate NTFS junction points

You can surpass the 26 drive letter limitation by using NTFS junction points. By… You can surpass the 26 drive letter limitation by using NTFS junction points. By using junction points, you can graft a target folder onto another NTFS folder or "mount" a volume onto an NTFS junction point. Junction points are transparent to programs. Back to the top Preview Tools for NTFS Junction Points Microsoft offers three utilities for creating and manipulating NTFS junction points: Linkd.exe Grafts any target folder onto a Windows 2000 version of NTFS folder Displays the target of an NTFS junction point Deletes NTFS […]

Read more

Managing Folder Redirection using Junctions in Windows

In many cases with x64 bit platforms, administrators requires to redirect a folder location to some another location. This specifically comes in when there is a system wide folder that needs to be customized per user in which case, you require to redirect the default system wide folder location to point to a per user location.   Creating and using and deleting the folder junction using linkd: C:Test>dir Volume in drive C has no label. Volume Serial Number is CC0C-B792 Directory of C:Test 02/03/2012  10:35 AM    <DIR>          . 02/03/2012  10:35 AM    <DIR>          ..                0 File(s)              0 bytes                2 […]

Read more