Click here to Skip to main content
15,910,234 members
Home / Discussions / Database
   

Database

 
GeneralRe: Database Duplication Pin
Leo Smith28-Apr-09 8:19
Leo Smith28-Apr-09 8:19 
QuestionUsing SQL Server 2008 Pin
musefan28-Apr-09 1:30
musefan28-Apr-09 1:30 
AnswerRe: Using SQL Server 2008 Pin
Rob Smiley28-Apr-09 2:04
Rob Smiley28-Apr-09 2:04 
GeneralRe: Using SQL Server 2008 Pin
musefan28-Apr-09 2:13
musefan28-Apr-09 2:13 
Questionwhat is the best method to install SQL server Express 2005 programmatically Pin
sunil goyalG28-Apr-09 0:44
sunil goyalG28-Apr-09 0:44 
QuestionOracle On Vista?? Pin
Muammar©27-Apr-09 23:06
Muammar©27-Apr-09 23:06 
AnswerRe: Oracle On Vista?? Pin
RussellT5-Jun-09 9:24
professionalRussellT5-Jun-09 9:24 
QuestionCreate backup of Database of SQL server from Client and server Pin
sunil goyalG27-Apr-09 21:47
sunil goyalG27-Apr-09 21:47 
hi all,
i want to create backup of my database (related to SQL server Express 2005) from .NET application. Application is install on SERVER and some Client computer(which is connected to SERVER). I want to create backup from SERVER and client.
for backup purpose i use following statement

Dim cmd As SqlCommand<br />
        cmd = New SqlCommand("Backup Database abc to disk = @BackUpPath")<br />
        cmd.CommandType = CommandType.Text<br />
<br />
        Dim RootPath1 As String = DestinationPath 'Path for create Backup<br />
        Dim shellCommand As String = RootPath1 & "abc.bak"<br />
        cmd.Parameters.AddWithValue("@BackUpPath", shellCommand)<br />
 ExecuteRestoreCommandQuery(cmd, "master")


and this is the procedure ExecuteRestoreCommandQuery

Private Sub ExecuteRestoreCommandQuery(ByVal comm As SqlCommand, ByVal DatabaseName As String)<br />
        Dim con1 As SqlConnection = Nothing<br />
        Try<br />
            con1 = New SqlConnection("Data Source=" & PublicServerName & "\" & PublicInstanceName & ";Initial Catalog=" & DatabaseName & ";User ID=sa;Password=password")<br />
            comm.Connection = con1<br />
            con1.Open()<br />
            comm.ExecuteNonQuery()<br />
            con1.Close()<br />
<br />
        Catch ex As Exception<br />
            msgbox(ex.Message.ToString)<br />
            If con1.State = ConnectionState.Open Then<br />
                con1.Close()<br />
            End If<br />
        End Try<br />
<br />
    End Sub        


but when i run above code then it Gives error
"Can not open backup device" path ... Operating System Error 5(Access is denied.). BACKUP DATABASE is terminating abnormally."

so how can i create backup from application which is installed on SERVER and CLIENT.
AnswerRe: Create backup of Database of SQL server from Client and server Pin
scottgp28-Apr-09 0:32
professionalscottgp28-Apr-09 0:32 
GeneralRe: Create backup of Database of SQL server from Client and server Pin
sunil goyalG28-Apr-09 0:46
sunil goyalG28-Apr-09 0:46 
GeneralRe: Create backup of Database of SQL server from Client and server Pin
scottgp28-Apr-09 1:03
professionalscottgp28-Apr-09 1:03 
GeneralRe: Create backup of Database of SQL server from Client and server Pin
sunil goyalG28-Apr-09 1:57
sunil goyalG28-Apr-09 1:57 
GeneralRe: Create backup of Database of SQL server from Client and server Pin
scottgp28-Apr-09 2:17
professionalscottgp28-Apr-09 2:17 
GeneralRe: Create backup of Database of SQL server from Client and server Pin
sunil goyalG28-Apr-09 2:47
sunil goyalG28-Apr-09 2:47 
GeneralRe: Create backup of Database of SQL server from Client and server Pin
scottgp28-Apr-09 3:16
professionalscottgp28-Apr-09 3:16 
QuestionDB with Dataset Pin
lost_in_code27-Apr-09 21:46
lost_in_code27-Apr-09 21:46 
AnswerRe: DB with Dataset Pin
SayreCC27-Apr-09 23:42
SayreCC27-Apr-09 23:42 
Questionconvert nonnumberic nvarchar to float Pin
AndieDu27-Apr-09 19:25
AndieDu27-Apr-09 19:25 
AnswerRe: convert nonnumberic nvarchar to float Pin
Ashfield27-Apr-09 20:53
Ashfield27-Apr-09 20:53 
GeneralRe: convert nonnumberic nvarchar to float Pin
AndieDu27-Apr-09 21:50
AndieDu27-Apr-09 21:50 
GeneralRe: convert nonnumberic nvarchar to float Pin
riced28-Apr-09 0:29
riced28-Apr-09 0:29 
GeneralRe: convert nonnumberic nvarchar to float Pin
AndieDu28-Apr-09 1:22
AndieDu28-Apr-09 1:22 
GeneralRe: convert nonnumberic nvarchar to float Pin
Ashfield28-Apr-09 1:34
Ashfield28-Apr-09 1:34 
GeneralRe: convert nonnumberic nvarchar to float Pin
AndieDu28-Apr-09 13:45
AndieDu28-Apr-09 13:45 
QuestionBest Way to Store File Paths & File Names Pin
Jammer27-Apr-09 10:50
Jammer27-Apr-09 10:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.