
How do I shrink my SQL Server Database? - Stack Overflow
Jan 13, 2009 · Here's another solution: Use the Database Publishing Wizard to export your schema, security and data to sql scripts. You can then take your current DB offline and re …
sql - How do I list all the columns in a table? - Stack Overflow
Oct 16, 2009 · For the various popular database systems, how do you list all the columns in a table?
How to get the list of all database users - Stack Overflow
Sep 18, 2013 · I am going to get the list of all users, including Windows users and 'sa', who have access to a particular database in MS SQL Server. Basically, I would like the list to look like as …
sql - Find stored procedure by name - Stack Overflow
Feb 13, 2015 · Is there any way I can find in SQL Server Management Studio stored procedure by name or by part of the name? (on active database context) Thanks for help
sql server - Script for rebuilding and reindexing the fragmented …
Can anyone provide the script for rebuilding and re-indexing the fragmented index when 'avg_fragmentation_in_percent' exceeds certain limits (better if cursor is not used)?
sql - Search of table names - Stack Overflow
Apr 15, 2021 · Adding on to @ [RichardTheKiwi]'s answer. Whenever I search for a list of tables, in general I want to select from all of them or delete them. Below is a script that generates …
sql - RESTRICTED_USER - Stack Overflow
May 22, 2009 · Before changing database schema I issue: ALTER DATABASE SET RESTRICTED_USER On completion: ALTER DATABASE SET MULTI_USER I understand …
sql - How to close existing connections to a DB - Stack Overflow
Apr 30, 2012 · I want to close the existing connections to an MS SQL Server so that I can do a restore on that database programatically.
Scripting SQL Server permissions - Stack Overflow
You can get SQL Server Management Studio to do it for you: Right click the database you want to export permissions for Select 'Tasks' then 'Generate Scripts...' Confirm the database you're …
sql server - Exit single-user mode - Stack Overflow
Currently, my database is in Single User mode. When I try to expand me database, I get an error: The database 'my_db' is not accessible.(ObjectExplorer) Also, when I try to delete the …