Wednesday, January 25, 2017

sql server commandline tool sqlcmd (shell)

display simple query with windows authenticartion (current user should have rights):

sqlcmd -S localhost\sqlexpress -d master -q "select * from sys.tables"

S... server
d ... database
q...query (use -Q to terminate / close  sqlcmd after query execution)

u...user
p...pwd

Thursday, January 05, 2017

EF Migrations Start Debugger



            if (System.Diagnostics.Debugger.IsAttached == false)
            {
                System.Diagnostics.Debugger.Launch();
            }