473,394 Members | 1,843 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

How to copy a sql server database to disk

Hi friends

I want to copy a sql server database to my pendrive but i am not able to just copy paste it, I m using sql server first time so have no idea about it

Pleez help me out
Apr 16 '07 #1
1 4234
iburyak
1,017 Expert 512MB
You have to be able to do Backup and then Restore where ever you want this database to go:


[PHP]
A. Back up the entire MyNwind database


Note The MyNwind database is shown for illustration only.


This example creates a logical backup device in which a full backup of the MyNwind database is placed.

-- Create a logical backup device for the full MyNwind backup.
USE master
EXEC sp_addumpdevice 'disk', 'MyNwind_1',
DISK ='c:\Program Files\Microsoft SQL Server\MSSQL\BACKUP\MyNwind_1.dat'

-- Back up the full MyNwind database.
BACKUP DATABASE MyNwind TO MyNwind_1[/PHP]

[PHP]
A. Restore a full database


Note The MyNwind database is shown for illustration.


This example restores a full database backup.

RESTORE DATABASE MyNwind
FROM MyNwind_1[/PHP]

Good Luck.
Apr 16 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Jim Andersen | last post by:
I want to take a copy of a database, and mail it to another sql-server, and then get it up and running. I normally detach it, and copy the .MDF. But there are users using the database, so that...
1
by: Prashant Thakwani | last post by:
Consider a scenario, I am a DBA for the Database server where the size of the hard disk is 100 GB. On that database server, i have the Database whose size is 40 GB. Also, i restrict the size of...
8
by: 2centbob | last post by:
Has anyone had an issue with SQL Server not being able to expand against a RAID 5 file system? My current configuration is that the server is started and stopped using the local system account. I...
5
by: Kevin | last post by:
Can anyone recommend the easiest way to get a full copy of a database from one server to another. The servers are not part of the same organization or network. I have received a backup of the...
2
by: Fabius | last post by:
Hello all. I need transfer a db2 database ( tables, records ecc. ) from a server1 to server2. The operating system of server1 and server2 is win2000 server. I have installed db2 to server2. Now...
7
by: lgbjr | last post by:
Hello All, I¡¯m using a context menu associated with some pictureboxes to provide copy/paste functionality. Copying the image to the clipboard was easy. But pasting an image from the clipboard...
1
by: Byron | last post by:
Hi, I have(had) an old Win2k Server server with about 30 web site databases (SQL 2000) that just went under due to hardware problems. Thankfully, I have backups of all the databases plus the MDF...
6
by: Thanks | last post by:
Two Windows 2003 server, one with SQL 2005 server, another with SQL Express. Is it possible to copy databases from SQL 2005 to SQL Express? Thanks.
2
by: nosipho | last post by:
Hello guys, I need to copy a database in SQL 2000 to another SQL2000 server. I tried backing up the database to a folder then restore it but it's not happening. Please help to know how to copy...
5
by: Steve | last post by:
Hi; I thought I would rephrase a question I asked in another post to more quickly get to the heart of the matter. My apologies for anyone who is offended by what appears to be a repetition. ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.