473,799 Members | 3,339 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

C# code to take backup and restore database File?

19 New Member
Hi...

i am developing one application in .net...

in that i have to take backup the database.and have to restore the Database....

normally we connect the database from file...

i tried some codes but it returns, this file is used by another process...

so how can do that?

please help me...
May 10 '11 #1
4 3720
Aimee Bailey
197 Recognized Expert New Member
To best answer your question, can you provide more detailed information on what type of database it is. And what method of backup you are looking for.
May 13 '11 #2
vidhyaG
19 New Member
I am using Sql server 2005.i want to take database backup as mdf file and restore from that...
May 18 '11 #3
md anwarul azim
1 New Member
hi
i am using sql servar and c#.net.a want to save data frontin to backind. but it not work . i using some code.
only one code is error.
so how can i do it.
pls help me immidetly
Jan 31 '12 #4
PsychoCoder
465 Recognized Expert Moderator Contributor
We cannot help you if we cant see the code you're using
Jan 31 '12 #5

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

Similar topics

1
1754
by: Leader | last post by:
Hi, I want to take backup of database logfile periodically and automatically. What should i do then..... Thanks Hoque
3
9114
by: Tim Morrison | last post by:
MSDE2000 I have an application in which I am running a TSQL command of BACKUP DATABASE and RESTORE DATABASE for the backup and restore commands for my application. For testing purposes, i did the following: 1) Ran a BACKUP DATABASE command to a file named C:\TEST.BAK. 2) Deleted the database completely. 3) Ran a RESTORE DATABASE on the same file (note, I did NOT recreate the database) Now I have the database back with all my data....
1
1768
by: Eric J. Holtman | last post by:
Of course I'll try this before I go live, but I figured I'd ask here first. I've read the docs, and the answer is unclear. My current backup strategy is: Take a full database backup occasionally (like, every two weeks). Back up logs every five minutes. This works, but restoring the database all the way through can take a while, as I've sometimes spun through 800+ log restores.
2
3088
by: Vikrant | last post by:
Friends, I have read DB2/UDB 8.x 'RESTORE DATABASE Command', with my 'limited' knowledge & skill. I think it should address my concern, but I want advice/ opinion / experience and any care I must take to restore DB2/UDB 8.x database 64 to 32 bit). (1) Due to hardware limitaion I can not have 64 bit DB2/UDB 8 on AIX 4.3.3 host. Let us call this as host vhost32. I can migrate 7.2EE FP11 32bit to 8.x 32 bit on vhost32. This is my test...
4
3814
by: Hardy | last post by:
hi gurus, now I have to backup and restore a 8 T size db2 database. from two s85 to two 670. the partitions,tablespaces of the db should be redesigned then I plan to use redirected restore. but my concern is, such big size db, I'm afraid something unexpected will destory all the effort. Who have related experience? Can you give some advice? Thanks in advance:)
1
1535
by: G. Dean Blake | last post by:
How can I backup and restore a SQLServer DB from a .net VB program? Thanks, G
0
2148
by: raj.raghavan | last post by:
Hi, I have a database were all the indexes are in a seperate filegroup a few large tables are in a seperate filegroup. We take backup at different times and I have backup of primary, two filegroup and then transaction logs. The backup was successful when I restore the same backup it is erroring out with this error: Server: Msg 3135, Level 16, State 2, Line 1 The backup set in file 'E:\Manual Backup\test_primary.bak' was created by...
1
936
by: Utahduck | last post by:
I've been having some issues so forgive me if this double-posts. Because I have some large but static Filegroups within a database I prefer to backup my filegroups instead of everything at once. This is SQL Server 2000. The other day I backed up a file with this command: BACKUP DATABASE Thomasville FILEGROUP = 'PRIMARY'
3
23002
by: Bill E. | last post by:
I'm trying to restore a database backed up a production machine onto my development machine. I don't want to restore the transaction logs (there are two) because they are far too large and are unnecessary for what I'm doing. I would be happy to simply create one new log in my development environment. Therefore, I backed up the database using the No_Log option as in backup database CPTS to disk = 'd:\backups\cpts_backup_billeh.bak'...
0
1445
by: vijay bharath | last post by:
how to take backup of database using java by query itself? please help
0
9687
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9541
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10482
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10027
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7564
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6805
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4139
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3759
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2938
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.