Technical FAQs

Ask a Question

How to manually detach an ION Database using OSQL commands in the command prompt.

Goals and Symptoms

If an ION database will not detach using the ION Database Manager (Management Console > Tools > Database Manager) and MSDE (Microsoft SQL Server 2000 Desktop Engine) is being used as the database engine it may be possible to detach the database using OSQL (Object Structured Query Language) commands from the command prompt. The procedure below describes how to accomplish this.

Causes and Fixes

1. Open up a Command Prompt window (Start > Programs > Accessories > Command Prompt)

  • Note: After each command below press enter to execute.

    2. Type in the following code replacing what's in the < > brackets with the correct system information in order to login to Microsoft SQL Server:
    osql -U<username> -P<Password> –S<Server Name>\<SQL Instance>
    For Example: osql -Usa -PION!Everywhere –SMyServer\ION

    3. Next use this command to detach the database once again replacing < > with the correct system information:
    EXEC sp_detach_db ‘<database name>’
    • For Example: EXEC sp_detach_db ‘ION_Data’

    4. Now type:

    5. Now type:

    The database should now be detached.

    Note: OSQL has many commands and uses. For more information see Microsoft’s website:
Was this helpful?
What can we do to improve the information ?