--THIS DEMO SHOWCASES THE PASSWORD POLICY FEATURE

--Try to create a login with a simple password
--It fails because the password policy is 
--enforced by default
use master
CREATE LOGIN SIMPLEPWD WITH PASSWORD = 'SIMPLEPWD'
go
--CREATE LOGIN SIMPLEPWD WITH PASSWORD = 'FOO'
--go

--Now try a couple with good password
CREATE LOGIN GOODPWD WITH PASSWORD = 'GpGmT1)'
CREATE LOGIN GOODPWD2 WITH PASSWORD = 'A!234BCD'


--There is a way to bypass the policy requirements 
--On create
CREATE LOGIN SIMPLEPWD 
WITH PASSWORD = 'SIMPLEPWD', CHECK_POLICY = OFF

--Turning off expiration checks while retaining
--complexity checks
ALTER LOGIN GOODPWD WITH CHECK_EXPIRATION = OFF

--check these values in the catalog
--notice the default secure values
select * from sys.sql_logins