
sql server - Get size of all tables in database - Stack Overflow
Oct 25, 2011 · To use this for all tables at once: USE MyDatabase; GO sp_msforeachtable 'EXEC sp_spaceused [?]' GO You can also get disk usage from within the right-click Standard …
How to fix Recovery Pending State in SQL Server Database?
Sep 14, 2018 · Rename the DB and the Log files (Database Properties -> Files) In the Object Explorer window in SQL Management Studio, refresh the 'Databases Folder', if you see that …
sql server - Database stuck in "Restoring" state - Stack Overflow
Ran into a similar issue while restoring the database using SQL server management studio and it got stuck into restoring mode. After several hours of issue tracking, the following query worked …
How do I search an SQL Server database for a string?
Dec 8, 2019 · I need to search an SQL Server database for all mentions of a specific string. For example, I would like to search all tables, views, functions, stored procedures, ... for string …
How do I see active SQL Server connections? - Stack Overflow
Aug 8, 2009 · I am using SQL Server 2008 Enterprise. I want to see any active SQL Server connections, and the related information of all the connections, like from which IP address, …
SQL Server: how do I export entire database? - Stack Overflow
I need to export database from one server and import it into another server. How do I export the entire database to a file, or two files mdf, ldf (either option is fine) How do I import it into a new
sql - Transfer data from one database to another database - Stack …
Apr 5, 2012 · How to fetch the data from one database and insert in to another database table? I can't to do this. Please help me in transferring data from one to another.
SQL Server query to find all permissions/access for all users in a …
Aug 13, 2011 · I would like to write a query on a sql 2008 that will report all the users that have access to a specific database, or objects within the database such as tables, views, and stored …
Create Local SQL Server database - Stack Overflow
6 After installation you need to connect to Server Name : localhost to start using the local instance of SQL Server. Once you are connected to the local instance, right click on Databases and …
How to find my permissions in a SQL Server database?
Mar 20, 2018 · I'm a user of a SQL Sever database, and I want to know my access rights / permissions in the database I'm using. What SQL query should I use to do so? Thanks