Java EE 7 教程 第一部分 简介 第2章 使用教程示例 第2.4节 启动和停止Java DB服务器

本文介绍了如何通过命令行及NetBeans IDE启动和停止GlassFish服务器内置的JavaDB数据库服务器。用户可以通过执行特定命令实现服务器的启动与关闭,也可以利用NetBeans IDE的图形界面进行操作。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

原文:http://docs.oracle.com/javaee/7/tutorial/doc/usingexamples004.htm

翻译:石卓林 shizhuolin@hotmail.com

2.4 Starting and Stopping the Java DB Server

GlassFish Server includes the Java DB database server.

To start the Java DB server from the command line, open a terminal window or command prompt and execute:

asadmin start-database

To stop the Java DB server from the command line, open a terminal window or command prompt and execute:

asadmin stop-database

For information about the Java DB included with GlassFish Server, see http://www.oracle.com/technetwork/java/javadb/overview/index.html.

2.4 启动和停止Java DB服务器

GlassFish服务器内含Java DB数据库服务器.

要从命令行启动Java DB服务器, 打开一个终端窗口或命令提示框并执行:

asadmin start-database

要从命令行停止Java DB服务器, 打开一个终端窗口或命令提示框并执行:

asadmin stop-database

关于GlassFish服务器内含Java DB更多信息, 参看 http://www.oracle.com/technetwork/java/javadb/overview/index.html.

2.4.1 To Start the Database Server Using NetBeans IDE

When you start GlassFish Server using NetBeans IDE, the database server starts automatically. If you ever need to start the server manually, however, follow these steps.

  1. Click the Services tab.
  2. Expand Databases.
  3. Right-click Java DB and select Start Server.

Next Steps

To stop the database using NetBeans IDE, right-click Java DB and select Stop Server.

2.4.1 使用NetBeans IDE启动数据库服务器

当你使用NetBeans IDE启动GlassFish服务器时, 数据库服务器也被自动启动. 如果你需要手动启动服务器管理,执行以下这些步骤.

  1. 点击Services选项卡.
  2. 展开Databases.
  3. 右击Java DB并选择Start Server.

下一步骤

要使用NetBeans IDE停止数据库, 右击Java DB并选择Stop Server.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值