Home sqlcmd command & paste
Post
Cancel

sqlcmd command & paste

SQLCMD:

sqlcmd -S <server URL> -U <username> -P <password>;

1> select @@version
2> go
1> select db_name();
2> go
1> select host_name();
2> go
1> select loginname from syslogins where sysadmin = 1;
2> go
1> select name from sys.databases;
2> go
1> select name,password_hash from master.sys.sql_logins;
2> go
1> select name, CONVERT(INT, ISNULL(value, value_in_use)) as IsConfigured FROM sys.configurations WHERE name = 'xp_cmdshell';
2> go

Home of the tool

This post is licensed under CC BY 4.0 by the author.