Re: Where are Views, stored procedures, stored?



SQL VIEW and TABLE are objects of type *FILE; a VIEW is implemented as a LF [Logical File] extended attribute, and the TABLE is implemented as a PF [Physical File] extended attribute. The SQL INDEX in DB2 for i5/OS is also of type *FILE, implemented as a keyed LF.
SQL Stored Procedures are objects of type *PGM
SQL Functions are modules as part of object type *SRVPGM

External Stored Procedures and External User Defined Functions are entries in an SQL Catalog TABLE [the SYSROUTINE TABLE stores procedure and function entries as rows, SYSPROCS VIEW and SYSFUNCS VIEW divide those rows] which may or may not have a self-describing *PGM or *SRVPGM associated. If the external/referenced object exists before the CREATE statement, and the reference object is capable of becoming self-described [a message is issued during CREATE if not], then future save and restore activity will enable the object to self-register upon [create at/for] restore. This does not attempt to explain REXX nor JAVA, which may be different.

The aforementioned External Object Types [*FILE, *PGM, *SRVPGM] are stored in *LIB objects, in the /QSYS.LIB file system. The SAVLIB and SAVOBJ commands are used to save almost any external object type, such as *FILE. RSTLIB and RSTOBJ commands are the counterparts, used to restore the objects. SAV and RST commands can be used to save and restore objects from that, and the other file systems; maybe not for /QDLS, but if not, it has SAVDLO and RSTDLO.

Regards, Chuck
--
All comments provided "as is" with no warranties of any kind whatsoever and may not represent positions, strategies, nor views of my employer

CENTRINO wrote:
Where are stored procedures, views etc, stored? Are they objects for the
OS/400 as Logical files or Physical files? how to save and restore them?
.



Relevant Pages

  • Re: Sql 7 to Sql2000
    ... When I try to restore a backup file from Sql 7 to my Sql 2000 server I get this message. ... Logical file 'SqlScrpDb' is not part of database SqlScrpDb. ...
    (microsoft.public.sqlserver.clients)
  • Re: SQLDUMPER library error message (PLEASE HELP)
    ... I ran services.msc and disabelled SQL Server VSS ... >>> Accounting 2007, a new program that I do not even know when or why I ... >> an MS Office 2007 trial - or do a System Restore. ... you'll see an entry made just ...
    (microsoft.public.windowsxp.general)
  • Re: Migration ?
    ... I've tried every way I can think of trying to restore the master database. ... Will a restore on the SQL ... Install a SQL Server failover cluster instance ...
    (microsoft.public.sqlserver.clustering)
  • Re: Migration ?
    ... During a restore, all of the metadata is upgraded. ... Moving the Master and MSDB database, what if the old server where those ... Will a restore on the SQL ... Install a SQL Server failover cluster instance ...
    (microsoft.public.sqlserver.clustering)
  • Re: Restoring a SSP 3.0
    ... Also make sure this accounts are configured correctly in the IIS application ... Backup ContentDB in SQL Server using SQL Managagement Studio ... Restore the ContentDB from step 1 to new env. ...
    (microsoft.public.sharepoint.portalserver)