SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Backing Up a Database with SMO


Backing Up a Database with SMO

Author
Message
Brandie Tarvin
Brandie Tarvin
SSC Guru
SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)

Group: General Forum Members
Points: 61632 Visits: 9400
Comments posted here are about the content posted at http://www.sqlservercentral.com/columnists/btarvin/2900.asp

Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.
David Bird
David Bird
SSCommitted
SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)

Group: General Forum Members
Points: 1678 Visits: 1267
I enjoyed the article. Can this application be built with Visual Basic Express Edition?

David Bird
Brandie Tarvin
Brandie Tarvin
SSC Guru
SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)

Group: General Forum Members
Points: 61632 Visits: 9400

Honestly, I haven't actually worked Visual Basic Express, just Studio 2005. Google has lots of information about SQL Server Express and the SMO object, but I can't seem to find anything about using SMO with Visual Basic Express.

Since SMO is supposed to be included with SQL Server Express, though, and since SQL Express is supposed to be usable with VB Express, I would say "yes" with a caveat. As long as you can create the appropriate references, import the SMO objects and are using Visual Basic Express 2005, that you should be able to do this project using that tool.

Now you've got me wondering, though. I'm going to have to download the Express version and give it a whirl. @=)



Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.
moff
moff
SSC-Enthusiastic
SSC-Enthusiastic (117 reputation)SSC-Enthusiastic (117 reputation)SSC-Enthusiastic (117 reputation)SSC-Enthusiastic (117 reputation)SSC-Enthusiastic (117 reputation)SSC-Enthusiastic (117 reputation)SSC-Enthusiastic (117 reputation)SSC-Enthusiastic (117 reputation)

Group: General Forum Members
Points: 117 Visits: 35
Useful article. A few typos in the code though maybe?

Module CreateInitialConnection Public ProdServer As New Server()
Public ProdConn As ServerConnection
[...]

should read (note line break)

Module CreateInitialConnection
Public ProdServer As New Server()
Public ProdConn As ServerConnection
[...]


and
ImportsMicrosoft.SqlServer.Management.Smo
Imports Microsoft.SqlServer.Management.Common

should read
Imports Microsoft.SqlServer.Management.Smo
Imports Microsoft.SqlServer.Management.Common


Also, as a vb.net newbie I don't know if this is required in all cases but I got a failure every time I tried to run the code until I went into Project Properties -> Security and enabled "Enable ClickOnce Security Settings" and checked "This is a full trust application"
Brandie Tarvin
Brandie Tarvin
SSC Guru
SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)

Group: General Forum Members
Points: 61632 Visits: 9400

Good catch on the typos! Thanks for pointing them out.

I apologize for not mentioning the Security Settings. I re-create this project 3 times to make sure my code worked consistantly and don't remember setting those two properties. But when I went back and checked, sure enough, they were there and they were checked. And it isn't a default setting on my Visual Studio, either. So, that is definitely my bad. Sorry for the confusion.

I take it you finally got this working?



Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.
ajsri77
ajsri77
Grasshopper
Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)

Group: General Forum Members
Points: 19 Visits: 51
Nice and useful article.

Is it possible to take backup in any other drives or specific location other the default sql backup folder.

how to configure the specific location?

Please help me to do this.
Brandie Tarvin
Brandie Tarvin
SSC Guru
SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)

Group: General Forum Members
Points: 61632 Visits: 9400
I'm not quite sure I understand the question.

Are you saying you want to save SQL Database backups to a different location? Or that you want to pull non-SQL Database backups somewhere?

Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.
Tim Mitchell
Tim Mitchell
SSCertifiable
SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)

Group: General Forum Members
Points: 6140 Visits: 3095
Good article, Brandie. I appreciated the steps to create the MSI file - I've written a lot of SMO but have never taken the time to create the MSI. Thanks for the how-to.



Tim Mitchell, Microsoft Data Platform MVP
Data Warehouse and ETL Consultant
TimMitchell.net | @Tim_Mitchell | Tyleris.com
ETL Best Practices


Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search