Results 1 to 5 of 5

Thread: I detached a database from SQL Server Object Explorer

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Dec 2023
    Posts
    22

    I detached a database from SQL Server Object Explorer

    How do I get it back? There's no attach option.

  2. #2
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,565

    Re: I detached a database from SQL Server Object Explorer

    There should be...
    https://learn.microsoft.com/en-us/sq...h-a-database-1
    In SQL Server Management Studio Object Explorer, connect to an instance of SQL Server Database Engine, and then select to expand that instance view in SSMS.

    Right-click Databases and select Attach.

    In the Attach Databases dialog box, to specify the database to be attached, select Add. In the Locate Database Files dialog box, select the location where the database resides and expand the directory tree to find and select the .mdf file of the database; for example:

    Code:
    C:\Program Files\Microsoft SQL Server\MSSQL16.MSSQLSERVER\MSSQL\DATA\AdventureWorks2022_Data.mdf
    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  3. #3
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,464

    Re: I detached a database from SQL Server Object Explorer

    Are you talking about the Object Explorer window in SSMS or the Server Explorer window in VS? I'm assuming the former but, even if it's the latter, this question has nothing to do with VB.NET. Please post in the most appropriate forum for the topic. Thread moved.

  4. #4

    Thread Starter
    Junior Member
    Join Date
    Dec 2023
    Posts
    22

    Re: I detached a database from SQL Server Object Explorer

    Sorry about poasting on the wrong board guys...

    Ah, so you do it in SSMS... you'd think if there's a 'detach' option in VS they could just add an 'attach' option too... oh well...

    Got it working, thanks. Cute pups!

  5. #5
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,464

    Re: I detached a database from SQL Server Object Explorer

    I just took a look and realised that your terminology was accurate in the first place - there is a window named SQL Server Object Explorer in VS. Not one I've ever used as I don't think it can do anything that SSMS can't and I always use that.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width