Showing posts with label Tutorials. Show all posts
Showing posts with label Tutorials. Show all posts
Tuesday, August 24, 2010
Sunday, April 25, 2010
Basic Backup and Restore for MS SQL Server 2000
Here is a simple tutorial for backup and restore in SQL Server 2000. This tutorial covers the basic procedures in creating backup and restoring databases. In this tutorial, we will be using Northwind Database as our example since it available on the sample databases of SQL Server

Before we backup our database, we have to create a logical backup device for our database.
On the query analyzer, make the database in use by selecting it on the drop down menu or by executing the code:
Now we will create our logical backup device. Make sure the path exists when you execute this. If you execute this without errors it means that you are doing right.
After successful execution, you cannot run this code again since it already exists1
Then we will now backup our database with the following code:
As I said(or typed :o)) earlier, you should make sure that the path you created exists2.
Now we will restore are database based on the backup file we have created.
Notes:
1"Honestly, I haven't figured out yet how to alter that logical backup thing but please stay tuned for updates. You can also post some suggestions for this"-jereme
2. Tip: Or at least tell your front end application to create folders if it does not exist.
Backup

On the query analyzer, make the database in use by selecting it on the drop down menu or by executing the code:
Use Northwind
Now we will create our logical backup device. Make sure the path exists when you execute this. If you execute this without errors it means that you are doing right.
EXEC sp_addumpdevice 'disk', 'NWINDBackup', 'c:\NorthwindSystems\Backup\NWind_backup.bak' --NWINDBackup will be the name of our logical backup drive
After successful execution, you cannot run this code again since it already exists1
Then we will now backup our database with the following code:
As I said(or typed :o)) earlier, you should make sure that the path you created exists2.
BACKUP DATABASE Northwind TO NWINDBackup
Restore
Now we will restore are database based on the backup file we have created.
RESTORE DATABASE Northwind FROM NWINDBackupThe syntax follows as:
RESTORE DATABASE [your db name] FROM [logical drive]
Notes:
1"Honestly, I haven't figured out yet how to alter that logical backup thing but please stay tuned for updates. You can also post some suggestions for this"-jereme
2. Tip: Or at least tell your front end application to create folders if it does not exist.
Thursday, April 8, 2010
Query Displayer JAVA Program
As a continuation for my earlier post in JDBC, here is a sample program I got from Java™ How to Program, by H.M. Deitel,
It looks like a query analyzer. You can use this to test the retrieval of data.
You can download the source at:
Query Displayer.zip
Just modify the following lines of code on DisplayQueryResults.java
For a copy of the ebook Java how to Program, visit
javaforbidden.4shared.com
The password is: itspot
(shhh... please don't tell them about this, ok?)
It looks like a query analyzer. You can use this to test the retrieval of data.
You can download the source at:
Query Displayer.zip
Just modify the following lines of code on DisplayQueryResults.java
static final String JDBC_DRIVER = "sun.jdbc.odbc.JdbcOdbcDriver"; static final String DATABASE_URL = "jdbc:odbc:NWIND"; static final String USERNAME= ""; static final String PASSWORD= ""; // default query selects all rows from authors table static final String DEFAULT_QUERY = "SELECT * FROM Products";
For a copy of the ebook Java how to Program, visit
javaforbidden.4shared.com
The password is: itspot
(shhh... please don't tell them about this, ok?)
Sunday, March 28, 2010
Detailed Instructions on How to Download SharpDevelop and .NET Framework 3.5 SP1
This is the first time I do the posting here. The guy who is behind this blog (site specifically for all geeks like us) always asks me to post something useful like articles, tutorials and other things which can grasp your interests. Hope you like my first tutorial.





This is the present view (as of March 29, 2010) of the link I provided on his latest post.
To start using SharpDevelop, you need first to download it. Click LABEL 1 (refer to the image above) to download it to your computer. You will be transferred into their download page and save dialog box will appear.
Go to the directory you want this installer to save. Example, I want it to save in c drive.
SharpDevelop_3.2.0.5505_setup.msi will be saved in Local Drive (C:).
After you download it, .NET Framework is also needed in order your program to run. And that is .NET Framework 3.5 SP1 to be specific.
Follow these steps to have it:
1. Click LABEL 2 (refer to the first image above).
2. You will be transferred to this page:
3. Click Download
4. Microsoft download page will load upon doing step 3.
5. If the download does not start after 30 seconds, click the Start Download link.
Save dialog box will appear and asking you where to put it. After choosing the desired location, click save to download it.
6. And voila! You have it.
After you install all of these installers, (.NET Framework should be installed first before the SharpDevelop) you can start using it and develop your first program in whatever programming language you prefer. (either in vb, c# and others)
Hope this tutorial will be a help guys! Have a happy and enjoyable life. See you on my next post! ^^,
Tuesday, November 17, 2009
Using Continue
In Programming languages such as C/C++, JAVA, PHP, Python.. etc the keyword continue is a jump statement like break and goto.
This is used to skip inside an iteration.
An example for this is the following for loop statement that prints all even numbers from 0 - 10.
The code is written in C Language (actually it is more like an algotithm)
so even JAVA programmers can easily translate them.
Another example, for more sophisticated programming, continue may be also used for deleting entries in file manipulation.
This is used to skip inside an iteration.
An example for this is the following for loop statement that prints all even numbers from 0 - 10.
for(int num = 0;num <= 10; num++){ if ((num % 2) > 0) continue; printf("%d ", num); }
The code is written in C Language (actually it is more like an algotithm)
so even JAVA programmers can easily translate them.
Another example, for more sophisticated programming, continue may be also used for deleting entries in file manipulation.
Labels:
C/C++,
Development,
JAVA,
Lesson,
Programming,
Tips,
Tutorials
Subscribe to:
Posts (Atom)