[ mssql ] create ODC file from the Excel to use in another program

Do 1. 2. like [ mssql ] query OLAP cube from the Excel

, but on 2. clear checkbox `Connect to a specific cube or table`.

3. Click Property

Image

4.

Image

Advertisements

[ oracle ] export sql oracle command line

use DBMS_METADATA package

Syntax

DBMS_METADATA.GET_DDL (
object_type     IN VARCHAR2,
name            IN VARCHAR2,
schema          IN VARCHAR2 DEFAULT NULL,
version         IN VARCHAR2 DEFAULT 'COMPATIBLE',
model           IN VARCHAR2 DEFAULT 'ORACLE',
transform       IN VARCHAR2 DEFAULT 'DDL')
RETURN CLOB;

object_type

 ASSOCIATION
 AUDIT
 AUDIT_OBJ
 CLUSTER
 COMMENT
 CONSTRAINT
 CONTEXT
 DB_LINK
 DEFAULT_ROLE
 DIMENSION
 DIRECTORY
 FUNCTION
 INDEX
 INDEXTYPE
JAVA_SOURCE
LIBRARY
MATERIALIZED_VIEW
MATERIALIZED_VIEW_LOG
OBJECT_GRANT
OPERATOR
OUTLINE
PACKAGE
PACKAGE_SPEC
PACKAGE_BODY
PROCEDURE
PROFILE
PROXY
REF_CONSTRAINT
ROLE
ROLE_GRANT
ROLLBACK_SEGMENT
SEQUENCE
SYNONYM
SYSTEM_GRANT
TABLE
TABLESPACE
TABLESPACE_QUOTA
TRIGGER
TRUSTED_DB_LINK
TYPE
TYPE_SPEC
TYPE_BODY
USER
VIEW 

NOTE:

– PACKAGE will export both PACKAGE_SPEC and PACKAGE_BODY

– TYPE will export both TYPE_SPEC and TYPE_BODY

– to exclude the table detail, i.e. tablespace storage, etc., use the below anonymous block

BEGIN
DBMS_METADATA.SET_TRANSFORM_PARAM(DBMS_METADATA.SESSION_TRANSFORM,'STORAGE',FALSE);
DBMS_METADATA.SET_TRANSFORM_PARAM(DBMS_METADATA.SESSION_TRANSFORM,'TABLESPACE',FALSE);
DBMS_METADATA.SET_TRANSFORM_PARAM(DBMS_METADATA.SESSION_TRANSFORM,'SEGMENT_ATTRIBUTES',FALSE);
END;

– to extract w/o schema, use the add the below command to the anonymous block

 DBMS_METADATA.SET_TRANSFORM_PARAM(DBMS_METADATA.SESSION_TRANSFORM,'EMIT_SCHEMA', false);

ref : oracle, yanfeng