In SQL Server, it’s not a separate datatype (“autoincrement”) – but you can define an
How are you creating your table – visual designer or T-SQL script??
In T-SQL, you would use:
and in the visual table designer, you need to check:
It’s an option for a column of type INT – you can define the seed (starting value) and the increment – typically both are set to 1.
Enable or Disable user account from command line (CMD)
We can do the same by just running a simple command from windows command line.
For example, to disable a user account named John we can run the below command.
Net user John /active:no
To re-enable the account :
Net user John /active:yes
In Windows 7, you need to run the above commands from elevated administrator command prompt(See How to open elevated command prompt in Windows 7 ). You would get the below error when you run them from normal command prompt.
System error 5 has occurred. Access is denied.
Using wmic to disable user account
Below wmic command works for disabling a user account
wmic useraccount where name='john' set disabled=true
For re-enabling user account
wmic useraccount where name='john' set disabled=false
If run from command prompt without elevated admin privileges it would result in the below error.
C:\>wmic useraccount where name='john' set disabled=false Updating property(s) of '\\MYPC\ROOT\CIMV2:Win32_UserAccount.Domain="mypc",Name="guest"' ERROR: Description = Generic failure
Successful account updation would be like below.
C:\>wmic useraccount where name='john' set disabled=false Updating property(s) of '\\MYPC\ROOT\CIMV2:Win32_UserAccount.Domain="MYPC",Name="john"' Property(s) update successful.