I'm getting empty columns when restoring my backup...am I doing something wrong?...on the other hand the progress bar for my restore does not work...Thank you.
Great Video but Will be cool if we were able to save it in the local computer using the application. For Example, I have a VPS and I like to Do backups without entering the VPS. So Doing the backup from my local computer and getting that file in my local computer without entering my vps will be awesome.
No Library/extension/Reference found to add in my C# project that you added in your video for taking backup of SQL server I am using visual studio 2013 please help me out if there's any change now thanks in advance
@@foxlearn this time it says "User does not have permission to alter database 'mydb', the database does not exist, or the database is not in a state that allows access checks."
Error 7 The type 'Microsoft.SqlServer.Management.Sdk.Sfc.IAlienObject' is defined in an assembly that is not referenced. You must add a reference to assembly 'Microsoft.SqlServer.Management.Sdk.Sfc, Version=12.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91'. C:\Users\Mohamed\Desktop\Ray_Connect\Ray_Connect\Ray_Connect\Form_backup.cs 55 17 Ray_Connect hi the error fix Please
how to closed my form when await task finished. l have a large database back time out problem . i hope this process solve but not closed my form when task completed. please help me .
@@foxlearn System.InvalidOperationException was unhandled by user code HResult=-2146233079 Message=Cross-thread operation not valid: Control 'BackupsFiles' accessed from a thread other than the thread it was created on. Source=System.Windows.Forms StackTrace: at System.Windows.Forms.Control.get_Handle() at System.Windows.Forms.Control.SendMessage(Int32 msg, Int32 wparam, Int32 lparam) at System.Windows.Forms.Form.Close() at CoopSoft.BackupsFiles.pricesscompletedall() in d:\NASABACKUP\CoopSoft\CoopSoft\BackupsFiles.cs:line 184 at CoopSoft.BackupsFiles.dbbackup_PercentComplete(Object sender, PercentCompleteEventArgs e) in d:\NASABACKUP\CoopSoft\CoopSoft\BackupsFiles.cs:line 114 at Microsoft.SqlServer.Management.Smo.BackupRestoreBase.OnInfoMessage(Object sender, ServerMessageEventArgs e) at Microsoft.SqlServer.Management.Common.ServerMessageEventHandler.Invoke(Object sender, ServerMessageEventArgs e) at Microsoft.SqlServer.Management.Common.ConnectionManager.SerializeInfoMessage(Object sender, SqlInfoMessageEventArgs e) at System.Data.SqlClient.SqlConnection.OnInfoMessage(SqlInfoMessageEventArgs imevent, Boolean& notified) InnerException:
How can I get backup file from remote sql server ?
Thanks
to compress the backup which property should i use
I can not find the libraries in vs 2017 also I have installed sql server 2017 :(
I'm getting empty columns when restoring my backup...am I doing something wrong?...on the other hand the progress bar for my restore does not work...Thank you.
Great Video but Will be cool if we were able to save it in the local computer using the application. For Example, I have a VPS and I like to Do backups without entering the VPS. So Doing the backup from my local computer and getting that file in my local computer without entering my vps will be awesome.
Thanks! But how can I achieve to exclude specific table on backup?
You should generate a script, then you can run the script for the specified table. Thank you !
There was error for me, because I have VS 2013 , I replaced with string.Format("{0}%",e.Percent) as you said , but nothing happened . please help..
thank you very much for this helpful video
You're welcome. Thank you !
my problem is that the DbBackup_PercentComplete method never gets executed. thanks
why i code as above but don't backup ? Please help me
No Library/extension/Reference found to add in my C# project that you added in your video for taking backup of SQL server I am using visual studio 2013 please help me out if there's any change now
thanks in advance
You should install sql management studio, then you can get the library
@@foxlearn sql management studio is installed and project is working properly in sql and wi dows forms as well 😥
The code works fine. Thanks.
But does it work on big databases too?
I think yes
can you share your code please ?
there are no those 4 libraries in vis.st.2013 how will we add ?
You should install sql server
@@foxlearn already installed
Hello there, Backup failed for Server . on Visual studio 13?!
Please check your code again. I think you miss something.
Donde lo descargo ese ejemplo
Backup failed for Server .why is that??
Thank you very much
Thank you !
it is posible to backup the data from local database
Yes, You can backup data from local database
how can give me code
on this Id gevariyadhaval@gmail.com
otherwise can you give me some idea how to backup data in local database with .net c#
Similar code, only need to change your connection string
@@foxlearn say we have a program with database..How can we back up db while it s working ?
Hi Fox Learn
I have use Oracle 12c can you help me create app backup?
Thanks
sorry man. i don't use oracle
how to download this libraries?
Can u tell me where you take this voice for all video of your channel. Sound like voice of some OS.... Thanks
Natural text to speech. Thanks
how to store this backup to UBS or Dropbox using c#
Ok. Thank you for your suggestion
thank you
these characters $ and % are giving an error how did you do it foxlearn
$"{e.Percent}%"; pls error
Hi, It using in C# 6.0, you can replace string.Format("{0}%",e.Percent). thanks
If you have no VS 2015 you can't using the $ " " , but there is another way .. string.Format("{0}%",e.Perecent)
say we have a program with database..How can we back up database while it s working ?(local db)
You should set your database is single user, then backup. Next, back on multiple user
@@foxlearn this time it says "User does not have permission to alter database 'mydb', the database does not exist, or the database is not in a state that allows access checks."
i didn't find the libraries in vs2013
You should install sql server, then you can find the library
@@foxlearn i am working with local database how do i backup local database
Chào ad, mình đã làm giống hệt bạn mà lúc backup không được, cũng không báo lỗi gì . Bạn hướng dẫn mình với
What error are you getting? thank you !
@@foxlearn cảm ơn ad. Mình tìm ra lỗi rồi. Các bài viết của bạn rất có ích
@@TuanHoang-fy2ws bạn fix ntn vậy? mình bấm vào cũng không có báo lỗi gì hết nhưng nó không chạy
Error 7 The type 'Microsoft.SqlServer.Management.Sdk.Sfc.IAlienObject' is defined in an assembly that is not referenced. You must add a reference to assembly 'Microsoft.SqlServer.Management.Sdk.Sfc, Version=12.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91'. C:\Users\Mohamed\Desktop\Ray_Connect\Ray_Connect\Ray_Connect\Form_backup.cs 55 17 Ray_Connect
hi the error fix Please
You must add a reference to assembly 'Microsoft.SqlServer.Management.Sdk.Sfc
@@foxlearn Thank you for your response, but can you explain more
@@foxlearn how to add refrences
how to closed my form when await task finished. l have a large database back time out problem . i hope this process solve but not closed my form when task completed. please help me .
no reply
this.Close()
@@foxlearn System.InvalidOperationException was unhandled by user code
HResult=-2146233079
Message=Cross-thread operation not valid: Control 'BackupsFiles' accessed from a thread other than the thread it was created on.
Source=System.Windows.Forms
StackTrace:
at System.Windows.Forms.Control.get_Handle()
at System.Windows.Forms.Control.SendMessage(Int32 msg, Int32 wparam, Int32 lparam)
at System.Windows.Forms.Form.Close()
at CoopSoft.BackupsFiles.pricesscompletedall() in d:\NASABACKUP\CoopSoft\CoopSoft\BackupsFiles.cs:line 184
at CoopSoft.BackupsFiles.dbbackup_PercentComplete(Object sender, PercentCompleteEventArgs e) in d:\NASABACKUP\CoopSoft\CoopSoft\BackupsFiles.cs:line 114
at Microsoft.SqlServer.Management.Smo.BackupRestoreBase.OnInfoMessage(Object sender, ServerMessageEventArgs e)
at Microsoft.SqlServer.Management.Common.ServerMessageEventHandler.Invoke(Object sender, ServerMessageEventArgs e)
at Microsoft.SqlServer.Management.Common.ConnectionManager.SerializeInfoMessage(Object sender, SqlInfoMessageEventArgs e)
at System.Data.SqlClient.SqlConnection.OnInfoMessage(SqlInfoMessageEventArgs imevent, Boolean& notified)
InnerException:
How to create autobackup.
You can create a schedule in your sql server
I have a problem with progressbar , not update .
thank you so much :D
Hi, You need to set value to your progress bar in backup event. Please try again. Thank you
How can i use this code on windows authentication
I did not create Sql Sever Authentication Help me plz
maherg420@gmail.com
Alguém poderia me ajudar ? no Visual Studio 2019 não estou conseguindo adicionar a dependência que foi utilizado no vídeo
#barakuda
#cinderawasih
#metromini
@origa
republic palestina indonesian republic
#propaganda
Thanks Foxlearn, you helped me a lot of :°)
sql query:
Backup DATABASE [DatabaseName] TO DISK = N'D:Back.back'
😍😍
Access Denied :( And I can not solve with code.
I think you should set permission allows you to access the backup file
I know, but i can't do this manually. Set permission via script ^^
Fuentes
using (var context = new ApplicationDbContext())
{
string currentDatetime = DateTime.Now.ToString("yyyy-MM-dd 'at' HH.mm");
string backupPath =
$@"Backup DATABASE [DatabaseName] TO DISK = N'{Environment.CurrentDirectory}\Backups\{currentDatetime} Backup'";
context.Database.ExecuteSqlCommand(TransactionalBehavior.DoNotEnsureTransaction, backupPath);
}