4.启动oracle服务,Windows服务:方便地启动Oracle服务

9i有多个系统服务必须都启动之后才能正常工作,但逐个启动比较费事,多数学习但机器又不是太好的朋友也不能容忍每次都自动启动Oracle服务(那样512MB的内存在启动时就所剩无几了),所以通常都是要用了再启动,这里给出了批量启动windows系统服务的一个例子,介绍了操控windows系统服务的技巧:

首先新建一个 Application工程,取名为Oracle Starter

粘贴如下代码文件:

Form1.Designer.vbPartial Public Class Form1

Inherits System..Forms.Form

_

Public Sub New()

MyBase.New()

''''This call is required by the Windows Form Designer.

InitializeComponent()

End Sub

''''Form overrides dispose to clean up the component list.

_

Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)

If disposing AndAlso components IsNot Nothing Then

components.Dispose()

End If

MyBase.Dispose(disposing)

End Sub

''''Required by the Windows Form Designer

Private components As System.ComponentModel.IContainer

''''NOTE: The following procedure is required by the Windows Form Designer

''''It can be modified using the Windows Form Designer.

''''Do not modify it using the code editor.

_

Private Sub InitializeComponent()

Me.Label1 = New System.Windows.Forms.Label

Me.ListBox1 = New System.Windows.Forms.ListBox

Me.Button1 = New System.Windows.Forms.Button

Me.Button2 = New System.Windows.Forms.Button

Me.SuspendLayout()

''''

''''Label1

''''

Me.Label1.AutoSize = True

Me.Label1.Font = New System.Drawing.Font("Tahoma", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))

Me.Label1.Location = New System.Drawing.Point(13, 13)

Me.Label1.Name = "Label1"

Me.Label1.Size = New System.Drawing.Size(122, 22)

Me.Label1.TabIndex = 0

Me.Label1.Text = "Oracle Starter"

''''

''''ListBox1

''''

Me.ListBox1.Font = New System.Drawing.Font("Tahoma", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))

Me.ListBox1.FormattingEnabled = True

Me.ListBox1.ItemHeight = 19

Me.ListBox1.Location = New System.Drawing.Point(13, 75)

Me.ListBox1.Name = "ListBox1"

Me.ListBox1.Size = New System.Drawing.Size(436, 175)

Me.ListBox1.TabIndex = 1

''''

''''Button1

''''

Me.Button1.Location = New System.Drawing.Point(322, 257)

Me.Button1.Name = "Button1"

Me.Button1.Size = New System.Drawing.Size(127, 34)

Me.Button1.TabIndex = 2

Me.Button1.Text = "Stop all services"

''''

''''Button2

''''

Me.Button2.Location = New System.Drawing.Point(188, 258)

Me.Button2.Name = "Button2"

Me.Button2.Size = New System.Drawing.Size(127, 34)

Me.Button2.TabIndex = 3

Me.Button2.Text = "Start all servies"

''''

''''Form1

''''

Me.AutoScaleBaseSize = New System.Drawing.Size(6, 14)

Me.ClientSize = New System.Drawing.Size(461, 304)

Me.Controls.Add(Me.Button2)

Me.Controls.Add(Me.Button1)

Me.Controls.Add(Me.ListBox1)

Me.Controls.Add(Me.Label1)

Me.Name = "Form1"

Me.Text = "Oracle Starter"

Me.ResumeLayout(False)

Me.PerformLayout()

End Sub

Friend WithEvents Label1 As System.Windows.Forms.Label

Friend WithEvents ListBox1 As System.Windows.Forms.ListBox

Friend WithEvents Button1 As System.Windows.Forms.Button

Friend WithEvents Button2 As System.Windows.Forms.Button

End Class

[1]

【责编:Peng】

--------------------next---------------------

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值