About 13,300 results
Open links in new tab
  1. 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 …

  2. 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 …

  3. 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 …

  4. Storing files in SQL Server - Stack Overflow

    It's an old question I know, but with SQL Server 2012 is it finally ok to store files in the database, or should they really be kept in the filesystem with only references to them in the database? ...

  5. 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 …

  6. sql - Script to kill all connections to a database (More than ...

    Thanks! I didn't realize that some tab with sql statement in SQL Management Studio, executed earlier on this database, was causing my db to be reported in use. Use master, and go, made …

  7. How do I grant myself admin access to a local SQL Server instance?

    Mar 27, 2012 · I installed SQL Server 2008 R2 to my local machine. But, I can't create a new database because of rights (or lack of). "CREATE DATABASE PERMISSION DENIED" So, I …

  8. sql - Rebuild all indexes in a Database - Stack Overflow

    Sep 10, 2015 · I have a very large SQL Server 2008 R2 database (1.5TB) and will be copying some data from column to column within the same table. I've been told that the schema has a …

  9. 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

  10. 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 …