C:\Users\AnilBalwani> java -jar C:\Users\AnilBalwani\Downloads\db-derby-10.14.2.0-bin\db-derby-10.14.2.0-bin\lib\derbyrun.jar
Usage:
java -jar derbyrun.jar ij [-p propertiesfile] [sql script]
java -jar derbyrun.jar sysinfo [-cp ...] [-cp help]
java -jar derbyrun.jar dblook [args] (or no arguments for usage)
java -jar derbyrun.jar server [args] (or no arguments for usage)
java -jar derbyrun.jar SignatureChecker [args]
java -jar derbyrun.jar PlanExporter [args]
C:\Users\AnilBalwani> java -jar C:\Users\AnilBalwani\Downloads\db-derby-10.14.2.0-bin\db-derby-10.14.2.0-bin\lib\derbyrun.jar ij
ij version 10.14
ij> CONNECT 'jdbc:derby:booksdb;create=true';
ij> CREATE TABLE book (book_id int primary key, title varchar(64));
0 rows inserted/updated/deleted
ij> INSERT INTO book VALUES (1, 'Core Java'), (2, 'Thinking in Java'), (3, 'Effective Java');
3 rows inserted/updated/deleted
ij> CONNECT 'jdbc:derby://localhost:1527/projects;create=true';
ERROR 08001: java.net.ConnectException : Error connecting to server localhost on port 1,527 with message Connection refused: connect.
ij> CONNECT 'jdbc:derby://localhost:1527/booksdb;create=true';
ERROR 08001: java.net.ConnectException : Error connecting to server localhost on port 1,527 with message Connection refused: connect.
ij> exit
> ;
C:\Users\AnilBalwani>java -jar C:\Users\AnilBalwani\Downloads\db-derby-10.14.2.0-bin\db-derby-10.14.2.0-bin\lib\derbyrun.jar server start
Wed Apr 29 23:59:22 IST 2020 : Security manager installed using the Basic server security policy.
Wed Apr 29 23:59:27 IST 2020 : Apache Derby Network Server - 10.14.2.0 - (1828579) started and ready to accept connections on port 1527
Open another command prompt
C:\Users\AnilBalwani>java -jar C:\Users\AnilBalwani\Downloads\db-derby-10.14.2.0-bin\db-derby-10.14.2.0-bin\lib\derbyrun.jar ij
ij version 10.14
ij> CONNECT 'jdbc:derby://localhost:1527/library;create=true';
ij> CREATE TABLE book(book_id int primary key, book_name varchar(32));
0 rows inserted/updated/deleted
ij> INSERT INTO project VALUES (1, 'Java'), (2, '.Net'), (3, 'Maximo');
3 rows inserted/updated/deleted
ij> SELECT * FROM project;
PROJECT_ID |PROJECT_NAME
--------------------------------------------
1 |Java
2 |.Net
3 |Maximo
3 rows selected
ij>
Usage:
java -jar derbyrun.jar ij [-p propertiesfile] [sql script]
java -jar derbyrun.jar sysinfo [-cp ...] [-cp help]
java -jar derbyrun.jar dblook [args] (or no arguments for usage)
java -jar derbyrun.jar server [args] (or no arguments for usage)
java -jar derbyrun.jar SignatureChecker [args]
java -jar derbyrun.jar PlanExporter [args]
C:\Users\AnilBalwani> java -jar C:\Users\AnilBalwani\Downloads\db-derby-10.14.2.0-bin\db-derby-10.14.2.0-bin\lib\derbyrun.jar ij
ij version 10.14
ij> CONNECT 'jdbc:derby:booksdb;create=true';
ij> CREATE TABLE book (book_id int primary key, title varchar(64));
0 rows inserted/updated/deleted
ij> INSERT INTO book VALUES (1, 'Core Java'), (2, 'Thinking in Java'), (3, 'Effective Java');
3 rows inserted/updated/deleted
ij> CONNECT 'jdbc:derby://localhost:1527/projects;create=true';
ERROR 08001: java.net.ConnectException : Error connecting to server localhost on port 1,527 with message Connection refused: connect.
ij> CONNECT 'jdbc:derby://localhost:1527/booksdb;create=true';
ERROR 08001: java.net.ConnectException : Error connecting to server localhost on port 1,527 with message Connection refused: connect.
ij> exit
> ;
C:\Users\AnilBalwani>java -jar C:\Users\AnilBalwani\Downloads\db-derby-10.14.2.0-bin\db-derby-10.14.2.0-bin\lib\derbyrun.jar server start
Wed Apr 29 23:59:22 IST 2020 : Security manager installed using the Basic server security policy.
Wed Apr 29 23:59:27 IST 2020 : Apache Derby Network Server - 10.14.2.0 - (1828579) started and ready to accept connections on port 1527
Open another command prompt
C:\Users\AnilBalwani>java -jar C:\Users\AnilBalwani\Downloads\db-derby-10.14.2.0-bin\db-derby-10.14.2.0-bin\lib\derbyrun.jar ij
ij version 10.14
ij> CONNECT 'jdbc:derby://localhost:1527/library;create=true';
ij> CREATE TABLE book(book_id int primary key, book_name varchar(32));
0 rows inserted/updated/deleted
ij> INSERT INTO project VALUES (1, 'Java'), (2, '.Net'), (3, 'Maximo');
3 rows inserted/updated/deleted
ij> SELECT * FROM project;
PROJECT_ID |PROJECT_NAME
--------------------------------------------
1 |Java
2 |.Net
3 |Maximo
3 rows selected
ij>
Comments
Post a Comment