sexta-feira, agosto 10, 2007

Util: MSDOS

Online Screen keyboard: start>run>cmd>osk

Calculadora: start>run>cmd Set /a [expressão aritmética]

Source: DELFO

quinta-feira, abril 19, 2007

Configurar User Basic Auth in Oracle HTTP Server (Apache 1.3) (Webfolder & WebDav)

Oracle HTTP Server - Oracle Application Server 10g Release 2 (10.1.2)

1) Criar o ficheiro de users/passwords
htpasswd -c c:\ficheiro nomeuser
Ao ser solicitado insira a password.

2) Criar a directoria secure em...
C:\oracle\product\10.2.0\companion\Apache\Apache\htdocs\secure

3)Configurar no ficheiro mod_dav.conf:

Dav on
AuthType Basic
AuthName "Secure"
AuthUserFile C:\password.txt

Require user smesteves



4) Browse:

Browse da directoria: http://localhost:7777/secure/
Acesso somente para visualização dos documentos existentes na directoria.











Browse webdav da directoria: http://localhost:7777/secure/











Solicita as credenciais para aceder ao folder webdav











Compara as credenciais com as existentes no ficheiro de passwords.












Permite a visualização e adição, eliminação e renomeação de files na directoria.




sexta-feira, abril 13, 2007

sexta-feira, setembro 08, 2006

Oracle XE: ORA-12899: Valor muito grande para a coluna...

*******************************************************************
Estou com o seguinte problema: Instalei o Oracle 10g XE e criei
uma
> tabela com um campo que suporta 30 caracteres - varchar2(30) - e
estou
> tentando inserir a seguinte linha mas dá um erro que segue abaixo:
>
> este comando funciona normal
> CREATE TABLE operacao_nota
> (
> codigo NUMERIC(8) NOT NULL,
> descricao VARCHAR2(30) NOT NULL,
> CONSTRAINT pk_operacao_nota_codigo PRIMARY KEY (codigo)
> );
*******************************************************************

Este erro ocorreu pq o valor de NLS_CHARACTERSET está como AL32UTF8.

Se alterar o valor para WE8MSWIN252 o erro deixa de ocorrer.

No charset "AL32UTF8", o 32 significa qua a base de dados ao armazenar caracteres acima de ASCII-127 (ie, caracteres acentuados, e especiais como o sinal de euro - NÃO É só "vogais e consoantes"!! ), vai poder usar até 32 bits (4 bytes) para esses
caracteres, e o datatype VARCHAR2(30) está reservando apenas 30
bytes.

Fonte

sexta-feira, setembro 01, 2006

Orace 9i: How to recover from error ORA-27041: unable to open file

The error:


*** 2006-05-29 17:41:40.000
*** SESSION ID:(2.1) 2006-05-29 17:41:40.000
ORA-01157: cannot identify/lock data file 11 - see DBWR trace file
ORA-01110: data file 11: 'O:\ORACLE\ORA921\DATABASE\HISTORICO1'
ORA-27041: unable to open file
OSD-04002: incapaz de abrir o ficheiro
O/S-Error: (OS 2) The system cannot find the file specified.


1)
SQL> ALTER DATABASE BACKUP CONTROLFILE TO TRACE;

The trace file is created in the location specified by the USER DUMP DEST initialization parameter.


2)
SHUTDOWN DATABASE;

STARTUP NOMOUNT
CREATE CONTROLFILE REUSE DATABASE "DBMRK" NORESETLOGS NOARCHIVELOG
-- SET STANDBY TO MAXIMIZE PERFORMANCE
MAXLOGFILES 50
MAXLOGMEMBERS 5
MAXDATAFILES 100
MAXINSTANCES 1
MAXLOGHISTORY 226
LOGFILE
GROUP 1 'O:\ORACLE\ORADATA\DBMRK\REDO01.LOG' SIZE 100M,
GROUP 2 'O:\ORACLE\ORADATA\DBMRK\REDO02.LOG' SIZE 100M,
GROUP 3 'O:\ORACLE\ORADATA\DBMRK\REDO03.LOG' SIZE 100M
-- STANDBY LOGFILE
DATAFILE
'O:\ORACLE\ORADATA\DBMRK\SYSTEM01.DBF',
'O:\ORACLE\ORADATA\DBMRK\UNDOTBS01.DBF',
'O:\ORACLE\ORADATA\DBMRK\CWMLITE01.DBF',
'O:\ORACLE\ORADATA\DBMRK\DRSYS01.DBF',
'O:\ORACLE\ORADATA\DBMRK\INDX01.DBF',
'O:\ORACLE\ORADATA\DBMRK\ODM01.DBF',
'O:\ORACLE\ORADATA\DBMRK\TOOLS01.DBF',
'O:\ORACLE\ORADATA\DBMRK\USERS01.DBF',
'O:\ORACLE\ORADATA\DBMRK\XDB01.DBF',
'O:\ORACLE\ORA921\DATABASE\HISTORICO1',
'O:\ORACLE\ORA921\DATABASE\DF_HISTORICO'
CHARACTER SET WE8MSWIN1252
;
# Take files offline to match current control file.
ALTER DATABASE DATAFILE 'O:\ORACLE\ORADATA\DBMRK\.ORA' OFFLINE DROP;
# Recovery is required if any of the datafiles are restored backups,
# or if the last shutdown was not normal or immediate.
RECOVER DATABASE
# Database can now be opened normally.
ALTER DATABASE OPEN;

quarta-feira, agosto 30, 2006

How to Delete All Objects for a User in Oracle

Detail

Normally, it is simplest to drop and add the user. This is the preferred method if you have system or sysdba access to the database.
If you don't have system level access, and want to scrub your schema, the following sql will produce a series of drop statments, which can then be executed.

select 'drop '||object_type||' '|| object_name|| DECODE(OBJECT_TYPE,'TABLE',' CASCADE CONSTRAINTS;',';')
from user_objects

Then, I normally purge the recycle bin to really clean things up. To be honest, I don't see a lot of use for oracle's recycle bin, and wish i could disable it... but anyway:

purge recyclebin;

This will produce a list of drop statements. Not all of them will execute - if you drop with cascade, dropping the PK_* indices will fail. But in the end, you will have a pretty clean schema. Confirm with:

select * from user_objects

Source: http://jmatrix.net/dao/case/case.jsp?case=7F000001-E22F2B-10CCCCB2924-862

quarta-feira, agosto 23, 2006

Change Oracle XE (licence) homepage

The default homepage for Oracle XE is a licence page.
This file is located at the server and is name its index.html

To change this file you must...
1) Open the webdav directory where the oracle files are located as a web folder.

2) Authenticate as the user database system.

3) Change the index.htm file