SQL | SQLServer
Today I am trying to understand SQLServer well enough to script installation of new users without having admin access.
Here’s the gist of what is needed to add a new admin user:
Stop all SQL Server related processes.
Kill every possible connecting process.
Start SQL server in single user mode:
sqlservr -f -m -s
Create new user:
sqlcmd -S -E
1> EXEC sp_addlogin ‘user’, ‘password’
1> EXEC sp_addsrvrolemember ‘user’, ‘sysadmin’
This can be run from a script as
sqlcmd -f -m -i/path/to/script
- Ctrl-C SQL Server to stop it.
- Restart SQL Server service.
Just figured out that my blog isn’t viewable on the text based browser I’m using.
For some reason w3m (the browser I’ve been using) doesn’t show the slugs as links to the actual posts.
Looks like it works ok in lynx from the command line (but not lynx in an emacs ansi-term buffer) and in elinks both via command line and in emacs.