none
Server is completely empty and I can't create a normal database

    Question

  • I use Microsoft SQL Server Management Studio Express on Windows 7.

    Don't ask me how, but when I was erasing a database I no longer desired, I erased the 'Database' folder on the server.

    Pitiful I know, but I am only learning how to use databases this year... and I'm not even learning it on MSSQL.

    Every time I try to connect to a new instance, it is created without any folder to place databases and running a script that used to restore a database I have returns an error saying that the token 'RESTORE' is incorrect. This didn't happen before.

    I've tried uninstalling SQL Server and SQL SMSE and re-installing. No matter how much I try to erase every residue of past installations, the new installation always recovers the state of the previous one, showing exactly the same server structure and database name.

    How do I remake the entire server?

    P.S. I'm curious as to why this information is stored in my computer, information that I am unaware of. Is the Server a part of Windows itself? Why can't I control the information the system stores and simply erase any evidence of a previous server so I can create a new one?

    Wednesday, October 6, 2010 2:59 PM

All replies

  • The database backup store information of the previous location, try to use this sintaxis to specify the new file location

    http://technet.microsoft.com/en-us/library/ms186858.aspx#restoring_db_n_move_files

     

    More information How to: Restore a Database to a New Location and Name (Transact-SQL) http://technet.microsoft.com/en-us/library/ms190447.aspx, the

    Wednesday, October 6, 2010 4:37 PM
  • No luck...

    I'm not sure you understood my problem: there is nothing on the computer. There is nothing to connect to from de manager. All I see in the panes is a line in the window "registered servers" that has nothing inside.

    There is absolutely nothing attached to the database engine.

    Obviously I did something very, very wrong, which is not unespected since I'm a noob with databases, but why is there no way to simply re-install the database server with the default database? And why does the server revert to a database I erased before uninstalling and then re-installing and that is missing the "Database" folder?

    The computer is void of database servers and I am unable to recreate one.

    Even the RESTORE command gives an error! How am I going to restore a database if the command RESTORE gives an error and won't do anything?

    Please... is there no solution for this?

    Thursday, October 7, 2010 2:20 PM
  • When you say "Database" folder is a folder in the operating system or in SSMS (SQL Sever Management Studio), i have tried to delete the folder in my SSMS and delete is not an option so I'm missing something

    What SQL Server version are you using?

    A second thing when you uninstall SQL Server it doesn't delete the files of the databases you already have , depending on the version this files remains in C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA

    Not sure what do you mean for the RESTORE command.

    What are the steps are you performing to uninstall SQL?

     

     

     

     

    Thursday, October 7, 2010 5:34 PM
  • I'm using the 2005 version.

    Microsoft SQL Server Management Studio Express 9.00.4035.00

    Microsoft Data Access Components (MDAC) 6.1.7600.16385 (win7_rtm.090713-1255)

    Microsoft MSXML 3.0 6.0

    Microsoft Internet Explorer 8.0.7600.16385

    Microsoft .NET Framework 2.0.50727.4952

    Operating System 6.1.7600

    he "RESTORE" command is exactly that: the query command that is supposed to control the restoration of a database. I used a query to restore a backed up database before, using this command followed by the correct parameters, but when I try to execute the exact same query now, using this command, I get "unkown command" on the first line, first token. That is to say, on the "RESTORE" command word.

    I uninstalled the program and reinstalled it again twice, uninstalling through the windows control panel. Even if I erase the files you mentioned, even if I erase everything that appears that is wrong, to try to force the program to recreate the database or prompt me to know what to do, when I start the manager it forces me to select the database I erased, it is the only connection that appears, and recreates it as if I had done nothing to it!

    One thing I noticed, when I went to the folder you mentioned, was that the "80" folder was missing from the "Microsoft SQL Server" folder.

    I am using the windows authentication. When I try to connect to the Database Engine itself, it takes a while processing and then respondes that the server was not found or is inaccessible. Like I told you: I erased everything. Why is there no option to reinstall the server?

    Thank you.

    Friday, October 8, 2010 11:51 AM
  • Now you are saying that  besides the restoration problem  you cannot connect to the server , right? There is an option to reinstall the server, just run setup of SQL Server Express Edition...

    Anyway, if you succeed  to connect to the server , open query window and just run CREATE DATABASE test, do you still get that error?


    Best Regards, Uri Dimant SQL Server MVP http://dimantdatabasesolutions.blogspot.com/ http://sqlblog.com/blogs/uri_dimant/
    Sunday, October 10, 2010 7:54 AM
  • This is getting very fustrating, but I think I can explain myself better.

     

    I cannot connect to the standard database and when I connect to other databases that I create, they do not appear with the "Database" folder.

    Trying to run the command RESTORE with the correct parameters leads to an error right on the token "RESTORE".

    I tried to run the query you suggested, and the program seemed to process it correctly without errors, but when I tried to open the new database, it had not been created.

    I tried "Repair", from the Control Panel, on the program but the situation did not change.

    I tried to use SQL Server 2005 Surface area just to create a new administrator to try something and where I'm supppsed to select the privileges of the new administrator, there are no privileges to select.

    Trying to use the "Surface Area Configuration for Services and Connections" fails with an error saying that either there are no components installed or I am not on an account with administrative privileges, which I am (also, I had used that functionality before with no errors).

    Like I said before: everything is absolutely empty and nothing I do restores anything.

    I'll try to keep looking for details about the problem... if you have any other ideas, I'll be glad to try them.

    If any part of what I wrote is unclear, tell me and I will rephrase it.

    • Edited by Arkaever Sunday, October 10, 2010 5:53 PM Bad formating
    Sunday, October 10, 2010 5:51 PM
  • >I tried to run the query you suggested, and the program >seemed to process it correctly without errors, but when I >tried to open the new database, it had not been created

    You mean you see the database under database folder in SSMS but when you click on you get the error that database does not exist?

    >Don't ask me how, but when I was erasing a database I >no longer desired, I erased the 'Database' folder on the >server.

    Do you drop the database in the SSMS? Or just removing the database files from C:\Program Files\Microsoft SQL Server\MSSQL\Data??

    You know there is no miracles and if you see that RESTORE command completed succefully I see no reason for database disappearance


    Best Regards, Uri Dimant SQL Server MVP http://dimantdatabasesolutions.blogspot.com/ http://sqlblog.com/blogs/uri_dimant/
    Monday, October 11, 2010 6:05 AM
  • "I tried to run the query you suggested, and the program seemed to process it correctly without errors, but when I tried to open the new database, it had not been created"

    The point is "it had not been created"! There was no database even after the query said everything had worked!

    I neither dropped the the database in the SSMS nor did I remove any file directly. I simply right-clicked on the database and selected "Delete".

    Like I said before, twice, the RESTORE command does not work. I had used the command to restore a database before, and it worked but now it doesn't and returns an error message.

    No matter what I do to try to uninstall every part of the program, so I can start again, when I reinstall, everything comes back to the same point, doesn't create the original database and revives databases I had deleted through the Express Manager.

    I'm repeating myself very often... I must not be explainning myself properly. I will resume the current status in topics so there is little margin for misunderstandings:

    • I tried the CREATE command, and the manager processed it without giving an error, but when I looked for the database, it hadn't been created: there was nothing there.
    • When I erased the database, it was by right-clicking on the database and selecting "Delete".
    • The RESTORE command worked many times before I erased the database.
    • Now , the RESTORE command is not recognized and produces an error.

    I really appreciate what you are doing, but I get the feelling we don't understand each other... Since no one else seems interested in this problem, if you cannot help me, I will find a free version of MySQL and create a database there from scratch.

    Let's see if we can finally solve this: I don't want to use MySQL because it would mean recreating the entire database.

    Thank you.
    Monday, October 11, 2010 8:47 PM
  • And by the way, I just noticed this now: no matter what I do, the database engine does not exist or is created!!!
    Monday, October 11, 2010 8:56 PM