Want to backup or restore databases but do not know how?
Maybe this can help you to backup or restore database using vb.net and sql server 2005.
The first add a reference Database Management Objects (DMO) Library to use the classes that will be used to our project, right click on the project, "Add Reference", click the tab "COM", locate the component whose name is "Microsoft SQL DMO Object Library", then click ok.
The following script will run in the form :
Dim _SQLServer As New SQLDMO.SQLServer
Dim WithEvents _Backup As New SQLDMO.Backup
Dim WithEvents _Restore As New SQLDMO.Restore
Dim _INSTANCE As String = "YourMSSQLInstanceName/ServerName"
Dim _USER As String = "YourMSSQLUserLogin"
Dim _PWD As String = "YourLoginPassword"
Dim _BACKUPFILE As String = "c:\MyBackup.bkp"
Dim _DATABASE As String = "YourDbName"
create procedures for backup and restore :
backup procedure:
Private Sub BackupDB()
With _Backup
.Files = _BACKUPFILE
.Database = _DATABASE
.BackupSetName = "MyDbBackupNameSet"
.BackupSetDescription = "Backup from VB.NET application"
_SQLServer.Connect(_INSTANCE, _USER, _PWD)
.SQLBackup(_SQLServer)
End With
MessageBox.Show("Backup berhasil dibuat", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information)
End Sub
restore procedure:
Private Sub RestoreDB()
With oRestore
.Files = _BACKUPFILE
.Database = _DATABASE
.ReplaceDatabase = True
_SQLServer.Connect(_INSTANCE, _USER, _PWD)
.SQLRestore(_SQLServer)
End With
MessageBox.Show("Restore Successfull", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information)
End Sub
To perform backup / restore, we only live call the procedure above.
The example above is only the basis of how we can do backup / restore DB.
We can add "SaveFileDialog" for backups and "OpenFileDialog" to restore order to determine the location and the backup filename.
Good Luck!
» Read More...
Clustering is the ability of Windows Server 2003 to create a server-based application that is scalable and reliable by regulating the balance of client data traffic across multiple servers and provide a backup server when another server is damaged
Technology of Clustering
In windows server 2003 there are two kinds of clulsters technology, Server Cluster and Network Load Balancing Clusters. the difference lies in the type of application you run, and the characteristics of the data used.
- Server Cluster
Server clusters are designed for the long-running applications on the memory state or the application for which data are large and frequently changing, commonly known as statefull applications and contains a database server such as Microsoft SQL, Exchange servers, file servers and printers. All nodes in this cluster are connected by a set of data shared SCSI bus or SAN - storage area network. all nodes have access to the same application data, and each node can process the client request at any time. You can configure each node of the cluster is to be passive or active. Active nodes that can receive and process requests from clients, while the passive node is idle and serves as a "fallback" if the active node fails.
This is exemplified in the following figure there are two servers that form a cluster in which both are running Windows Server 2003 and Microsoft SQL server, each server connected to the same NAS device that contains the database. Both servers also have a special connection that is used to detect heart rate respectively in case of malfunction.
Server A serves as an active node while server B serves as a passive node. Server A is functioning normally all the time, running a database application, receiving requests from the clients database, and accessing the database files on NAS devices. However, but suddenly server A for some reason fails to function, then the server B as the passive node detects a failure of the active server function and immediately became an Active node replaces the function of the server A, processes the request clients use the same database on the NAS.
- Just like NLB, server cluster also has a separate name and IP address with the IP address of each node. When the active node fails, no change in perceived function on clients, because the system handled directly by the passive node or if the X-Node Clustering passive node is a node survival.
- Server clusters can only run on a system windows server 2003 Enterprise and Datacenter editions only, for Windows 2003 Standard edition can only run NLB. Each node may not use a different windows 2003 edition, must be uniform, Enterprise or Datacenter editions only.
- The maximum can be up to 8 nodes that could serve each failover and failback. Failback is not configured by default, so it must be configured manually or automatically. Most practitioners do manual configuration for failback to be able to evaluate the function of the node failure.
- Requires special hardware disk drives eg Fibre Channel, Shared SCSI or SAN. Fibre Channel is a high-speed serial network technology up to 100 Mbytes per second using full-duplex communication. While SCSI uses parallel signal technology.
- Used in SQL Server, MS Exchange, File and Print servers etc..
X-Node Clustering
Significant development in the system cluster in windows server 2003 is the number of nodes that can be up to 8 nodes for failover and failback. X node clustering gives us the option to create a minimum of 2 nodes with a maximum up to 8 node failover / failback.
- Network Load Balancing (NLB) Cluster
Network Load Balancing in Windows 2003 is a type of clustering is more easily installed, configured, and maintain. You can use existing hardware and applications on your computer and no longer need additional software to install. You can use the application in windows 2003 it is "Network load balancing manager" to make, manage, and monitoring the NLB cluster. NLB's run more applications stateles memory, usually in the form of data that are not frequently changed.
- Supported by all platforms of Windows Server 2003 Standard, Enterprise and Datacenter.
- Can use up to 32 server nodes of load balancing, where each other has a duplicate copy of the application that you want to give to the clients.
- Full load balancing for TCP and UDP traffic
- Can be used for various types of servers such as WEB, ISA, VPN, Media Server, and Terminal Server
» Read More...
You have a secret that you are not ready to reveal to your mother, boyfriend, or your husband now, but plan on 2 or 5 or even 20 years later you will reveal your secrets to him/her? You can do the admission right now, you do not need to wait 2, 3 or even 20 years later. Don't worry, your mother, lover, or your husband will know it at 2, 3, or 20 years later.
how can?
with the email application below, you can send an email now but your recipient does not receive it immediately after you send it, your email recipients will receive an email that you send in accordance with the time you specify.
Cool isn't it?
For example: you want to tell a big secret to your boyfriend next 2 years, you send a letter now and your boyfriend will
receive your letter two years later, "this letter I sent two years ago, I wanted to let you know that all this time I do not love you but just want your money ". haha ... ^ ^ y
want to try it? Please click the link below:
- Future Me
- Letter Me Later
Enjoy it... ^^d
» Read More...
Suspect database status is often the case in SQL Server 2005/2000, this is because a lot of things, one of them because of power outages. There are several ways to restore the database with the status of suspect, one of them as below:
- In Enterprise Manager SQL Server 2000 / 2xxx, create a database with the same name as the database is corrupted
- Point the database file and log the new database according to the location of the damaged database file.
- Stop the SQL Server service.
- Replace or copy the database file (. mdf and. ldf) which supect to the directory or folder newly created database file.
- Run the following scripts in Query Analyzer :
use master
go
sp_configure ‘allow updates’, 1
go
select status from sysdatabases where name = ‘nama database’
update sysdatabases set status= 32768 where name = ‘nama database’
- Create a bin database, for example: db_generate (you can make it with whatever name you want)
- Right click on the first database, then select All Task, and then select Export. Then navigate the destination dabatase to the bin database created earlier.
- Click on the process to completion. Congratulations, you got back data from damaged database in the bin database that you created.
- Run the script below in Query Analyzer :
use master
go
sp_configure ‘allow updates’,
go
SQLServerRecoveryToolboxSetup : This is software for recovery sql server, I've never tried. but if you need it please click to download.
Tips: Backup first your database files that will be used in repair
» Read More...
Spam or junk mail is an abuse of the electronic news delivery to display advertisements news and other necessities causing discomfort to the web users. Spam is commonly known spam e-mail (electronic messaging), instant messaging spam, Usenet newsgroup spam, Web search engine spam, spam blogs, spam news on mobile phones, Internet forum spam, and others. Spam is very annoying because it usually comes a barrage of unsolicited and often unwanted by the recipient.
At each mail server, usually already have systems against spam filters. So you do not have to worry if your email got spam / junk. For example one of the mail server who has been very widely used ie gmail, already has an automatic "gmail spam filter" systems.
"Gmail spam filters" also work in IMAP client, automatically insert messages into the spam folder if the message is suspected gmail as a spam. So gmail suggests to turn off "spam filter" system that is in your IMAP client.
» Read More...
|
rj45 Configuration : Connector of RJ45 |
RJ-45 Ethernet cable is commonly used in LAN computer networking topology or other types of computer networks. RJ-45 has a three kinds of configuration, according to the devices that want to relate.
1. Straight Through Configuration
This cable type used to connect network devices with different levels of hierarchy. An example is when we connected the PC to our computers in the office network through a switch. This cable type is more commonly used and relatively easy in the arranging of the cable when installing the RJ-45 connectors. The following color scheme for the type of cable RJ-45 Straight Through:
|
rj45 Configuration : 10 base T Standard Patch Cable |
2. Cross Over Configuration
This type of cable used to connect two network devices with a hierarchy level. As an example, connection between PC to PC, or PC to the AP Radio, router to router. This is the following configuration:
|
rj45 Configuration : 10 Base T Cross Over Cable |
- Peel both ends of the outer skin using utp cable crimping blade or scissors, with a length approximately 1.5cm, like this:
|
rj45 Configuration : After UTP Cable Outer Skin Peeled |
- Sort the colors by the rules if one end of the cable using the T568A configuration, then the other end of cable use the T568B. (The configuration can be seen in the figure below)
|
rj45 Configuration : Configuration Cable T568A and T568B |
- After both ends of the sorted color according to the above configuration, align the ends of the cable utp with cut a little part of the cable (do not have the peel cord), the result will look like this:
|
rj45 Configuration : UTP Cable That Has Been Flattened Ends |
- Insert the cable into the RJ -45 carefully, should not be confused order, then the result will be like this:
|
rj45 Configuration : UTP Cable is inserted to the RJ -45 |
- Then Crimping / clasp the cable using a crimping pliers until you hear a click. (Remember the crimping should not be too hard hit because it will cause a broken connector).
|
rj45 Configuration : Crimping UTP Cable |
3. Rollover Cover
Cables of this type typically used to access the router with a PC / laptop. This type of cable configuration is quite simple because we just reverse the order of cables that we put on one side. Suppose we use a standard 568B (standard for wired straight through), then we just reverse the order to brown for the first sequence at the other end of the cable. The following descriptions to help us make a rollover cable.
» Read More...