I try to open the database YourGuruDB1 in this directory:
D:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data
I go to file and then open file.. Then it tells me, that i must ensure that the database is installed..
Previously I backed up and restored the database, and then detached it..I have no idea where the program dropped the database to..
But I want to open it with all its stored procedures like any other database that i have in SQL Server 2005
If you detached it, you need to attach it.
Just right click on the "Databases" node in SQL Server Managment Server, click "Attach", navigate to the data file you indicated, and tell it to attach the database.
You have to attach back the database.
Related
I'm sorry that I put this question because I think that is simple but I don't know how to do this think because I am a beginner.
I made a database in sql server management studio 2008 express and now I need to send this database to somebody by email.Where is this database saved?
I need to send it with all tables I created and with the diagram.
Should I generate a script or the database is saved somewhere on my computer.
You can take backup of your database and you will get .bak file as a database backup copy then you can mail anyone and they can just restore it to use it.
In sql server management studio 2008 -> Right click on your database -> Task -> backup
To Restore the database right click on Databases then Restore database give the location
of .bak file.
What is the best way to go about moving a database from a Godaddy SQL 2005 account to a local SQL 2005 server? I have access to the DB through Server Management Studio Express and also through the Godaddy SQL explorer.
However, I have no idea where to start. In MySQL, I would just export the data through the PHPMyAdmin page, and conversely import it on the other server using an ASCII file. In access, I'd just use the migrate tool. In Server Management Studio, I've thought about using the "Backup" and "Restore" method, but I'm afraid that I won't have the ability to create a new object with the correct permission schema on the new server.
What are your thoughts? Keep in mind that I do not have access to the MDF or temp files. I've been studying this page.
SMSS should be able to do it for you. If you are looking to move the entire database and not just a few tables, the Backup and Restore method is probably your best bet.
Your steps might include:
connect to Godaddy sql server in ssms
Right click the database you want to move and select Tasks > Backup
Keep/set Backup type = "Full" and add a destination at the bottom that you will be able to access.
After backup completes, move the .bak file to a location that your local sql server can see.
Connect to your local sql server in ssms.
Right click Databases > Restore Database
Enter the database name you want in "To Database:"
Select "From device:" and locate the .bak file you created before.
In the row that shows up in the grid display, check the restore check box.
If it matters to you where the recreated files will be stored, select options on the top left menu and confirm the file locations under the "Restore As" column in the data grid.
Click ok and the restore should start.
To migrate users, follow the directions at http://support.microsoft.com/kb/918992
Don't be so afraid of the backup and restore. You have a much better chance at getting a high fidelity copy of your data than trying to roll your own. Give it a shot, test it out, and see what happens. I think you'll be pleasantly surprised.
i have a database (ms 2005 server). How to get bak or mdf file BUT; it is running windows 2008 server also over 600 stuffs is using this DB. if i get .bak file or mdf. i must close connection. i dislike it. is there any useful methods or method to get BAK or MDF? this method may be a EXE or ms sql property or tool?
You certainly do not need to drop users to make a backup. Just right click your database in SQL Server Management Studio -> Tasks -> Back Up
Even better, setup a regular backup schedule.
Here's further instructions on backing up SQL Server 2005.
I have a database in my sql management studio how can script the database schema to file so that I can put it in another device?
thanks
Open SQL Management -> Script Database As -> .... I think its the closest to what you mean.
Of course there are 3rd party tools for these kind of works. See RedGate.
Shutdown SQL Server, copy the MDF and LDF Files to a new server and attach them on that instance by right clicking on Databases and choosing Attach. Specify the location of the files.
Alternatively, you could also backup the database from the source and restore it in the destination.
The above two methods copy all data too. If you want only the schema, Right click on the database and choose Generate SQL Scripts and follow the instructions.
SQL Management Studio 2008 can make query to unload Schema and data from database, but older versions if Management studio can't do it. You can use another soft to do it like an EMS SQL Management studio
I have a website I've created in Visual Studio 2008 and I need to take it live. How can I backup the database file to a .bak so I can hand it over to the hosting company to place on the server?
From a SQL prompt:
BACKUP DATABASE MyDatabase TO DISK='E:\MyDatabase.bak'
Go to Microsoft Server Management Studio and right click on your database name. Go to "Tasks" -> "Back Up..."
Then assign your properties, ensure that "Backup Type" is full.
Then at the right there is a button "Add" press that and set your filename, ensure that you place the extension .bak at the end of the file name.
Finally hit ok and wait for the backup to complete.
MSDN also has an article that explains this http://msdn.microsoft.com/en-us/library/ms187510.aspx
In ssms right click on the database, go to tasks, click back up. should be self explanatory from there.
You don't need a backup to do so (I assume you are using the AttachDbFilename model that Visual Studio uses by default). Just send them the mdf and tell them to attach it to their SQL server instance.
I assume you use SQL Server. This links will guide you:
How to: Back Up a Database (SQL Server Management Studio):
SQL Server 2008
SQL Server 2005