************************
1)
set echo off
set heading off
set feedback off
set verify off
set pagesize 0
set linesize 132
define schema=&1
set pagesize 0
set long 90000
set feedback off
set echo off
spool scott_schema.sql
connect scott/tiger;
SELECT DBMS_METADATA.GET_DDL('TABLE',u.table_name)
FROM USER_TABLES u;
SELECT DBMS_METADATA.GET_DDL('INDEX',u.index_name)
FROM USER_INDEXES u;
spool off;
2) decode, case when,
3) tnsnames.ora &tnsping
4) SYS? SYSTEM>
5) who am I in oracle?
show user;
6) how to disconnect?
disc
7)Partitioned Tables And Indexes
https://oracle-base.com/articles/8i/partitioned-tables-and-indexes
8)views
9) materialized views
https://oracle-base.com/articles/misc/materialized-views
10)Difference between Views and Materialized Views in SQL
1) execution plan
2) performance and tuning
3)indexes
4)ROWNUM or ROWID
5) stored procedures
6)SOME TRUE if any of the subquery values meet the condition
7) subqueries
SELECT column_name(s)
FROM table_name
WHERE column_name IN (SELECT STATEMENT);
8) where not
SQL> select distinct job from emp where not job='PRESIDENT';
JOB
---------
CLERK
SALESMAN
MANAGER
ANALYST
SQL> select distinct job from emp where job!='PRESIDENT';
JOB
---------
CLERK
SALESMAN
MANAGER
ANALYST
SQL> select distinct job from emp where job<>'PRESIDENT';
JOB
---------
CLERK
SALESMAN
MANAGER
ANALYST
9)select 'D' from table (dev) or select 'P' from table (prod)
datastage variable: %ENV%
select * from x
where
'%ENV%' = 'D' and ...
or
'%ENV%' = 'P' and ...
10) limiting rows
select top 5 * from table (sqlserver)
select * from table
fetch first 5 rows only (db2)
select * from table
limit 100 (db2)
select * from table
where rownum>5 (oracle)
mardi 20 octobre 2020
10 oracle tips part 3
lundi 19 octobre 2020
10 oracle tips part2
1) comparing dates. How do I compare dates in Oracle?
char VS char
select dateaniv from test2 where to_char(dateaniv,'dd/mm/yyyy')='12/06/1977';
date VS date (better)
select dateaniv from test2 where dateaniv=to_date('12/06/1977','dd/mm/yyyy')
Comparing dates the wrong way
These Oracle date comparisons works, but no index cannot be used because date2 is invalidated with the trunc function (unless you create a function-based index on trunc(date2,'YYYY:MM').
where to_char(DATE1,'YYYY:MM') >= to_char(DATE2,'YYYY:MM')
where trunc(date1,'mm') >= trunc(date2,'mm');
2) UNION and UNION ALL
There are exhaustive notes on how the Oracle SQL UNION operator is used to merge separate SQL queries, but there is an important difference between UNION and UNION ALL.
The Oracle SQL UNION differs from the Oracle UNION ALL primarily because it does not filter out duplicate rows.
The UNION SQL operator returns only the unique rows that appear in either result, while the UNION ALL operator returns all rows in both queries, including duplicate rows.
3) WITH Clause : Subquery Factoring in Oracle
Using the SCOTT schema, for each employee we want to know how many other people are in their department. Using an inline view we might do the following.
-- Non-ANSI Syntax
SELECT e.ename AS employee_name,
dc.dept_count AS emp_dept_count
FROM emp e,
(SELECT deptno, COUNT(*) AS dept_count
FROM emp
GROUP BY deptno) dc
WHERE e.deptno = dc.deptno;
-- ANSI Syntax
SELECT e.ename AS employee_name,
dc.dept_count AS emp_dept_count
FROM emp e
JOIN (SELECT deptno, COUNT(*) AS dept_count
FROM emp
GROUP BY deptno) dc
ON e.deptno = dc.deptno;
Using a WITH clause this would look like the following.
-- Non-ANSI Syntax
WITH dept_count AS (
SELECT deptno, COUNT(*) AS dept_count
FROM emp
GROUP BY deptno)
SELECT e.ename AS employee_name,
dc.dept_count AS emp_dept_count
FROM emp e,
dept_count dc
WHERE e.deptno = dc.deptno;
-- ANSI Syntax
WITH dept_count AS (
SELECT deptno, COUNT(*) AS dept_count
FROM emp
GROUP BY deptno)
SELECT e.ename AS employee_name,
dc.dept_count AS emp_dept_count
FROM emp e
JOIN dept_count dc ON e.deptno = dc.deptno;
The difference seems rather insignificant here.
What if we also want to pull back each employees manager name and the number of people in the managers department? Using the inline view it now looks like this.
-- Non-ANSI Syntax
SELECT e.ename AS employee_name,
dc1.dept_count AS emp_dept_count,
m.ename AS manager_name,
dc2.dept_count AS mgr_dept_count
FROM emp e,
(SELECT deptno, COUNT(*) AS dept_count
FROM emp
GROUP BY deptno) dc1,
emp m,
(SELECT deptno, COUNT(*) AS dept_count
FROM emp
GROUP BY deptno) dc2
WHERE e.deptno = dc1.deptno
AND e.mgr = m.empno
AND m.deptno = dc2.deptno;
-- ANSI Syntax
SELECT e.ename AS employee_name,
dc1.dept_count AS emp_dept_count,
m.ename AS manager_name,
dc2.dept_count AS mgr_dept_count
FROM emp e
JOIN (SELECT deptno, COUNT(*) AS dept_count
FROM emp
GROUP BY deptno) dc1
ON e.deptno = dc1.deptno
JOIN emp m ON e.mgr = m.empno
JOIN (SELECT deptno, COUNT(*) AS dept_count
FROM emp
GROUP BY deptno) dc2
ON m.deptno = dc2.deptno;
Using the WITH clause this would look like the following.
-- Non-ANSI Syntax
WITH dept_count AS (
SELECT deptno, COUNT(*) AS dept_count
FROM emp
GROUP BY deptno)
SELECT e.ename AS employee_name,
dc1.dept_count AS emp_dept_count,
m.ename AS manager_name,
dc2.dept_count AS mgr_dept_count
FROM emp e,
dept_count dc1,
emp m,
dept_count dc2
WHERE e.deptno = dc1.deptno
AND e.mgr = m.empno
AND m.deptno = dc2.deptno;
-- ANSI Syntax
WITH dept_count AS (
SELECT deptno, COUNT(*) AS dept_count
FROM emp
GROUP BY deptno)
SELECT e.ename AS employee_name,
dc1.dept_count AS emp_dept_count,
m.ename AS manager_name,
dc2.dept_count AS mgr_dept_count
FROM emp e
JOIN dept_count dc1 ON e.deptno = dc1.deptno
JOIN emp m ON e.mgr = m.empno
JOIN dept_count dc2 ON m.deptno = dc2.deptno;
So we don't need to redefine the same subquery multiple times. Instead we just use the query name defined in the WITH clause, making the query much easier to read.
If the contents of the WITH clause is sufficiently complex, Oracle may decide to resolve the result of the subquery into a global temporary table. This can make multiple references to the subquery more efficient.
The MATERIALIZE and INLINE optimizer hints can be used to influence the decision.
The undocumented MATERIALIZE hint tells the optimizer to resolve the subquery as a global temporary table, while the INLINE hint tells it to process the query inline.
WITH dept_count AS (
SELECT /*+ MATERIALIZE */ deptno, COUNT(*) AS dept_count
FROM emp
GROUP BY deptno)
SELECT ...
WITH dept_count AS (
SELECT /*+ INLINE */ deptno, COUNT(*) AS dept_count
FROM emp
GROUP BY deptno)
SELECT ...
Even when there is no repetition of SQL, the WITH clause can simplify complex queries, like the following example that lists those departments with above average wages.
WITH
dept_costs AS (
SELECT dname, SUM(sal) dept_total
FROM emp e, dept d
WHERE e.deptno = d.deptno
GROUP BY dname),
avg_cost AS (
SELECT SUM(dept_total)/COUNT(*) avg
FROM dept_costs)
SELECT *
FROM dept_costs
WHERE dept_total > (SELECT avg FROM avg_cost)
ORDER BY dname;
In the previous example, the main body of the query is very simple, with the complexity hidden in the WITH clause.
4)
inner join or cross join?
cross join= cartesian product
inner join or join (regular join)
5) GROUP BY WITH VARCHAR COLUMN
select dateaniv,sum(to_number(num_users)) from test2
2 group by dateaniv;
6) differences between CROSS JOIN AND INNER JOIN
cross join = cartesian product
inner join = join
inner join uses ON + where
cross join uses WHERE
7) fake join
SQL> select * from dept d, test2 a
2 where d.deptno=to_number(num_users||'0');
DEPTNO DNAME LOC DATEANIV DATEANIV2 NUM_USERS
---------- -------------- ------------- ---------- ---------- ----------
10 ACCOUNTING NEW YORK 12/06/1977 01/02/1977 1
10 ACCOUNTING NEW YORK 01/01/1977 01/02/1977 1
10 ACCOUNTING NEW YORK 01/01/1978 1
10 ACCOUNTING NEW YORK 01/12/1977 01/02/1977 1
10 ACCOUNTING NEW YORK 01/10/1977 01/02/1977 1
10 ACCOUNTING NEW YORK 01/01/1977 01/01/1977 1
10 ACCOUNTING NEW YORK 01/01/1977 01/01/1977 1
7 rows selected.
8) null handling
SQL> select * from test2
2 where dateaniv2 is null;
DATEANIV DATEANIV2 NUM_USERS
---------- ---------- ----------
01/01/1978 1
SQL> select * from test2
2 where dateaniv2 is not null;
DATEANIV DATEANIV2 NUM_USERS
---------- ---------- ----------
12/06/1977 01/02/1977 1
01/01/1977 01/02/1977 1
01/12/1977 01/02/1977 1
01/10/1977 01/02/1977 1
01/01/1977 01/01/1977 1
01/01/1977 01/01/1977 1
6 rows selected.
SQL> select nvl(dateaniv2,'01/01/1900') from test2
2 where dateaniv2 is null;
NVL(DATEAN
----------
01/01/1900
SQL> select DECODE(dateaniv2,NULL,'01/01/1900') from test2
2 /
DECODE(DAT
----------
01/01/1900
7 rows selected.
SQL> select nvl2(dateaniv2,dateaniv2,'01/01/1900') from test2
2 /
NVL2(DATEA
----------
01/02/1977
01/02/1977
01/01/1900
01/02/1977
01/02/1977
01/01/1977
01/01/1977
7 rows selected.
The LNNVL function has been available since at least Oracle 9i, but was undocumented until Oracle 11g. It is used in a where clause to evaluate a condition. If this condition evaluates to false or unknown, it returns true. If the condition evaluates to true, it returns false.
SQL> SELECT id, col3 FROM null_test_tab WHERE LNNVL(col1 IS NULL) ORDER BY id;
ID COL3
---------- ----------
1 THREE
1 row selected.
SQL> SELECT id, col3 FROM null_test_tab WHERE LNNVL(col2 = 'TWO') ORDER BY id;
ID COL3
---------- ----------
3 THREE
4 THREE
2 rows selected.
SQL> SELECT id, col3 FROM null_test_tab WHERE LNNVL(col2 != 'TWO') ORDER BY id;
ID COL3
---------- ----------
1 THREE
2 THREE
3 THREE
4 THREE
4 rows selected.
NULLIF
The NULLIF function was introduced in Oracle 9i. It accepts two parameters and returns null if both parameters are equal. If they are not equal, the first parameter value is returned.
In our test table the values of COL3 and COL4 are equal in row 4, so we would only expect null returned for that row using the following query.
SQL> SELECT id, NULLIF(col3, col4) AS output FROM null_test_tab ORDER BY id;
ID OUTPUT
---------- ----------
1 THREE
2 THREE
3 THREE
4
4 rows selected.
SQL>
9)after creating a user, we need to grant roles:
GRANT CONNECT, RESOURCE, DBA TO books_admin;
GRANT UNLIMITED TABLESPACE TO books_admin;
GRANT CREATE SESSION GRANT ANY PRIVILEGE TO books_admin;
GRANT
SELECT,
INSERT,
UPDATE,
DELETE
ON
schema.books
TO
books_admin;
10) system tables
all tablespaces, all users, dba_x
select table_name, tablespace_name from sys.all_tables;
dimanche 18 octobre 2020
10 datastage tips part1
1) different env in the sql code using #pENVexecution# DS parameter
where ('#pENVexecution#' = ' D' and <condition> and <condition2>
or
('#pENVexecution#' = ' P' and <condition> and <condition2>
2) BOM
3) use one copy before sending a DS to a lookup reference to have the real numbers
bug: 11.5.0.2
number of lines of the reference link is wrong!
4) lookup file set vs dataset (for lookups)
lookup file set must have a key, the name of the column (key) must be the same column as source.
differently as per dataset.
5) Json (hierarchical data stage - made with flash)
https://www.ibm.com/support/producthub/ugi/docs/content/SSZJPZ_11.7.0/com.ibm.swg.im.iis.ds.stages.xml.core.usage.doc/topics/examples_jsonstage.html
it uses hierarchical data, examples you can find on IBM website with files provided
https://www.ibm.com/support/pages/node/603441
json_examples.zip
use the web site to validate the json file
https://json-editor.tangramjs.com/index.html
https://json-editor.tangramjs.com/editor.html#/
After opening the assembly editor, you choose Palette to:
AGGREGATE, H PIVOT, HJOIN, REGROUP, SORT, VPIVOT, SWITCH, UNION, ORDERJOIN,
WEB SERVICES:REST, XML PARSER/COMPOSER, JSON PARSER(SOURCE)/COMPOSER(CIBLE)
Output step is the most important, where Mappings tab is used to map the nodes with the columns
samedi 17 octobre 2020
db2 vs oracle part1
***dummy table
sysibm.sysdummy1 = dual
select current_date from sysibm.dual
cast function
CURRENT DATE= sysdate
first_day()
last_day()
add_days
add_months
- 1 day
-1 month
fetch first 5 rows only
limit 1000
10 oracle tips part 1
1) how define an editor in sqlplus:
define _editor=vi
2)how to see editor values:
define;
3) how to write a select:
select ename,sal
from emp
where 1=1
and sal>2000
---and ename like 'B%';
4) how to create a dummy table
create table test as
select 1 as empid,1 as deptid,'a' as name,to_date('12/12/2000','dd/mm/yyyy') as dateaniv from dual
union all
select 2 as empid,2 as deptid, 'b' as name,to_date('01/01/2001','dd/mm/yyyy') as dateaniv from dual;
5)how to create or replace table:
CREATE OR REPLACE can only be used on functions, procedures, types, views, or packages - it will not work on tables.
6) history (oracle 12 only)
SQL> set history on
SQL> show history
SQL> show history
history is ON and set to “100â€
SQL> history
SQL> history 4 run
SQL history 4 edit
SQL> clear history
7) how to change date format
permanent:
CREATE OR REPLACE TRIGGER CHANGE_DATE_FORMAT
AFTER LOGON ON DATABASE
call DBMS_SESSION.SET_NLS('NLS_DATE_FORMAT','dd/mm/yyyy');
temporary:
alter session NLS_DATE_FORMAT='dd/mm/yyyy';
8)How can I use the "up arrow" and down arrow" keys to display the command line history for all SQL*Plus commands IN LINUX?
Question: I've been told that I need to use the rlwrap utility with SQL*Plus. What is rlwrap and how does it help me in SQL*Plus?
Answer: One nice features of using SQL*Plus in Windows is that you can use the "up arrow" and down arrow" keys to display the command line history for all SQL*Plus commands.
It's also possible to do this in Linux and UNIX (AIX, Solaris, HP/UX) with the freeware rlwrap utility.
You can download the freeware rlwrap utility at this link.
The readline wrapper (rlwrap) utility uses the GNU readline library. Hence, rlwrap is not Oracle-centric, it's a standard OS utility available for all flavors of UNIX, Linux and even Windows. The rlwrap software installs easily on UNIX/Linux with these standard GNU unzip and make commands:
I downloaded: rlwrap-0.43.tar.gz
gunzip rlwrap*.gz
tar -xvf rlwrap*.tar
cd rlwrap*
./configure
make
make check
make install
Aliasing rlwrap
Following the install, you use a standard UNIX alias in your shell signon file (.cshrc for S shell, .bashrc for Bourne shell, or .profile for Korn shell) to source-in the rlwrap utility, using a different command name:
alias rl_sqlplus='rlwrap sqlplus'
alias rl_rman='rlwrap rman'
alias rl_asmcmd='rlwrap asmcmd'
Rampant author Laurent Schneider notes why you should never use an alias over-ride of the default Oracle names of "sqlplus", "asmcmd" or "rman":
Using rlwrap may affect the behavior of CTRL+C during interactive sessions. I've done a few tests on this and I can't see a difference in behavior of CTRL+C with or without rlwrap. Perhaps this was a problem with earlier versions. Note that rlwrap only supports interactive sessions, so scripts like the following may not work as expected.
sqlplus alias: From what I can see the alias doesn't seem to work from within a shell script (bash, ksh or csh), so it doesn't really present a danger. Remember, rlwrap is not an Oracle tool! I guess it's best to leave the sqlplus and rman commands clean and alias using a different name, just in case.
Using rlwrap
The rlwrap utility is a nice utility for command-line editing and an easy display of SQL*Plus command history.
9)how to add a column in a table
alter table test add dateaniv2 date;
10) not between AND between inversed
SELECT * FROM customers WHERE customer_id NOT BETWEEN 3000 AND 3500;
this works in db2 and oracle:
and '01/02/1977' between dateaniv and dateaniv2;
jeudi 21 juillet 2011
wowexec.exe nao é virus qdo usamos ap 16-bit
The Windows-On-Windows process, wowexec.exe is called by the NT Virtual DOS Machine process, ntvdm.exe to enable running 16-bit MSDOS programs or yester-year games on the present 32-bit Operating Systems like Windows 2000, NT, XP and onwards. It executes as soon as any 16-bit application is run, but continues to reside and run in the background even after the application is closed.
mercredi 20 octobre 2010
integrators
apos systems
antivia
http://infoburst2009.com/
Product integration roadmap
http://www.slideshare.net/ballesjavi/sapnwbwandbobjbipjuneupdate?from=ss_embed
lundi 18 octobre 2010
filtro de prompt
Agrupamento
WHEN QC1_DMT_DIM_CLASSIFICATION.QC1_JOB_GROUP_003='1B' THEN 'PEAGE enc.technique'
WHEN QC1_DMT_DIM_CLASSIFICATION.QC1_JOB_GROUP_003='1C' THEN 'PEAGE commercial'
WHEN QC1_DMT_DIM_CLASSIFICATION.QC1_JOB_GROUP_003 in ('2A','2B') THEN 'VIABILITE/SECURITE'
WHEN QC1_DMT_DIM_CLASSIFICATION.QC1_JOB_GROUP_003 in ('3A','3B') THEN 'MAINTENANCE & ATELIER'
WHEN QC1_DMT_DIM_CLASSIFICATION.QC1_JOB_GROUP_003='4A' THEN
CASE WHEN QC1_DMT_DIM_ORGANISATION.QC1_LEV_03_CODE='1' THEN 'STRUCTURE EXPLOITATION'
ELSE 'STRUCTURE HORS EXPLOITATION'
END
ELSE ''
END
BO Prompts filter
mercredi 6 octobre 2010
mardi 8 juin 2010
BO Products
BOE
BI Server
BOE Premium XI 3.0
Business Objects Edge Premium (5 CAL)
Business Objects Edge Professional XI R2 (5 CAL)-formerly Crystal Decisions Professional
Business Objects Edge Standard (5 NUL)-formerly Crystal Decisions Standard
BusinessObjects Auditing XI Release 2
BusinessObjects Encyclopedia XI for Windows (English)
BusinessObjects Enterprise Premium XI Release 2
BusinessObjects Enterprise Premium XI Release 2
BusinessObjects Enterprise XI for Solaris (English)
BusinessObjects Enterprise XI for Windows (Multi-Language)
BusinessObjects Enterprise XI for Windows English
BusinessObjects Live Office XI Release 2
BusinessObjects Process Tracker XI for Windows (English)
BusinessObjects Process Tracker XI Release 2 for Windows (All Languages)
BusinessObjects Publishing XI Release 2
Crystal Reports Explorer XI
Crystal Reports Explorer XI Release 2
Dashboard Builder
Data Federator XI R2
Voyager
CR
CR2008
Crystal Reports XI for Windows Dev (Multi-Language)
Crystal Reports XI for Windows Dev English
Crystal Reports XI for Windows Pro (Multi-Language)
Crystal Reports XI for Windows Pro English
Crystal Vision
CRS
Crystal Reports Server XI
Crystal Reports Server XI (Multi-Language)
Crystal Report Server XI R2
Crystal Vision Server
DI
BusinessObjects Data Integrator for Red Hat Linux International Version
BusinessObjects Data Integrator for Solaris International Version
BusinessObjects Data Integrator for AIX International Version
BusinessObjects Data Integrator for HP-UX International Version
BusinessObjects Data Integrator for Windows International Version
BusinessObjects Data Integrator Interfaces International Version 6.5 NA File
BusinessObjects Data Integrator Interfaces XI International Version
BusinessObjects Data Integrator XI for Windows International Version
BusinessObjects Oracle OLAP Universe Builder XI (English)
BusinessObjects Universal Metadata Bridge 6.5.1 for Windows (English/Japanese) 6.5
BusinessObjects Universal Metadata Bridge XI for Windows (English/Japanese)
Data Federator 3.0
EPM
BusinessObjects Application Foundation 6.5. for AIX / Windows (English) 6.5
BusinessObjects Application Foundation 6.5. for Solaris/Windows (English, French, Italian)
BusinessObjects Application Foundation 6.5 for Windows (English, French, Italian, Japanese)
BusinessObjects Dashboard Manager XI Release 2
BusinessObjects Performance Management XI for Windows (English)
BusinessObjects Performance Manager XI Release 2
BusinessObjects Predictive Analysis XI Release 2
BusinessObjects Process Analysis XI Release 2
BusinessObjects Set Analysis XI Release 2
Planning
AnalyticApps
Crystal Xcelsius 4.02 XETrial
Crystal Xcelsius Pro v4.5 (Full Build)
Crystal Xcelsius Pro v4.5 (Trial build) CHB06-3
Crystal Xcelsius Workgroup/Designer v4.5 (Full build)
Crystal Xcelsius Workgroup/Designer v4.5 (Trial Build)
Xcelsius Enterprise 2008
Xcelsius Enterprise v4.5 (Full Build)
Xcelsius Enterprise v4.5 (Trial Build)
IntegrationKit
BusinessObjects Enterprise XI BAAN Integration Kit for Windows (English)
BusinessObjects Enterprise XI PeopleSoft Integration Kit for Windows (English)
BusinessObjects Enterprise XI Release 2 BAAN Integration Kit for Windows (English)
BusinessObjects Enterprise XI Release 2 Peoplesoft Integration Kit for Windows (English)
BusinessObjects Enterprise XI Release 2 Siebel Integration Kit for Windows (Multi-Language)
BusinessObjects Enterprise XI SAP Integration Kit for Windows (Multi-Language)
BusinessObjects Enterprise XI Siebel Integration Kit for Windows (English)
SAP Integration Kit for R2 Pro/Premium
OLAPI
BusinessObjects Desktop Intelligence XI Release 2
BusinessObjects OLAP Intelligence XI for Solaris English
BusinessObjects OLAP Intelligence XI for Windows (Multi-Language)
BusinessObjects OLAP Intelligence XI for Windows English
BusinessObjects OLAP Intelligence XI Release 2
BusinessObjects Web Intelligence XI Release 2
Intelligent Question Add-on XI R2
jeudi 25 février 2010
Setting password for guest user winxp Home
Setting password for guest user in WinXP home
samedi 20 février 2010
Nao se ENGANE! Fique esperto
Alem de tudo isso, me disseram que o processador AMD, que é dual core por
mais que tenha somente 2 graficos de cpu, parece ser mais rapido que os da
intel.
Ao comprar um notebook com o processador intel i3, vc podera pensar que sao 4 cores, mas na verdade sao 2 cores com multithreading. Você vera isso no task manager:
Ao comprar um notebook com o processador intel i7, vc podera pensar que sao 8 cores, mas na verdade sao 4 cores com multithreading. Você vera isso no task manager:
vendredi 5 février 2010
mercredi 3 février 2010
Deep Freeze
samedi 30 janvier 2010
Solaris: Services Tools Bundle Components
A collection of shell scripts and a few binary executable that gathers information and creates a detailed snapshot of a system's configuration and state.
Explorer output enables Sun engineers to perform assessments of the system by applying the output against knowledge-based rules engine.
Information related to drivers, patches, recent system event history and log file entries is obtained from the Explorer output.
Can be used by Sun and Sun's customers to identify and solve problems
- To expedite problem diagnosis and resolution (reactive)
- To prevent future problems (proactive)
LWACT - Lightweight Availability Data Collector
A lightweight stand alone availability collection tool
It utilizes the existing explorer transport for transporting availability data back to Sun
It is installed on each Solaris operating system instance and is enabled for SPARC, x86, containers and zones.
This lightweight solution allows the user to track system availability, such as, boot, panic and halt events
LWACT is designed to simplify Sun's availability collection process and to accommodate customer network/security policies
SNEEP - Serial Number in EEPROM
Easy Serial Number and Asset Retrieval
Equipment Life Cycle Management
Changes logged to system log for audit compliance
Makes Serial Number required when opening Service Case readily available to system administrator
Communicated to Sun via Explorer and Service Tags
Interconnects Sun databases and Services
Service Tags
Service Tags enable auto-discover and bulk registration of assets.
Service Tags allow reporting static product data, vendor information and versions, among others.
Data can be uploaded to the Sun Inventory Channel or stored locally.
Sun Service Tags embedded in Sun software products.
Solaris CAT - Solaris Crash Analysis Tool
Solaris Crash Analysis Tool is used by Sun's Kernel Team
Customer install able
Allows users to extract crash data which automates the process of data collection and transmits that data to Sun
Latest release includes a stand-alone mode that allows users to extract crash data without having to run Solaris CAT first
mercredi 27 janvier 2010
Video Modelagem
MER
Transformar a semantica do negocio no modelo relacional
traduzir para um diagrama a etapa mais importante da modelagem
definir as entidades e suas chaves
definir os atributos e seus dominios
definir seus relacionamentos, graus e cardinalidades
caracteristicas
_obvio Nao existe ordem entre as tuplas (linhas)
_obvio existe ordem entre os atributos
_obvio valores atomicos
_obvio tuplas distintas
_obvio integridade
_obvio chaves minimas
_obvio suporte para gerenciamento de valores nulos: nulo é diferente de vazio
_obvio independencia de dados
Modelo conceitual: interage diretamente com o MERX definindo os relacionamentos, entidades
, chaves, abstracoes e generalizacoes.
Modelo logico: define as dependencias funcionais, normalizacao e
prepara o ambiente para ser processado por um SGBD
Modelo fisico: traduz o modelo logico para as caracteristicas do seu
SGBD e hardware de modo a obter melhor performance e retorno sobre
o investimento.
cliente pessoa fisica ou cliente pessoa juridica = isolar cada uma.
normalizacao
reduz a redundancia de dados
acaba com anomalias de atualizacao
agrega consistencia de dados
introduzidas por cood na dec 70
uma tabela deve contemplar sempre um unico assunto
existem varias formas normais, porem atingir a terceira forma normal
pode ser jaa considerado o estado da arte de normalizacao em alguns cenarios
reduz a quantidade de atributos e aumenta a qtde de tabelas, facilitando a
manutencao do modelo
1 forma normal: uma relacao esta em primeira forma normal se, e somente se, todos os dominios tiverem
apenas valores atomicos.
2 forma normal: uma relacao esta em segunda forma normal se, estiver na primeira forma normal e todo atributo nao chave for totalmente
dependente da chave primaria
3 forma normal: uma relacao esta em terceira forma normal se, estiver na segunda forma normal e e nao existir dependencias transitivas.
dependencia transitiva: caso pais, estado, cidade,bairro
dimanche 24 janvier 2010
Windows versions
mardi 19 janvier 2010
lundi 18 janvier 2010
TIPS
- Quando temos Valor de Custo e Valor de Venda na tabela fato. Devemos colocar uma coluna para LUCRO = (VL VENDA - VL CUSTO)ou deixar para ser calculado no SQL ou software? R. Devemos implementar uma coluna na tabela fato, SIM.
Date Key is Number or Date?
-Date column must be number type.
Date dimension versus date in Fact table
-Date type column in fact table it is ok, but the numerous classifications for dates cannot be obtained by SQL Date functions. For example: Major event column, that can hold "Jogos Olimpicos". Qual funcao sql para datas iria dizer isso?
-most databases do not index SQL date calculations, so queries constraining on an SQL-calculated field would not take advantage of an index. How oracle handles it?
Date and Time.
It is better if we create a date dimension(3650 linhas) and a date time dimension (5.256.000 linhas).
Devemos evitar nulos na tabela fato. Ex: Coloque um valor "Promocao nao se aplica" na dimensao Promocao com uma chave. Essa chave vai se relacionar com a fato.
Nonadditive Facts: Unit price, gross margin
Promotion dimension in 4 parts: It is possible to divide the promotion dimension, depends on requirements.
Devemos evitar snowflaking, com uma excecao: outtrigers
Cada processo de negocio pode ser representado com menos de 15 dimensoes, se houver mais de 24, o modelo precisa ser revisado.
Surrogate keys for date dimension must be in sequential order. Day 1 jan 1990 = 1, day 2 = 2...
We do not want to embed extensive calendar intelligence in these keys (for example YYYMMDD) because doing so may encorage people to bypass the date lookup dimension table.
SCDs (Slowly changing dimensions):
SCD1 = overwrite the value. NO historical.
SCD2 = ADD a dimension row. BAD for big dimensions. MOST USED.
SCD3 = ADD a dimension column.
Technique 1: chapter2 page 46 outtriger.
Technique 2: chapter2 page49 Promotion Coverage Factless Fact Table
Technique 3: chapter2 page 62 Market Bask Analysis
Glossario
Fact (Fato): é uma tabela que contem varias chaves estrangeiras mais os valores numericos, como quantidade, valor, lucro etc.
Star schemas: um modelo que forma em estrela, na qual a tabela fato esta no centro cercada por dimensoes.
Snow Flake schemas: um modelo em forma de estrela, porem contem dimensoes ligadas a dimensoes. Por exemplo, localidade pode estar normalizada (regiao, pais, cidade, estado).
Surrogate keys, Meaningless keys, integer keys, nonnatural keys, artificial keys, synthetic keys... = Sao numeros inteiros que sao determinadas sequencialmente para popular a dimensao.
Natural keys: identificador usado por sistemas operacionais. Por exemplo: BOXOMO1 significa caixa de sabao em po OMO. Esse codigo deve ser um atributo na dimensao, nao uma chave.
Causal dimensions: por ex: promotion dimension. because it describes factors thought to cause a change in product sales.
Degenerate dimensions (DD): Operational numbers such as order numbers, invoice numbers, and bill-of-landing numbers usually give rise to empty dimensions and are represented as DD.
DD often play an integral role in the fact table's primary key. Often, the primary key of a fact table is a subset of the tables's foreign key. We typically do not need every foreign key in the fact table to guarantee the uniqueness of a fact table row.
Conformed dimensions: are dimensions that can be used in different business process.
4 Passos para o processo de criacao dimensional
Quando criamos um modelo, precisamos pensar em processo do negocio, nao no departamento. Por exemplo: Temos o departamento Vendas e Marketing.
Nosso modelo poder ser de Pedidos. Pois serao acessado por ambos. Evitando duplicacao de dados.
2 - Declarar o grao do processo do negocio.
Significa especificar exatamente o que uma unica linha na tabela fato representa.
Responda a questao: "O que uma linha na fato representa?"
Exemplos:
-um bilhete de voo
-um empregado na empresa
-um bilhete de cinema
-um item de uma nota fiscal de compra de supermercado
-o saldo mensal de uma conta de banco
Escolher o nivel mais detalhado. Pois o conjunto delas formam dados agregados. Fazendo assim os papeis das tabelas agregadas.
ESSA ANALISE é CRITICA. Se estiver errado, ira estragar a estrutura toda, descobre-se nos passos 3 e 4 que a declaracao do grao esta errado.
3 - Escolher as dimensoes que aplicam a cada linha da tabela fato.
Responder a pergunta: "Como as pessoas de negocio descrevem os dados que resultam do processo de negocio?"
Exemplos: data, produto, cliente, status...
4 - Identificar as medidas fatos que irao popular cada linha da tabela fato.
Sao numeros. Responder a pergunta: "O que estamos medindo?"
Preço, lucro, quantidade.
Componentes de um Data warehouse
Sistemas OLTP onde a informacao operacional é guardada.
Constitue de: Banco de dados ou arquivos texto.
Data Staging Area:
Area de armazenamento e conjunto de processos feitos pelo ETL. Fica entre o Operational Source Systems e a Data Presentation.
Constitue de: Arquivos texto, banco de dados normalizado, tabelas)
*Nao prove query ou apresentacao para usuarios.
Data Presentation:
O data Warehouse onde os usuarios rodam queries, fazem relatorios.
Constitue de: banco de dados dimensional, queries e relatorios.
Metadata:
Informacao dos dados do datawarehouse. Documentacao interna dos dados.
Constitue de: banco de dados, arquivos word, text e excel ou software.
ODS Operational data store:
implementado para relatorios operacionais que nao sao possiveis pelo mainframe ou OLTP.
Constitue de: banco de dados
mardi 29 décembre 2009
mercredi 23 décembre 2009
CA Erwin Data Modeler Community Ed 7.3
As vezes me sinto ultrapassado usando software antigo... o erwin que eu estava usando ate agora é a versao 4. Agora todos os meus modelos terao q ser refeitos. Uma merda!
Engracado como as evolucoes se dao. Antes a extensao era *.er1. Agora é: *.erwin
Bon, C'est la vie!
jeudi 3 décembre 2009
mercredi 2 décembre 2009
lundi 9 novembre 2009
jeudi 5 novembre 2009
Working with ERwin
Working with Power Designer
dimanche 1 novembre 2009
vendredi 30 octobre 2009
mercredi 28 octobre 2009
Data Diagrams
http://www.databaseanswers.org/data_models/index.htm
http://www.databaseanswers.com/modelling_tools.htm
along with it, these are the main tools for modeling
CA Erwin
Sybase Power Designer
ETL Tools
ETL Tools
At present the most popular and widely used ETL tools and applications on the market are:
1 - IBM Websphere DataStage (Formerly known as Ascential DataStage and Ardent DataStage)
2 - Informatica PowerCenter
3 - Oracle Warehouse Builder
4 - Ab Initio
5 - Pentaho Data Integration - Kettle Project (open source ETL)
6 - SAS ETL studio
7 - IBM Cognos Decisionstream
8 - Business Objects Data Integrator (BODI)
9 - Microsoft SQL Server Integration Services (SSIS)
10 - ETI Extract
11. Elixir Repertoire 7.2.2 Elixir
12. Data Migrator 7.6 Information Builders
13. Talend Open Studio 3.1 Talend
14. DataFlow Manager 6.5 Pitney Bowes Business Insight
15. Data Integrator 8.12 Pervasive
16. Open Text Integration Center 7.1 Open Text
17. Transformation Manager 5.2.2 ETL Solutions Ltd.
18. Clover ETL 2.5.2 Javlin
19. ETL4ALL 4.2 IKAN
20. DB2 Warehouse Edition 9.1 IBM
21. Pentaho Data Integration 3.0 Pentaho
22. Adeptia Integration Server 4.9 Adeptia
tutorial
IBM RedBrick
The latest release of IBM Red Brick Warehouse -- version 6.3 -- can manage huge amounts of complex data, integrate with existing technologies to preserve your IT investments, and scale to meet the expanding needs of your business. It is available in two configurations: Red Brick Workgroup Edition and Red Brick Enterprise Edition.
Red Brick Workgroup Edition 6.3 is ideal for small- to medium-size businesses and departmental solutions that require the power of an enterprise database on a system with up to two processors. Red Brick Enterprise Edition 6.3 provides all of the features of the Workgroup Edition for SMP systems with three or more processors.
Highlights
•High-speed, high-volume query performance with support for thousands of users
•High-performance information management
•Linear scalability that accommodates many terabytes on SMP hardware
•Low cost of ownership through greatly simplified maintenance
Performance enhancements
•Dynamic segment elimination: Complementing compile-time SmartScan optimizations, the server also supports run-time or dynamic segment elimination. This further optimizes data access for table scans and TARGETjoins that use local indexes. Segment elimination is factored when determining the correct query plan to choose.
•Memory mapping for queries: To optimize access to dimension tables and their primary-key indexes. These objects are partially or wholly memory-mapped during query execution.
•TARGETjoin performance improvements: The performance of TARGETjoin queries is optimized, and single-column B-TREE indexes can now participate in TARGETjoin plans.
•Optimizer directives: The server supports SET commands for controlling the availability of specific STAR indexes for single and multifact joins and for adjusting thresholds that influence the overall choice of STARjoin and TARGETjoin plans.
•Vista Enhancement: Precomputed views grouped by nullable columns can now be maintained incrementally.
•Table Management Utility (TMU): Loader enhancements are made in memory usage and tuning.
Ease-of-use enhancements
•Alter Table with working segment: You can add or drop table columns into a predefined working segment. This option provides greater reliability and recoverability than other ALTER TABLE modes.
•Additional SQL OLAP functions: The server supports additional functions for analytic queries: PERCENT_RANK, CUME_DIST, PERCENTILE_CONT, and PERCENTILE_DISC. The server also supports the ROUND scalar function.
•Expression support: You can define arithmetic expressions and conditional CASE expressions for input columns inside the TMU control file.
•Shrink system catalog: To improve performance, you can use the rb_syscompact utility to reduce the size of the database system catalog.
•3GB address space on the Microsoft Windows platform: To improve scalability and performance, Red Brick executable's can use up to 3GB of virtual address space on the Windows platform.
•Multicharacter delimiter support: To extend delimiter support in the Table Management Utility (loader) and Export.
•Nested XML namespace support: To extend definition of XML data for loading.
•Support for .NET applications through the ODBC.NET data provider: Applications can use Microsoft's ODBC.NET provider and the .NET Framework 1.1 with the Red Brick ODBC driver to access data from Red Brick data warehouse.
see more
Teradata
The Teradata Purpose-Built Platform Family has expanded to fit all your business needs. With the latest appliance options including Extreme Data Appliance, Data Warehouse Appliance, Data Mart Appliance, and Active Enterprise Data Warehouse, your company can start small while trusting that your best in class infrastructure will grow with you.
*
see more
Sybase IQ
Sybase IQ Enterprise Edition was designed to enable many users to perform extremely fast, flexible, interactive analysis, and ad-hoc queries, using off-the-shelf query tools. Sybase IQ can be loaded using a variety of methods including the Sybase ETL server, from flat files, directly from Sybase Adaptive Server Enterprise or Replication Server, or through Enterprise Connect from non-ASE databases, and typically stores the data in less than the size of the original raw data. The Multiplex Grid option allows Sybase IQ engines to run on multiple nodes of a shared disk cluster to load or query a single image of the database. The Multiplex Grid option provides tremendous user scalability, load jobs scalability and high availability. For many data warehousing and DSS applications, Sybase IQ Enterprise Edition can improve query response time by up to 100 times.
see more
Netezza
The Netezza TwinFin™ system is the fourth generation Netezza appliance that once again sets the standard for price/performance for data warehousing and business intelligence (BI). TwinFin is a purpose-built, standards-based data appliance that architecturally integrates database, server and storage into a single, easy to manage system. TwinFin is designed for rapid analysis of data volumes scaling into the petabytes, delivering 10-100x performance improvements at a third of the cost of other options available from traditional database vendors.
TwinFin delivers high performance out of the box, with no indexing or tuning required. It is delivered ready-to-go for immediate data loading and query execution and integrates with all leading ETL, BI and analytic applications through standard ODBC, JDBC and OLE DB interfaces. TwinFin is easily rolled into your data center, plugged in and ready to load data in a matter of hours.
Experience it for yourself. Test drive TwinFin against your own data and queries to see what it can do for your business. Click here to find out more www.netezza.com/testdrive.
Key Product Highlights:
Industry-leading price-performance – 10-100x the performance at 1/3 the cost of competitive offerings
A platform for advanced analytics – Orders of magnitude faster performance
Scalability – From under 1 terabyte to petabytes
Support for thousands of users and very complex, mixed workloads
Commodity blade-based architecture
Industry-standard, multi-core Intel-based blades, implemented in combination with commodity disk storage and Netezza’s patented data filtering using Field Programmable Gate Arrays (FPGAs)
Appliance simplicity – No indexing or tuning; minimal ongoing administration
Industry-standard interfaces (SQL, ODBC, JDBC, OLE DB)
Full compatibility with market-leading BI tools, applications and infrastructure
Enterprise-class reliability and availability – More than 99.99% uptime
Green – Low power and cooling requirements in a compact footprint
Fast load speeds – Up to 2 TB/hour
Fast backup rates – High-speed backup and restore at data rates as high as 4 TB/hour
mercredi 21 octobre 2009
lundi 19 octobre 2009
The 10 Essential Rules of Dimensional Modeling
The 10 Essential Rules of Dimensional Modeling
By Margy Ross
Rule #1: Load detailed atomic data into dimensional structures.
Carregar sempre o dado mais detalhado. Pois o usuario nao pode viver sem os detalhes.
Assim os dados podem ser sumarizados.
Rule #2: Structure dimensional models around business processes.
Business processes are the activities performed by your organization; they represent measurement events, like taking an order or billing a customer. Business processes typically capture or generate unique performance metrics associated with each event. These metrics translate into facts, with each business process represented by a single atomic fact table. In addition to single process fact tables, consolidated fact tables are sometimes created that combine metrics from multiple processes into one fact table at a common level of detail. Again, consolidated fact tables are a complement to the detailed single-process fact tables, not a substitute for them.
Rule #3: Ensure that every fact table has an associated date dimension table.
Obviamente. O grao deve ser um dia. As vezes multiplas chaves estrangeiras sao representadas em uma tabela fato.
Rule #4: Ensure that all facts in a single fact table are at the same grain or level of detail.
Rule #5: Resove many-to-many relationships in fact tables.
Rule #6: Resolve many-to-one relationships in dimension tables.
Rule #7: Store report labels and filter domain values in dimension tables.
Rule #8: Make certain that dimension tables use a surrogate key.
Rule #9: Create conformed dimensions to integrate data across the enterprise.
Rule #10: Continuously balance requirements and realities to deliver a DW/BI solution that's accepted by business users and that supports their decision-making.
dimanche 18 octobre 2009
Crossover cable

Networking two machines
It costs very little to establish a 10BaseT network between two PCs because you don't need a hub. All you need is a network card for each machine and a special 10BaseT cable called a crossover cable. You plug one end of this cable into each machine's network card, as shown in Figure above.
Figure Above You don't need a hub to create a two-machine 10BaseT network.
vendredi 16 octobre 2009
DW 2.0 - Architecture for the Next Generation of Data Warehousing
http://www.information-management.com/issues/20060401/1051111-1.html
samedi 10 octobre 2009
Business Intelligence: OLAP
http://training.inet.com/OLAP/home.htm
http://en.wikipedia.org/wiki/Online_analytical_processing
OLAP Collections
http://altaplana.com/olap/olap.collections.html
MDX
http://www.databasejournal.com/features/mssql/article.php/10894_1495511_1/MDX-at-First-Glance-Introduction-to-SQL-Server-MDX-Essentials.htm
jeudi 13 août 2009
new dw bible bought
mardi 2 juin 2009
what is new in BO Enterprise XI 3.1
• BO Enterprise Java InfoView = the old infoview webi but now comes with Dashboard Builder and PM. I think.
• Dashboard Builder
• Performance Manager
• Web Intelligence Rich Client
the old web intelligence enhanced.
• Desktop Intelligence = the old Business Objects Full Client Application
• Central Management Console (CMS) = the old supervisor.
• Report Conversion Tool
convert BO Desktop Intelligence docs (*.rep) >>>>>>>>> Web Intelligence docs (*.wid)
• Universe Designer
the old Designer. Now it comes with an option on the menu called "query panel", where you can see the query to be built.
• Data Source Migration Wizard
• Business Views Manager
• Report Comparison Tool
• Import Wizard
• Publishing Wizard
• Query as a Web Service
• Translation Manager
• Universe Builder
• Universe Connection Manager
• Crystal Reports
• Voyager
• Set Analyzer
• Integration Kit for SAP
• Integration Kit for Peoplesoft
• Live Office
• Central Configuration Manager = gathers all services (start/stop) related to Business Objects like windows services.
The services are:
• Apache Tomcat
• WinHTTP Web Proxy Auto-Discovery Service
• World Wide Web Publishing Service
vendredi 6 février 2009
BO designer: Divergences in Check cardinalities
We have multilanguage selection during the query. This table has two primary keys, the code and the language. For this, bo thinks there are two rows for each N row in another table, so it thinks you have a N by N relationship. We don't select the code at this point because the user will select when creating the query:
*the part circled was introduced by me after the checking. if I hit detect button it says ok.clang='EN'
, the error is :"cardinality is not valid" because i forced 1 by N relationship and BO checks and see N by N relationship due to the lack of the language.
lundi 2 février 2009
mercredi 28 janvier 2009
BO 6.5 Tracing file - ultimate tracing
Code:
active=true;
importance='<<'; size=100000; keep=true; Put it on a tmp directory and create this environment variables (these have my tmp directories): BO_TRACE_CONFIGDIR -> C:\temp\TraceLog
BO_TRACE_CONFIGFILE -> C:\temp\TraceLog\BO_trace.ini
BO_TRACE_LOGDIR -> C:\temp\TraceLog
to disable you need to put the webi service down
vendredi 6 juin 2008
Characters and Apostrophes
Données and Date de l'implementation.
I opened my designer and the universe opened with these descriptions:
Donnies and Date de l implementation
I exported and got the following error:
Problem Error: "[Microsoft] [ODBC SQL Server Driver] [SQL Server] Statement(s) could not be prepared. Contact your administrator or database supplier for more information (Error: WIS 10901)" when running a report in WebIntelligence
Resolution *****CONFIGURATION******
WebIntelligence 6.1x
SQL Server 2000
***********SYMPTOMS*******
When running a report in WebIntelligence, the following error message appears:
'[Microsoft] [ODBC SQL Server Driver] [SQL Server] Statement(s) could not be prepared. Contact your administrator or database supplier for more information (Error: WIS 10901)"
**********CAUSE**************
The report is created from a Universe that has an apostrophe in the Class and/or object names.
**********RESOLUTION******
Remove the apostrophe from the Class and/or object names.
*************MY RESOLUTION************
Restore repository's backup to get the old universe. It worked
lundi 26 mai 2008
Links
http://www.dw-institute.com
http://www.RalphKimball.com
http://www.BillInmon.com
http://www.DataWarehouse.com
http://www.dmReview.com
http://www.datamation.com
http://www.intelligententerprise.com/
http://www.datamirror.com
http://www.techguide.com
http://www.business-intelligence.co.uk
http://www.datamining.com/dm-ka.htm
http://www.evaltech.com
http://businessintelligence.ittoolbox.com/
mercredi 13 février 2008
vendredi 8 février 2008
Cache d'univers
d:\business objects\businessObjects Enterprise 6\nodes\FRPARWIP1\mycluster\universes\UNIVERS
d:\business objects\businessObjects Enterprise 6\nodes\FRPARWIP1\mycluster\universes\UNIVERS\ucdz
Diretorio q se pode apagar os universos *.unv e o arquivo *.unw
dimanche 6 janvier 2008
VI para usuarios Windows
Caso queira utilizar o VI no windows baixe uma versão no site www.vim.org
Nao vou falar de VI nesse blog porque vc pode encontrar vários websites especializados nisso.
Enjoy
lundi 17 décembre 2007
WEBI 6.5 and BOFC 5 prompts problem
symtoms: list of prompts cannot be refreshed when the user opens BO FC 5.1 report on webi 6.5
the object is a filter
filter name: Annee/Mois ?
where: @Select(Periode de connexion\Annee/Mois) IN @Prompt('Choisissez une ou plusieurs periode','A','Periode de connexion\Annee/Mois',MULTI,FREE)
reason: bug
solution: create a new user, copy the personal reports of the old user to this user and delete the old user.
vendredi 7 décembre 2007
Locked General Supervisor
If you don't have a second general supervisor, you could try the following SQL run against the security domain database:
Code:
Update OBJ_M_ACTOR Set M_ACTOR_C_PASSWORD = NULL Where M_ACTOR_C_NAME =
This will set the password for the general supervisor to null, and therefore the next time you login, you will not need to enter a password. It is recommended that a password is given asap via the supervisor module. You will also have to set the status of the user login, otherwise even with a null password BusObj will not let you log in. The status column is in OBJ_M_ACTOR and is called M_ACTOR_N_STATUS. If you set this flag to 1 along with setting the password to null then you should be okay. If this still doesn't work, make sure you have commited the database update
lundi 23 juillet 2007
Dw com BO
Caso não lhe interesse, visite tapioca do bill.








