In the last post I narrated a PowerShell script which can backup a database – Backup a Database using PowerShell. In this post I want to show how to restore a Database from a backup file using PowerShell.
Most Popular (Last 7 days)
- How to send an Email using C# - complete features
- Sending Automated Emails asynchronously using a C# Windows Service in conjunction with Database Email records PART - II
- JQuery POST & GET Request to WCF Service in ASP.Net MVC
- Sending Automated Emails asynchronously using a C# Windows Service in conjunction with Database Email records – Part I
- Create a Simple WCF service against Pubs Database using EF, LINQ – Part I
- Create a Simple WCF Service Client against Pubs Database using EF, LINQ – Part II
- Simple Html Editor based Comments Section with Captcha feature along with Database Interactivity
- Access Code-behind variables in ASPX and JavaScript
- ASP.Net MVC–Simple Application Security using Password Hashing before storing it to Database
- Access JavaScript Variables in Code-Behind Class
Most Popular (All time)
- How to send an Email using C# - complete features (21595 views )
- Sending Automated Emails asynchronously using a C# Windows Service in conjunction with Database Email records PART - II (14165 views )
- Sending Automated Emails asynchronously using a C# Windows Service in conjunction with Database Email records – Part I (8825 views )
- JQuery POST & GET Request to WCF Service in ASP.Net MVC (8757 views )
- Create a Simple WCF service against Pubs Database using EF, LINQ – Part I (8563 views )
- Access Code-behind variables in ASPX and JavaScript (8546 views )
- Create a Simple WCF Service Client against Pubs Database using EF, LINQ – Part II (6852 views )
- Access JavaScript Variables in Code-Behind Class (6679 views )
- Simple Html Editor based Comments Section with Captcha feature along with Database Interactivity (6332 views )
- Data Transfer between two ASP.NET Pages (5788 views )
- Save the World (5121 views )
- Retrieve files from a table in Database using Generic Handler (3936 views )
- ASP.Net MVC–Simple Application Security using Password Hashing before storing it to Database (3790 views )
- Save files to a table in Database using FileUpload control (3490 views )
- AJAX HTML Editor based Contact Form inside UpdatePanel along with UpdateProgress (3416 views )
- How to download files from server to client using a Generic Handler (3051 views )
- JQuery Quickies #1 – GalleryView Plugin by Jack Anderson (2982 views )
- Book Review - MCTS Exam 70-536 Microsoft .NET Framework – Application Development Foundation Self Paced Training Kit - Tony Northrup (2939 views )
- File Download by Anil (2879 views )
- Enumerating, Managing and Monitoring File system using C# (2816 views )
JumpStart Tutorials
- JumpStart # 11 - Xml Comments for code using GhostDoc Extension
- JumpStart # 10 – Display Validation Error Messages in different formats using JavaScript
- JumpStart # 9 – Make Response.Redirect() open in New Blank Window
- JumpStart # 8 – Making Client CallBacks by Implementing ICallBackEventHandler Interface
- JumpStart # 7 – Handling UserControl’s Event from Parent Page
- JumpStart # 6 – Accessing CheckBoxList Control in JavaScript and making a Mandatory Selection Enabled
- JumpStart # 5 – Access Properties of a UserControl from other UserControl in ASP.Net Page
- JumpStart # 4 – validateRequest in ASP.Net
- JumpStart # 3 – ViewStateMode in ASP.Net 4.0
- JumpStart # 2 – OUT Parameter in C#
- JumpStart # 1 - Using Optional And Named Parameters in C#
Latest Entries
Restore a Database using PowerShell
RamiVemula on January 7, 2012 at 4:32 pm
Filed under:ARTICLE, PowerShell
Backup a Database using PowerShell
RamiVemula on January 6, 2012 at 11:01 pm
Of late I was working a lot in administering SharePoint enterprise products developed by my Dev. team. Often I landed up with lot of repetitive work back and froth, especially with databases. I stepped back and went to my SQL Basis, I explored various options to perform my daily routine Database tasks but found PowerShell [...]
Filed under:ARTICLE, PowerShell
Happy New Year 2012–My life in 2011
RamiVemula on January 3, 2012 at 2:44 pm
Hello All, First of all I wish one and all a very happy new year 2012, may all have peace and prosperity through out and may this year bring the lights of eternal happiness along with fragrance of everlasting blossoms of joy into your lives. Coming back its been quite a bit of time since [...]
JQuery POST & GET Request to WCF Service in ASP.Net MVC
RamiVemula on February 6, 2011 at 8:05 am
In this Demo, we see how to call a Wcf Service Method from JQuery. We make POST and GET Request for the same Service.
We have a ASP.Net MVC Webform, it only consists of html Controls. We have a simple Registration form, which takes User Name and User Email. Once We client the Submit Hyperlink, JQuery will make a POST request to the WCF Service, which will add the data to our Users List.
To retrieve the data, we have a simple Html Text Input, in which we fill the User Name. Once we give the input and click Retrieve Link, JQuery makes a GET Request to WCF Service, which searches the List of users and send back the Data to browser. We Display result in the Div tag.
Filed under:ARTICLE, ASP.Net MVC, C#, JQuery
ASP.Net MVC–Simple Application Security using Password Hashing before storing it to Database
RamiVemula on January 17, 2011 at 2:29 am
The intended application got some secured products in the Sql DB (here the table is Products). Users can login to the DB and can only retrieve products thorough MVC Application. So User first needs to Register to the application, then he can login to the application to retrieves the secured information of the products.
The main attention of the complete process flow is “Registration”, especially Password field. Storing Password as a string into DB is considered as not a good practice, so first we generate a Password Salt using Cryptography, then we use the original Password String along with Password Salt to hash it into a more secured format using a Hashing algorithm. and finally it is stored in the Users table of Sql DB.
While Authenticating User, we get the Password String from User login, then check the DB for Username, get the User Entity from the DB, fetch the Password Salt associated with the User, Combine the Password string and Password Salt to generate the Password Hash, then finally cross check the generated Hash with that of the DB version. If both matches, Authenticate the user or else notify him as Invalid Login.
Filed under:ARTICLE, ASP.Net MVC, C#, Entity Framework, LINQ
Windows Azure #1 – Create and Deploy First Azure Web Application
RamiVemula on January 10, 2011 at 10:13 am
Cloud Computing is a magic term which is mostly heard in the recent past among the technical world Devs. For those who never knew what is a cloud (in technical terms), let me put a simple description – Cloud saying to a Dev “You build the app, and I will take care of production environment”, its as simple as that. Even Microsoft don’t want to let their proportion of coders go down, it immediately came up with Windows Azure, Microsoft Cloud Platform. Windows Azure consists of mainly three important parts – Windows Azure (a place to manage the hosted services), SQL Azure ( to manage the data storage to DB) and AppFabric (used to build, scale and manage Web). Essentially a dev need to get accustom with all these three parts sooner or later.
Filed under:ARTICLE, ASP.Net, Windows Azure
Implementing MVP Pattern using UserControls with WCF Database Operations in Entity Framework and LINQ – Part III
RamiVemula on September 30, 2010 at 1:14 am
In this part of the tutorial, we carry on with the construction of MVP Pattern. First we start with the creation of View interfaces for the UserControls (which we created in PART II). Then we create the presenter classes, which will take the corresponding instances of views and then manipulate the view using Model classes (there by achieving code portability). Once we are done with the presenter classes, we implement the View interfaces in the codebehind of the UserControls. Finally we create a sample ASP.Net web page (typically webform), and use the UserControls for database transactions.
Filed under:ARTICLE, ASP.Net, C#, Entity Framework, LINQ
Implementing MVP Pattern using UserControls with WCF Database Operations in Entity Framework and LINQ – Part II
RamiVemula on September 30, 2010 at 1:13 am
In this part of the tutorial – We first code for the CustomerService.cs by implementing ICustomerService.cs interface. We use LINQ queries to code database transactions. Then we create a host application (here it is a Console application) which operates the WCF service. Then we create a sample website for implementing MVP Pattern to access WCF. In the website, we implement some UserControls for fetching/updating/deleting records from the database.
Filed under:ARTICLE, ASP.Net, C#, Entity Framework, LINQ
Implementing MVP Pattern using UserControls with WCF Database Operations in Entity Framework and LINQ – PART I
RamiVemula on September 30, 2010 at 1:12 am
First we create a database – ‘CustomersDB’ – with a table in it – ‘Customers’. This table Customers holds the basic data related to each and every customer. Then we create the entity model for this CustomersDB using ADO.Net Entity Framework. After that we create a WCF service with minimal end point configuration to access ServiceContracts which do basic database operations. Instead of coding the data access methods (of the class implementing ServiceContract) in traditional ADO.Net queries, we tend to use LINQ for the same. Once the service is ready, we host it using a Console App. With this we complete the backend of the article. Now we implement the MVP pattern for better separation of UI from its code with the help of presenter class. So we create an interface for both model and view and then implement them in their respective class. Finally we create a UI with some UserControls in it for adding/editing/deleting customers from the front end.
Filed under:ARTICLE, ASP.Net, C#, Entity Framework, LINQ
Retrieve files from a table in Database using Generic Handler
RamiVemula on September 9, 2010 at 9:51 pm
In the first part of this tutorial (PART I – Click Here), we uploaded files to the database in binary format using a FileUpload control. The plot behind saving files is to take the file from the FileUpload control, convert the same to the binary format, then save it to the DB. To make our accomplishment more flexible and maintainable, we use stored procedures along with custom classes for database transactions.
In this part of the tutorial, we retrieve the files (which are stored in a table of a database). For this purpose we first create a custom class which will hold the code for database transactions, then we create a generic handler which will process all the incoming requests for the downloading of files. Finally we create a web page which uses the before mentioned class and handler along with a repeater control to make the file available to the client.
Save files to a table in Database using FileUpload control
RamiVemula on September 9, 2010 at 9:48 pm
In this tutorial, we first save files to the database in binary format, then in the second part of the tutorial we see how to provide a download option to the files residing in database. For uploading the files to DB, we use a FileUpload control and to provide download facility we make use of a Generic handler. The plot behind saving files is to take the file from the FileUpload control, convert the same to the binary format, then save it to the DB. To make our accomplishment more flexible and maintainable, we use stored procedures along with custom classes for database transactions. And the plot behind retrieving files is to use a handler which process the incoming request which are made to the files in database.
AJAX HTML Editor based Contact Form inside UpdatePanel along with UpdateProgress
RamiVemula on September 7, 2010 at 11:47 pm
In this tutorial, we see how to develop a simple Contact Page webform. This Contact Page is going to be a similar one to what we usually see in our day to day experience out in internet. Here we use AJAX HTML editor to enable Html email to the owner of the website. The basic outline would be – Users provide their general details like name and email, and also they can provide Html Message (using AJAX HTML Editor) in the Contact Page, where a basic validation is done as first step. Then we take the Html string, and send the same in the email to the authorized person of the website (typically owner) using SMTP settings (System.Net.Mail namespace). For ease of use, we use Gmail SMTP settings (host and port) for sending email. For better interactivity UpdateProgress control is used to show the progress of email routine.
How to download files from server to client using a Generic Handler
RamiVemula on August 31, 2010 at 7:37 pm
In this article, we see how to provide a download option (say for example to download images) to the users of our website. In accomplishing the requirement we use a Generic HttpHandler – which handles all the requests made for the download. For demonstration purpose we take some images and display them using a Datalist, in which we do provide an option to download. On download option click, the generic handler will process the request and displays an dialog in the client questioning client either to save or open the file, accordingly corresponding action will be taken place.
Simple Html Editor based Comments Section with Captcha feature along with Database Interactivity
RamiVemula on August 29, 2010 at 7:32 pm
In this tutorial, we see how to develop a simple comments section. This comments section is going to be a similar one to what we usually see in our day to day experience. Here we use TinyMCE editor to enable Html Comments. And also catpcha is enabled (with the help of reCaptcha of Google). The basic outline would be – Users provide their general details like name and email, and also they can provide Html Comment (using TinyMCE), and finally they should enter the text showed in the captcha for validating robots. Then we take the Html string, encode it using HtmlEncode(), store it in database. Finally we retrieve the encoded string from the database, we then decode it and display it in the page as Comment.
Sending Automated Emails asynchronously using a C# Windows Service in conjunction with Database Email records PART – II
RamiVemula on August 23, 2010 at 1:03 am
In this part of the tutorial, we first create a Windows Service Project, then implement a Service called – ‘BirthdayEmailService’. Then we add a reference to our previously created Class Library – ‘EmailComponent’. We code BirthdayEmailService using Timer to perform the email sending task for every hour. Then we incorporate the Installer classes for the purpose of installation. Finally a Setup and Deployment Project is created for the Service. Finally the complete Solution is build and the exe file is generated which is ready enough to get installed.






