About 13,400 results
Open links in new tab
  1. sql - Find all tables containing column with specified name - Stack ...

    In MS SQL Server Database, use this query to get the tables and respective column names that contains the input text: SELECT t.name AS tableName, c.name AS columnName

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

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

  5. How to send email from SQL Server? - Stack Overflow

    Nov 9, 2012 · How can I send an email using T-SQL but email address is stored in a table? I want to loop through the table and be able to send email. I cannot find a good example of doing this …

  6. List of all index & index columns in SQL Server DB

    Apr 20, 2009 · How do I get a list of all index & index columns in SQL Server 2005+? The closest I could get is: select s.name, t.name, i.name, c.name from sys.tables t inner join …

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

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

  9. How can I give permission to a user in an Azure SQL database?

    Feb 12, 2024 · Azure SQL Database and Azure Synapse have special roles, and instead you should be giving dbmanager permission to your user, and here is the description of it Can …

  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 …