Last active
August 21, 2016 20:38
-
-
Save phpdave/124d5814121243555ad1dfb08054e435 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--DROP TABLE PHP_DAVE1.MYTABLE; | |
CREATE OR REPLACE TABLE PHP_DAVE1.MYTABLE | |
( | |
NAME VARCHAR(150), | |
PRIMARY KEY( NAME ) | |
); | |
INSERT INTO PHP_DAVE1.MYTABLE (NAME) VALUES ('JOE SCHMOE'); | |
SELECT * FROM PHP_DAVE1.MYTABLE; | |
--Attempting to add journaling so that that NetBeans will not mark the table as read only? | |
--Code Below ran through IBM i ACS | |
CL: CRTJRNRCV JRNRCV(PHP_DAVE1/MYJOURNALR) ; | |
CL: CRTJRN JRN(PHP_DAVE1/MYJOURNAL1) JRNRCV(PHP_DAVE1/MYJOURNALR) ; | |
CL: STRJRNPF FILE(MYTABLE) JRN(PHP_DAVE1/MYJOURNAL1); | |
-- Attempting what Buck said about DSPFD | |
DSPFD FILE(PHP_DAVE1/MYTABLE) | |
--Output: Members for file MYTABLE in PHP_DAVE1 not available. | |
CREATE SCHEMA PHP_DAVE3; | |
--Output: Error code -552, SQL state 42502: [SQL0552] Not authorized to CREATE DATABASE. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Insert failed after adding Primary Key constraint. So will need to add journaling.
Error code -7008, SQL state 55019: [SQL7008] MYTABLE in PHP_DAVE1 not valid for operation. Cause . . . . . : The reason code is 3. Reason codes are: 1 -- MYTABLE has no members. 2 -- MYTABLE has been saved with storage free. 3 -- MYTABLE not journaled, no authority to the journal, or the journal state is _STANDBY. Files with an RI constraint action of CASCADE, SET NULL, or SET DEFAULT must be journaled to the same journal. 4 and 5 -- MYTABLE is in or being created into production library but the user has debug mode UPDPROD(_NO). 6 -- Schema being created, but user in debug mode with UPDPROD(_NO). 7 -- A based-on table used in creation of a view is not valid. Either the table is program described table or it is in a temporary schema. 8 -- Based-on table resides in a different ASP than ASP of object being created. 9 -- Index is currently held or is not valid. 10 -- A constraint or trigger is being added to an invalid type of table, or the maximum number of triggers has been reached, or all nodes of the distributed table are not at the same release level. 11 -- Distributed table is being created in schema QTEMP, or a view is being created over more than one distributed table. 12 -- Table could not be created in QTEMP, QSYS, QSYS2, or SYSIBM because it contains a column of type DATALINK having the FILE LINK CONTROL option. 13 -- The table contains a DATALINK, LOB, or XML column that conflicts with the data dictionary. 14 -- A DATALINK, LOB, XML, or IDENTITY column cannot be added to a non SQL table. 15 -- Attempted to create or change an object using a commitment definition in a different ASP. 16 -- Sequence MYTABLE in PHP_DAVE1 was incorrectly modified with a CL command. 17 -- The table is not usable because it contains partial transactions. Recovery . . . : Do one of the following based on the reason code: 1 -- Add a member to MYTABLE (ADDPFM). 2 -- Restore MYTABLE (RSTOBJ). 3 -- Start journaling on MYTABLE (STRJRNPF), get access to the journal, or change the journal state to *ACTIVE (CHGJRN). 4, 5, or 6 -- Perform a CHGDBG command with UPDPROD(_YES). 7 -- Remove table names which identify files in QTEMP or program described files. 8 -- Use tables in the same ASP. 9 -- Use the EDTRBDAP command to change the sequence of the access path from HELD to 1-99 or *OPN, or rebuild or delete the unique index or constraint. 10 -- Specify tables that are valid for constraints or triggers. 11 -- Specify a schema other than QTEMP, or create the view over only one distributed table. 12 -- Specify a schema other than QTEMP, QSYS, QSYS2, or SYSIBM. 13 -- Specify a schema that does not contain a data dictionary or remove all DATALINK, LOB, and XML columns. 14 -- Specify an SQL table. 15 -- Specify an object in the same ASP as the current commitment definition or end the current commitment definition. 16 -- Specify a different sequence, or delete the data area associated with sequence MYTABLE in PHP_DAVE1 and recreate the sequence. 17 -- See previous message in the job log.
Line 7, column 1