Is it possible to export my database that i created in SQL Server 2008 Express?
I'm asking this because I need my group mate to be able to work on the same one. I know you can generate a script for the database but it give a bunch of errors when we try to run it.
You can right click the dbase then Task->Backup
This will generate a .bak file which you can
Task->Restore to a new database
You can refer here
http://msdn.microsoft.com/en-us//library/ms187048.aspx
Yes. You can export your sqlserver database by using these steps.
Right click on your database and hover on Tasks, you got another dropdown, Select Back Up.
You got a pop-up like this.
Click on OK button.
Navigate to path on your local PC (C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\Backup\your database)
You got your exported database.
Back it up on disk, give a copy of the file to your friend and tell him to restore a database from that copy.
See this article for more help
Yes,export database from sql server 2008 express is possible..
create backup file and export it.
Related
I work in a small company which is running M/S SQL Server 2005
Now our head office is asking me to give the whole database backup with the table schema in a single file of *.sql
please help me to backup my database in a *.sql including the table schema.
Thanks in advance.
Use SQL Server Management Studio
right click on your database and choose Generate scripts... and hit Next
choose Script entire database and all database objects and hit Next
choose Save to file and enter a path and a file name for your future sql script file. On the same screen choose Advanced and change the Types of data to script property value from Schema only to Schema and data. Hit OK. Hit Next.
and hit Next again.
You can download, install, and use SQL Server Management Studio that comes free with Microsoft® SQL Server® 2012 Express for that
I would go out and download Microsoft SQL Server Management Studio Express.
http://www.microsoft.com/en-us/download/details.aspx?id=8961
It is free. You will be able to connect to the database, drill down into Databases, right click and under Tasks, pick Backup Database. Make sure you pick full...CHoose Disk as the place you want to write it to and Execute...Look thru your options as well...
Hope this helps!
I’d go with the method peterm suggested but note that this also has flaws. Problem is that SSMS doesn’t order the scripts in correct execution order.
For example, it might happen that DDL for stored procedure P is before DDL for table T that is used in P.
All you need to do is to review your script and make sure there are no such cases. If there are you can try fixing this yourself or using some third party tool to generate script that is ordered correctly.
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.
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 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
I have a database that was given to me, but is in a file format (.sql). I want to open it in my SQL Server, but I don't know how, because it says i need a .mdf file?
Can someone help?
Open up the .sql file - if it contains SQL code in plain text, you have most likely received the database as a create script. Run it in SQL Server Management Studio.
A .sql file is (usually) just a series of SQL commands that you execute on the SQL server using your preferred GUI or CLI. Try opening it in Notepad to see what I mean.
Click on the data base.
Right click displays drop down menu.
Select execute SQL file.
Search for your .SQL file
Click on start button
Click close.
Press F5.
.Sql file is just a random file holding some SQL queries. While .mdf and .ldf are Microsoft SQL Server Database files which hold an entire database.
Run your file in SQL Server Management Studio.