SQL Server Database Backup and Restore using C# - Part 2

แชร์
ฝัง
  • เผยแพร่เมื่อ 31 ธ.ค. 2024

ความคิดเห็น • 49

  • @ripondatta5830
    @ripondatta5830  11 ปีที่แล้ว

    Hello Milin, Thanks for your interest. Actually you need to do backup in the server computer then you can copy to other place if you want.

  • @AbhishekYadav-ef4co
    @AbhishekYadav-ef4co 11 ปีที่แล้ว +1

    thanks for this great tutorial!!!!!
    well explained...

  • @ripondatta5830
    @ripondatta5830  11 ปีที่แล้ว

    Hey joshi, you have to backup data in the server computer not from remote device or any other external device. Are you trying from external device?
    Regards

  • @ripondatta5830
    @ripondatta5830  11 ปีที่แล้ว

    you can take the backup in the server computer using path and from that location you can restore the database.

  • @antoniorib8923
    @antoniorib8923 10 ปีที่แล้ว +2

    Thank you...
    Very good!!

    • @ripondatta5830
      @ripondatta5830  10 ปีที่แล้ว +1

      antonio donizete ribeiro junior Thank you. Keep in touch.

  • @anshuvishwakarma6020
    @anshuvishwakarma6020 5 ปีที่แล้ว

    Is predefine extension .bkp or we can change as we want.

  • @jusniper2565
    @jusniper2565 8 ปีที่แล้ว

    Can you tell me how to grant permission using stored procedure and process it in c#?

  • @ManosChalvatzopoulos
    @ManosChalvatzopoulos 10 ปีที่แล้ว

    is vsa for all pc?and how do i find my own data source?

  • @nancyb8614
    @nancyb8614 7 ปีที่แล้ว

    Please show me what is “EXEC sp_databases” ?

  • @SumanRaysumanray
    @SumanRaysumanray 8 ปีที่แล้ว

    thank you fr that wonderful learning video

  • @Codex07
    @Codex07 7 ปีที่แล้ว

    why is system do not show the databases in combo box but it successfully connect how and why?

  • @markbantolinao2583
    @markbantolinao2583 10 ปีที่แล้ว

    Help! Im stuck on this, Everytime i try to connect. it says
    "A network-related or instance-specific error occured while establishing a connection to SQL Server. The server was not found or was not accessible..etc"
    I already inputted my pasword,useId and datasource. Is there anything wrong
    with my data source??
    data source = "Localhost"
    Any help will be much appreciated.
    Thanks.

  • @valor077
    @valor077 11 ปีที่แล้ว

    how do i get the user id, i recieve a error when trying toe connect

  • @ripondatta5830
    @ripondatta5830  11 ปีที่แล้ว

    Welcome Abhishek Yedav.
    Regards
    Ripon Datta

  • @manigopal
    @manigopal 11 ปีที่แล้ว

    Show error whe i tried to make backup
    executenonquery requires the open and available ..connection currently closed

  • @aashikmohammed7087
    @aashikmohammed7087 10 ปีที่แล้ว

    hi sir,when i connect database in combo box the text is "C:\USERS\IRFAN\DOCUMENTS\VISUAL STUDIO 2012\PROJECTS\LASTPROJECT\BIN\RELEASE\ADDMED.MDF" like this sir
    and also when i backup database in message box"database addmed does not exist.make sure that the name is entered correctly Backup database is terminating abnormally" like this i use c#2012 sir what can i do sir

  • @gordonfreeman2525
    @gordonfreeman2525 3 ปีที่แล้ว

    Hi! This command "EXEC sp_databases" don`t work in Microsoft SQL 2014. I use "EXEC sp_helpdb"

  • @Faradars1
    @Faradars1 7 ปีที่แล้ว

    how you know the data source?
    user and password?
    when i create the sql db i used the windows authentication

  • @manigopal
    @manigopal 11 ปีที่แล้ว

    i get error in incorrect syntax error near 'DATABASETesting'
    in here Testing is my DB name

  • @artbelief777
    @artbelief777 5 ปีที่แล้ว

    i didnt understand how can create user id

  • @artbelief777
    @artbelief777 5 ปีที่แล้ว

    Please show me what is “EXEC sp_databases” ?
    and what is cmbDatabases

    • @redalligator9577
      @redalligator9577 5 ปีที่แล้ว

      “EXEC sp_databases” : this is the sql command to show all databases in your system, You could either write "Select * from sys.databases" to search all the databases in your system. And cmbDatabases is the name of the combobox. you can change it to any name.

    • @saukadali6509
      @saukadali6509 4 ปีที่แล้ว

      @@redalligator9577 how you know the data source?

  • @lastninja2022
    @lastninja2022 7 ปีที่แล้ว

    please do this on asp.net if you can show to use the running one on how to restore....really appreciated if you can do that...

  • @markbantolinao2583
    @markbantolinao2583 10 ปีที่แล้ว

    Help please..
    Where is your Datasource, userid and password came from??
    is that from your MySql Administrator?
    Thanks..

  • @SumanRaysumanray
    @SumanRaysumanray 8 ปีที่แล้ว

    Can i get the code? or you can mail me whole project

  • @isiahtejome2981
    @isiahtejome2981 8 ปีที่แล้ว

    sir , where your data source came from ? i input localhost in my data source, root in user ID and sa in password , then not execute.

  • @АлександрЛауденшлейгер
    @АлександрЛауденшлейгер 9 ปีที่แล้ว

    Thank you!))

  • @ripondatta5830
    @ripondatta5830  11 ปีที่แล้ว

    you can login using windows authentication then change or add user id

    • @ddchardz24z
      @ddchardz24z 8 ปีที่แล้ว

      sir ripon how can i create backup and restore with database using sql server windows authentication ,. because i dont know what is my sql server password is ,. thank you for your time

  • @kajalmahato5234
    @kajalmahato5234 10 ปีที่แล้ว +1

    back up code is not working ...incorrect syntax are showing

    • @lamotchiectenthatxinhay3530
      @lamotchiectenthatxinhay3530 8 ปีที่แล้ว

      +Kajal Mahato sql = "backup database " + comboBox1.Text +
      " to disk = '" + text4.Text + "\\"+comboBox1.Text+"-"
      +DateTime.Now.Ticks.ToString()+".bak'";

  • @ripondatta5830
    @ripondatta5830  11 ปีที่แล้ว

    It seems to me that you didn't separate your Database Keyword and Testing database name.

  • @bryanlim4486
    @bryanlim4486 8 ปีที่แล้ว

    sir please help where can i find the datasource? i use datasource as localhost but not working and root as user id and password is my name how do i find the datasource because it pop up error not connected please help i know its working but i do not know whats my datasource

  • @hitecnetworks
    @hitecnetworks 8 ปีที่แล้ว

    sir i have database in my d drive
    will u plz guide on how to make backup of that databas plzzz

  • @karlalwynbombane440
    @karlalwynbombane440 7 ปีที่แล้ว

    The ConnectionString Property has not been initialized, how can i fix that sir? Please response sir, my group in thesis need this. Thankyou sir

  • @SWMOTIVATION
    @SWMOTIVATION 3 ปีที่แล้ว +1

    SOLUTION FOR ---> SQL Server Operating system error 5: “5(Access is denied.)”
    Control Panel ->
    System and Security ->
    Administrative Tools ->
    Services ->
    Double Click SQL Server (SQLEXPRESS) -> right click, Properties
    Select Log On Tab
    Select "Local System Account" (the default was some obtuse Windows System account)
    -> OK
    right click, Stop
    right click, Start

  • @montmaher3259
    @montmaher3259 9 ปีที่แล้ว

    please ican't backup : Cannot open backup device 'C:\Users\Alfar\Desktop\backup_database\EMPLOYEESS635667691229523506.bak'. Operating system error 5(failed to retrieve text for this error. Reason: 15105).
    BACKUP DATABASE is terminating abnormally

  • @crush_kita3323
    @crush_kita3323 5 ปีที่แล้ว

    my reader is error wtf

  • @lastninja2022
    @lastninja2022 7 ปีที่แล้ว

    fake not working!!!!!

    • @nathltd
      @nathltd 7 ปีที่แล้ว

      It worked on my system

  • @iMickoymouse
    @iMickoymouse 9 ปีที่แล้ว

    OdbcCommand command = new OdbcCommand("BACKUP DATABASE " + databasename + " TO DISK = '" + txtBackupLocation.Text + "\\" + databasename + ".bak'",connect);
    Im using the above code but i got an error on my syntax. Can you help me?

    • @iMickoymouse
      @iMickoymouse 9 ปีที่แล้ว

      Micko silvestre BTW, the error is on runtime not on compiling. Its an odbc exception.
      ERROR [42000] [MySQL][ODBC 5.3(w) Driver][mysqld-5.6.21]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'BACKUP DATABASE dbloan TO DISK = 'G:\testingBackUP\dbloan.bak'' at line 1