Różności …

Różności …

25 stycznia 2011

Konfiguracja Oracle WebLogic Server.

Zaszufladkowany do: WebLogic — Tagi: — Jacek @ 08:52

A domain can include multiple WebLogic Server instances. A minimal domain contains only one WebLogic Server instance, which functions both as an Administration Server and as a Managed server—such a domain can be useful while developing applications.

A Managed Server is a WebLogic Server instance that retrieves its configuration data from the domain’s Administration Server. There can be many Managed Servers in a domain, but only one Administration Server.
Any server instance that you define for a domain can run as an Administration Server or a Managed Server.There is no attribute within a server’s configuration that designates it as an Administration Server or Managed Server. Instead, the first server instance that you start in a domain always functions as the Administration Server.

Konfiguracja NodeManager’a:
The WebLogic Server installation process installs Node Manager as an operating system service: a daemon on UNIX systems, or a Windows service on Windows systems. By default, the operating system service starts up Node Manager to listen on localhost:5555.
The directory WL_HOME\server\bin (where WL_HOME is the top-level directory for the WebLogic Server installation) contains uninstallNodeMgrSvc.cmd, a script for uninstalling the Node Manager service, and installNodeMgrSvc.cmd, a script for installing Node Manager as a service.

Naszym celem będzie skonfigurowanie Administration Servera i Managed Servera na naszym hoście (Linux Fedora 14, 64 bit)
Staname wyjściowym jest zainstalowany WebLogic Server. Nie ma na razie zainstalowanego Administration Servera and żadnego Managed servera.
Uruchamiamy nasz słynny skrypt:
/home/oracle/Oracle/Middleware/wlserver_10.3/common/quickstart/quickstart.sh

Wybieramy “Getting started …”

W tej chwili mamy zainstalowane: Administration Server (admserver) i Managed Server (ManagedServer1).
Czas na uruchomienie admserver’a:
cd /home/oracle/Oracle/Middleware/user_projects/domains/admserver
startWebLogic.sh &

Zobaczmy co się dzieje na konsoli:

http://192.168.0.83:7001/console

Jak widać, mamy dwa serwery. Jeden (admserver) nawet działa :-)
Aby uruchomić ManagedServer1 będziesz musiał wcześniej uruchomić NodeManager’a.

Uruchomienie NodeManager’a
/home/oracle/Oracle/Middleware/wlserver_10.3/server/bin/startNodeManager.sh
zobaczymy odpowidnie komunikaty:

Teraz możemy wrócić do konsoli i uruchomić ManagedServer1

No i działa :-)

Źródła:
http://download.oracle.com/docs/cd/E13222_01/wls/docs81/ConsoleHelp/servers.html
http://download.oracle.com/docs/cd/E13222_01/wls/docs81/adminguide/confignodemgr.html

24 stycznia 2011

Poznań – styczeń 2011

Zaszufladkowany do: Zdjęcia — Tagi: — Jacek @ 22:36

Fotki z sieci.

Zaszufladkowany do: Z sieci — Tagi: — Jacek @ 13:58

20 stycznia 2011

Oracle Fussion Middleware: Oracle WebLogic Server installation.

Zaszufladkowany do: WebLogic — Tagi: , — Jacek @ 09:32

WebLogic Server - implements JEE technologies, Web services and other standards, to provide a framework for highly available, scalable and secure applications. Java EE5- compliant application server runtime. Contain Web browser-based, graphical user interface to manage w WebLogic Server domain.

Oracle WebLogic Server is a scalable, enterprise-ready Java Platform, Enterprise Edition (Java EE) application server. The WebLogic Server infrastructure supports the deployment of many types of distributed applications and is an ideal foundation for building applications based on Service Oriented Architectures (SOA). SOA is a design methodology aimed at maximizing the reuse of application services. See http://www.oracle.com/technology/tech/soa/index.html.
The WebLogic Server complete implementation of The Sun Microsystems Java EE 5.0 specification provides a standard set of APIs for creating distributed Java applications that can access a wide variety of services, such as databases, messaging services, and connections to external enterprise systems. End-user clients access these applications using Web browser clients or Java clients. It also supports the Spring Framework, a programming model for Java applications which provides an alternative to aspects of the Java EE model. See Programming Models.

  • Web Applications provide the basic Java EE mechanism for deployment of dynamic Web pages based on the Java EE standards of Servlets and Java ServerPages (JSP). Web applications are also used to serve static Web content such as HTML pages and image files.
  • Web Services provide a shared set of functions that are available to other systems on a network and can be used as a component of distributed Web-based applications.
  • XML capabilities include data exchange, and a means to store content independent of its presentation, and more.
  • Java Messaging Service (JMS) enables applications to communicate with one another through the exchange of messages. A message is a request, report, and/or event that contains information needed to coordinate communication between different applications.
  • Java Database Connectivity (JDBC) provides pooled access to DBMS resources.
  • Resource Adapters provide connectivity to legacy and other external enterprise systems.
  • Enterprise JavaBeans (EJB) provide Java objects to encapsulate data and business logic.
  • Remote Method Invocation (RMI) is the Java standard for distributed object computing, allowing applications to invoke methods on a remote objects

WebLogic Server Components:

Web 2.0 HTTP Pub-Sub Server – a channels based subscribe/publish mechanism for web based clients to send and receive asynchronous messages over HTTP

WebLogic SCA - a spring container, based on the SCA Spring Component Implementation Specification, for deploying Java applications containing POJOs wired with SCA semantics.

WebLogic JDBC Drivers – collection of JDBC drivers and tools that can be used to connect to a database. Supported datbases: DB2, Informix, Oracle, SQL Server, Sybase. WebLogic include also third party drivers.

WebLogic Server Clients - thin client jars required to connect a remote client to a WebLogic server, including RMI clients, WSEE  clients, JMS clients

WebLogic Web Server Plugins – plugins used to proxy and load balance HTTP requests from a Web server to WebLogic Server.

UDDI and Xquery Support – implementation for UDDI and a UDDI Explorer application which allows authorized users to publish Web Services in private WebLogic Server UDDI registries. Includes implementation of the Xquery standard.

Evaluation Database – allows to run code examples with functional database server. A Derby is included – an open source relational database implemented entirely in Java.

Oracle Coherence – provides reliable distributed in-memory data management and caching services on top of a highly scalable peer-to-peer clustering protocol. (supported languages: Java, .NET, C++)

Coherence Product Files – in-memory data grid solution is a shared infrastructure that combines data locality with local processing power to perform real-time data analysis, in-memory grid computations, and parallel transaction and event processing.

Instalacja na Linux Fedora 14 (64 Bit)

Instalację OHS zaczynamy od zainstalowania Oracle WebLogic Servera. (do wyboru NetInstaller lub PackageInstaller)
./WebLogicServer_wersja_linux32.bin (u mnie instalka w trybie Console)

Release 10.3.4.0
    |_____WebLogic Server [1] x
    |    |_____Core Application Server [1.1] x
    |    |_____Administration Console [1.2] x
    |    |_____Configuration Wizard and Upgrade Framework [1.3] x
    |    |_____Web 2.0 HTTP Pub-Sub Server [1.4] x
    |    |_____WebLogic SCA [1.5] x
    |    |_____WebLogic JDBC Drivers [1.6] x
    |    |_____Third Party JDBC Drivers [1.7] x
    |    |_____WebLogic Server Clients [1.8] x
    |    |_____WebLogic Web Server Plugins [1.9] x
    |    |_____UDDI and Xquery Support [1.10] x
    |    |_____Server Examples [1.11] x
    |    |_____Evaluation Database [1.12] x
    |_____Oracle Coherence [2] x
    |    |_____Coherence Product Files [2.1] x
    |    |_____Coherence Examples [2.2] x
    |_____Oracle Enterprise Pack for Eclipse [3] x
         |_____Common Files [3.1] x

JDK
   1|Add Local Jdk
   2|/home/oracle/Oracle/Middleware/jdk160_21[x]*
   3|/home/oracle/Oracle/Middleware/jrockit_160_22_D1.1.1-3[x]*

1|WebLogic Server: [/home/oracle/Oracle/Middleware/wlserver_10.3]
2|Oracle Coherence: [/home/oracle/Oracle/Middleware/coherence_3.6]
3|Oracle Enterprise Pack for Eclipse:
[/home/oracle/Oracle/Middleware/oepe_11gR1PS3]

The following Products and JDKs will be installed:
--------------------------------------------------

    WebLogic Platform 10.3.4.0
    |_____WebLogic Server
    |    |_____Core Application Server
    |    |_____Administration Console
    |    |_____Configuration Wizard and Upgrade Framework
    |    |_____Web 2.0 HTTP Pub-Sub Server
    |    |_____WebLogic SCA
    |    |_____WebLogic JDBC Drivers
    |    |_____Third Party JDBC Drivers
    |    |_____WebLogic Server Clients
    |    |_____WebLogic Web Server Plugins
    |    |_____UDDI and Xquery Support
    |    |_____Server Examples
    |    |_____Evaluation Database
    |_____Oracle Coherence
    |    |_____Coherence Product Files
    |    |_____Coherence Examples
    |_____Oracle Enterprise Pack for Eclipse
    |    |_____Common Files
    |_____JDKs
         |_____SUN SDK 1.6.0_21
         |_____Oracle JRockit 1.6.0_22 SDK

    *Estimated size of installation: 1 665,9 MB
Installation Complete
Congratulations! Installation is complete.
Press [Enter] to continue or type [Exit]>

When the product installation is completed using graphical-mode installation, the QuickStart application is launched automatically, by default. If you do not want to run QuickStart at the completion of the installation process, you can clear the Run QuickStart check box in the Install Complete window. QuickStart is not invoked for console-mode or silent-mode installations.

QuickStart is designed to help first-time users evaluate, learn, and use Products software.

After installation, you can launch QuickStart as follows:
/home/oracle/Oracle/Middleware/wlserver_10.3/common/quickstart/quickstart.sh
i tu pojawił się problemik z Javą:
./quickstart.sh
Exception in thread “Main Thread” java.lang.UnsatisfiedLinkError: Can’t load library: /home/oracle/Oracle/Middleware/jrockit_160_22_D1.1.1-3/jre/lib/i386/xawt/libmawt.so
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1702)
at java.lang.Runtime.load0(Runtime.java:770)
at java.lang.System.load(System.java:1004)
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1803)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1720)
at java.lang.Runtime.loadLibrary0(Runtime.java:823)
at java.lang.System.loadLibrary(System.java:1029)
at sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:51)
at java.awt.Toolkit.loadLibraries(Toolkit.java:1594)
at java.awt.Toolkit.<clinit>(Toolkit.java:1615)
at java.awt.Color.<clinit>(Color.java:263)
at javax.swing.plaf.metal.MetalTheme.<clinit>(MetalTheme.java:59)
at javax.swing.plaf.metal.MetalLookAndFeel.getCurrentTheme(MetalLookAndFeel.java:1673)
at javax.swing.plaf.metal.MetalLookAndFeel.createDefaultTheme(MetalLookAndFeel.java:1569)
at javax.swing.plaf.metal.MetalLookAndFeel.getDefaults(MetalLookAndFeel.java:1590)
at javax.swing.UIManager.setLookAndFeel(UIManager.java:514)
at javax.swing.UIManager.setLookAndFeel(UIManager.java:554)
at javax.swing.UIManager.initializeDefaultLAF(UIManager.java:1317)
at javax.swing.UIManager.initialize(UIManager.java:1407)
at javax.swing.UIManager.maybeInitialize(UIManager.java:1394)
at javax.swing.UIManager.getDefaults(UIManager.java:634)
at javax.swing.UIManager.put(UIManager.java:962)
at com.bea.quickstart.QuickStartController.<clinit>(QuickStartController.java:54)
Could not find the main class: com.bea.quickstart.QuickStartController. Program will exit.

Więc zrobimy wszystko porządnie, tak jak powinno być na 64 bitowych platformach w myśl zasady: “Gdy wszystko zawiedzie przeczytaj instrukcję” :-)

Ze strony Oracle (patrz źródła: Oracle WebLogic Server download)
Note: This table includes links to WebLogic Server installers that include 32-bit JVMs for the platform
in question, and links to WebLogic Server generic installers that can be used on any supported platform.
To use WebLogic Server with 64-bit JVM’s on Linux and Solaris or to use WLS on other supported
platforms, use the WebLogic Server generic installer listed under “Additional Platforms”. The generic
installers do not include a JVM/JDK. For instructions on using the generic installers, see this document.

pobieram: wls1034_generic.jar

Instaluję JDK (źródła: JDK download)
w katalogu /usr/local/bin
./jdk-6u23-linux-x64.bin

dla użytkownika oracle ustawiam zmienną PATH (.bash_profile):
JAVA_HOME=/usr/local/bin/jdk1.6.0_23
export JAVA_HOME
PATH=$JAVA_HOME/bin:$PATH; export PATH

java -d64 -version (sprawdzam czy jest OK)

Instaluję Oracle WebLogic Server

java -d64 -jar wls1034_generic.jar  – piękna graficzna instalka :-)

Tym razem pełny sukces :-)
/home/oracle/Oracle/Middleware/wlserver_10.3/common/quickstart/quickstart.sh

Wybieram “Getting started with WebLogic Server”
tworzę nową domenę:

cd /home/oracle/Oracle/Middleware/user_projects/domains/mirlocal/

./startWebLogic.sh (Administration Server)

można się zalogować na: http://192.168.0.83:7001/console/

cd /home/oracle/Oracle/Middleware/user_projects/domains/mirlocal/bin

./stopWebLogic.sh

Źródła:
http://download.oracle.com/docs/cd/E12839_01/doc.1111/e14260/overview.htm#sthref11
http://apex-at-work.blogspot.com/2010/11/oracle-http-server-ohs-part-of-oracle.html
http://download.oracle.com/docs/html/E18558_01/fusion_requirements.htm (wymagania)
http://download.oracle.com/docs/cd/E12839_01/doc.1111/e14142/toc.htm (Oracle WebLogic Server)
http://onlineappsdba.com/index.php/2009/11/23/how-to-install-weblogic-server-on-64-bit-os-linux-solaris/ (instalacja WebLogic Server na platformach 64 bit)
http://www.oracle.com/technetwork/middleware/weblogic/downloads/wls-main-097127.html (Oracle WebLogic Server download)
http://www.oracle.com/technetwork/java/javase/downloads/index.html (JDK download)
http://download.oracle.com/docs/cd/E12839_01/wls.htm (Oracle WebLogic Server docs)
http://www.slideshare.net/jambay/oracle-weblogic-server-basic-concepts-presentation
http://download.oracle.com/docs/cd/E13222_01/wls/docs90/ConsoleHelp/taskhelp/domainconfig/CreateManagedServers.html
http://download.oracle.com/docs/cd/E13222_01/wls/docs81/ConsoleHelp/servers.html
http://download.oracle.com/docs/cd/E11035_01/installGuide100/confgwiz/examples.html

Oracle Temporary tablespaces.

Zaszufladkowany do: Bazy danych,Oracle — Tagi: — Jacek @ 09:00

Temporary tablespaces are used to manage space for database sort operations and for storing global temporary tables. For example, if you join two large tables, and Oracle cannot do the sort in memory (see SORT_AREA_SIZE initialisation parameter), space will be allocated in a temporary tablespace for doing the sort operation. Other SQL operations that might require disk sorting are: CREATE INDEX, ANALYZE, Select DISTINCT, ORDER BY, GROUP BY, UNION, INTERSECT, MINUS, Sort-Merge joins, etc.

The DBA should assign a temporary tablespace to each user in the database to prevent them from allocating sort space in the SYSTEM tablespace.

Note that a temporary tablespace cannot contain permanent objects and therefore doesn’t need to be backed up.

Unlike normal data files, TEMPFILEs are not fully initialised (sparse). When you create a TEMPFILE, Oracle only writes to the header and last block of the file. This is why it is much quicker to create a TEMPFILE than to create a normal database file.

TEMPFILEs are not recorded in the database’s control file. This implies that one can just recreate them whenever you restore the database, or after deleting them by accident. This opens interesting possibilities like having different TEMPFILE configurations between permanent and standby databases, or configure TEMPFILEs to be local instead of shared in a RAC environment.

One cannot remove datafiles from a tablespace until you drop the entire tablespace. However, one can remove a TEMPFILE from a database. Look at his example:

SQL> ALTER DATABASE TEMPFILE '/oradata/temp02.dbf' DROP INCLUDING DATAFILES;

If you remove all tempfiles from a temporary tablespace, you may encounter error: ORA-25153: Temporary Tablespace is Empty. Use the following statement to add a TEMPFILE to a temporary tablespace:

SQL> ALTER TABLESPACE temp ADD TEMPFILE '/oradata/temp03.dbf' SIZE 100M;

Except for adding a tempfile, as illustrated in the above example, you cannot use the ALTER TABLESPACE statement for a locally managed temporary tablespace (operations like rename, set to read only, recover, etc. will fail).

SQL> CREATE TEMPORARY TABLESPACE temp
      TEMPFILE '/oradata/mytemp_01.tmp' SIZE 20M
      EXTENT MANAGEMENT LOCAL UNIFORM SIZE 16M;
For best performance, the UNIFORM SIZE must be a multiple of the SORT_AREA_SIZE parameter.

To see the default temporary tablespace for a database, execute the following query: SQL> SELECT * FROM DATABASE_PROPERTIES where PROPERTY_NAME='DEFAULT_TEMP_TABLESPACE'; Unlike datafiles, tempfiles are not listed in V$DATAFILE and DBA_DATA_FILES. Use V$TEMPFILE and DBA_TEMP_FILES instead. One can monitor temporary segments from V$SORT_SEGMENT and V$SORT_USAGE DBA_FREE_SPACE does not record free space for temporary tablespaces. Use V$TEMP_SPACE_HEADER instead:

SQL> select TABLESPACE_NAME, BYTES_USED, BYTES_FREE from V$TEMP_SPACE_HEADER;

TABLESPACE_NAME                BYTES_USED BYTES_FREE
------------------------------ ---------- ----------
TEMP                             52428800   52428800

Oracle 9i does not release allocated TEMP segments until you shutdown the database. While the TEMP segment is allocated, it does not mean that it is unavailable for use. When a user requests a disk sort, Oracle will allocate a TEMP segment. Once that sort is done, Oracle releases this TEMP segment for future use, but does not deallocate it. When the next user requests a disk sort, Oracle does not have to allocate a new TEMP segment. It uses the same one that no user is currently using. Oracle manages this for you in 9i. And there is really only one TEMP segment in the TEMP tablespace. Multiple users can utilitize this one segment.
There have been problems in 9i where users running a TEMPORARY TEMP tablespace with TEMPFILES that is Locally Managed where Oracle does not release the sort space once it is no longer being used. This is a known bug. The workaround has been to revert back to Dictionary Managed tablespace for TEMP.

Tekst pochodzi ze strony: http://www.orafaq.com/node/2

19 stycznia 2011

VNC na ubuntu.

Zaszufladkowany do: Linux — Tagi: — Jacek @ 11:18

klient: http://www.tightvnc.com

sudo apt-get install vnc4server
uruchomienie: vnc4server
konfig: home/user/.vnc/xstartup

dodatkowe informacje: https://help.ubuntu.com/community/VNC/Servers

remote desktop: http://www.debianadmin.com/remote-desktop-sharing-in-ubuntu.html

18 stycznia 2011

Wydajność dysków.

Zaszufladkowany do: Linux,Windows — Tagi: , — Jacek @ 22:53

SATA I (150 MB/s) or SATA II (300 MB/s)

Ot, zachciało mi się sprawdzić wydajność dysków na których pracuje baza danych oracle pod windowsami.
Pośród sporej ilości płatnych programów, trafiłem na darmowy Disk Thruput Tester – polecam.
Strona domowa: http://disktt.en.softonic.com/ (tu znajdziesz najnowszą wersję)
Program też możesz pobrać ode mnie: DiskTT

A co z Linuksem:
sequential access:
hdparm -tT /dev/sda
dla bardziej miarodajnych wyników test należy powtórzyć kilkakrotnie
tu z kolei patrzymy na wydajność w różowych okularkach :-)
random access:
można użyć programu seeker.c (kompilacja: gcc -O2 seeker.c -o seeker)
(dokładny opis działania na stronie: http://www.linuxinsight.com/how_fast_is_your_disk.html)
./seeker /dev/sda
ilość seeks/sec należy pomnożyć przez 4096 – otrzymujemy ilość bajtów na sekundę)
Gorszej wydajności już raczej nie będzie :-)

dd if=/dev/zero of=/tmp/output.img bs=8k count=256k
dd if=/dev/zero of=/tmp/output.img bs=64k count=32768
rm /tmp/output.img

iostat (http://www.cyberciti.biz/tips/linux-disk-performance-monitoring-howto.html)

graficznie: palimpsest
można przetestować wydajność odczytu, przy zapisach wymagane jest aby dysk był pusty

14 stycznia 2011

Instalacja Oracle11g na Fedora 14 (64 Bit)

Zaszufladkowany do: Bazy danych,Oracle — Tagi: — Jacek @ 09:18

Tu można znaleźć wszystko czego dusza zapragnie:
http://www.oracle-base.com/articles/11g/OracleDB11gR2InstallationOnFedora14.php

Fajna strona o parametrach SHMALL, SHMMAX ..
http://www.idevelopment.info/data/Oracle/DBA_tips/Linux/LINUX_8.shtml

Fajna strona o ustawianiu parametrów TCP w Linuksie:
http://www.speedguide.net/articles/linux-tweaking-121

Strona o instalacji OHS:
http://apex-at-work.blogspot.com/2010/11/oracle-http-server-ohs-part-of-oracle.html

aio-nr & aio-max-nr:
	aio-nr is the running total of the number of events specified on the
	io_setup system call for all currently active aio contexts.  If aio-nr
	reaches aio-max-nr then io_setup will fail with EAGAIN.  Note that
	raising aio-max-nr does not result in the pre-allocation or re-sizing
	of any kernel data structures.
you can increase the maximum number of open files by setting a new value
in kernel variable /proc/sys/fs/file-max
Setting SHMALL Parameter
This parameter sets the total amount of shared memory pages that can
be used system wide. Hence, SHMALL should always be at least
ceil(shmmax/PAGE_SIZE).
The default size for SHMALL in RHEL 3/4 and 2.1 is 2097152 which is also
Oracle's recommended minimum setting for 9i and 10g on x86 and x86-64
platforms. In most cases this setting should be sufficient since it means
that the total amount of shared memory available on the system is
2097152*4096 bytes (shmall*PAGE_SIZE) which is 8 GB. PAGE_SIZE is usually
4096 bytes unless you use Big Pages or Huge Pages which supports the
configuration of larger memory pages.
First off, editing sysctl.conf doesn't change the value until you either reboot, or execute:
sysctl -p
To have it reload the values.
You mention this is a 32-bit Linux. That puts constraints on how large you can set SHMMAX
 to and how big the Oracle SGA can be. See Installing Oracle9i on FC2 for more information
 about the limits you'll run into here. The largest generally useful setting is this:
kernel.shmmax=2147483648
And since the one you tried is >4GB that's why it failed altogether.
Many people seem to use some guide or Oracle's suggestions for a setting here as a magic
number without actually considering whether the shared memory values really make sense
for their system or not. I wrote the following little script to generate the settings
for me on Linux. As written, it limits the shared memory block to 50% of total RAM, which
might be light for your Oracle use; easy to adjust it to a higher percentage.
I hate seeing people set this value to higher than the amount of RAM in their server.
#!/bin/bash
mem_bytes=`awk '/MemTotal:/ { printf "%0.f",$2 * 1024}' /proc/meminfo`
mem_max=`expr $mem_bytes / 2`
page_size=`getconf PAGE_SIZE`
shmall=`expr $mem_bytes / $page_size`
echo \# Maximum shared segment size in bytes
echo kernel.shmmax = $mem_max
echo \# Maximum number of shared memory segments in pages
echo kernel.shmall = $shmall
The output from this can get written right to the end of the sysctl.conf, run "sysctl -p",
and you're off with a reasonable yet safe setting.
shmmni specifies the maximum number of shared memory segments allowed to exist simultaneously,
system-wide.
Setting shmmni to an arbitrarily large number wastes memory and can degrade system performance.
 Setting the value too high on systems with small memory configuration may consume enough memory
space that the system cannot boot. Select a value that is as close to actual system requirements
as possible for optimum memory usage. A value not exceeding 1024 is recommended unless system
requirements dictate otherwise.

Semaphores can best be described as counters which are used to provide synchronization between
processes or between threads within a process for shared resources like shared memories.
System V semaphores support semaphore sets where each one is a counting semaphore. So when an
application requests semaphores, the kernel releases them in “sets”. The number of semaphores
per set can be defined through the kernel parameter SEMMSL
/proc/sys/net/core/rmem_max - Maximum TCP Receive Window
/proc/sys/net/core/wmem_max - Maximum TCP Send Window
/proc/sys/net/ipv4/tcp_rmem - memory reserved for TCP rcv buffers (reserved memory per connection default)
/proc/sys/net/ipv4/tcp_wmem  - memory reserved for TCP snd buffers (reserved memory per connection default)

/etc/selinux/config
ustawić selinux=disabled
The xhost program is used to add and delete host names or user names to the list allowed to make connections
to the X server.
Po wykonaniu instalki wg. instrukcji instalator dalej marudzi:


Gdy się da ignoruj, to wywala się na linkowaniu binariów:
aby pozbyć się błędu ins_emagent.mk należy:
This error is due to a change in the GCC linker in Fedora 13. The announcement is here. The fix is to
edit $ORACLE_HOME/sysman/lib/ins_emagent.mk, search for the line $(MK_EMAGENT_NMECTL) and replace the
line with $(MK_EMAGENT_NMECTL) -lnnz11 as shown above.
Informacja pochodzi ze strony:
http://blog.fpmurphy.com/2010/08/installing-oracle-11g-release-2-on-fedora-13.html#ixzz1BIWbQ3ps

Logowanie do EM: OK
emctl stop dbconsole
emctl start dbconsole

13 stycznia 2011

Instalacja APEX 4.0.2

Zaszufladkowany do: ApEx,Oracle — Tagi: , — Jacek @ 13:11

Pobieram najnowszego APEXa z: http://www.oracle.com/technetwork/developer-tools/apex/downloads/index.html

Kopiuję rozpakowany katalog do: /home/oracle/orahome/base/db11gr2/apex402

Będąc w katalogu /home/oracle/orahome/base/db11gr2/apex402/owa loguję się na SYSa do bazy.

Instaluję najnowszą wersję PL/SQL Web Toolkit:
Aktulaną wersję można sprawdzić przez: SQL>select owa_util.get_version from dual;  (moja była: 10.1.2.0.8)
SQL>@owainst.sql
Dostałem informację, że mam już nowszą wersję i że nie jest wymagana instalacja.

Będąc w katalogu /home/oracle/orahome/base/db11gr2/apex402 loguję się na SYSa do bazy.
Uruchamiamy skrypt upgradeu z parametriami.
Pierwszy parametr to przestrzeń tabel w jakiej powinny być składowane obiekty bazodanowe (tablespace_apex) , drugi parametr to przestrzeń tabel w której maja byc składane pliki (tablespace_files), trzeci parametr to przestrzeń tymczasowa która ma być wykorzystywana przez APEX (tablespace_temp), przestrzeń ta musi być typem przetrzeni tabel tymczasowych. Ostatnim elementem jest tzw. katalog wirtualny (images), w którym znajdować się będą pliki graficzne i odpowiadające za wygląd templatów.
SQL> @apexins APEX APEX APEX_TMP apeximages

.. wśród całej masy komunikatów otrzymamy między innymi:

The structure of the link to the Application Express administration services is as follows:
http://host:port/pls/apex/apex_admin (Oracle HTTP Server with mod_plsql)
http://host:port/apex/apex_admin     (Oracle XML DB HTTP listener with the embedded PL/SQL gateway)
The structure of the link to the Application Express development interface is as follows:
http://host:port/pls/apex (Oracle HTTP Server with mod_plsql)
http://host:port/apex     (Oracle XML DB HTTP listener with the embedded PL/SQL gateway)
JOB_QUEUE_PROCESSES: 1000

Na mojej testowej (czytaj gównianej) maszynie, skrypt wykonywał się przez 16 minut.

Teraz pozostało nam wykonanie podmiany plików graficznych, css i javascript.
W tym celu należy uruchomić skrypt: apxldimg.sql
Skrypt ten przyjmuje tylko jeden argument: lokalizację katalogu z instalką ApEx’a.
Skrypt załaduje obrazki do XDB.

SQL> @apxldimg.sql /home/oracle/orahome/base/db11gr2/apex402


old   1: create directory APEX_IMAGES as ‘&1/apex/images’
new   1: create directory APEX_IMAGES as ‘/home/oracle/orahome/base/db11gr2/apex402/apex/images’
Directory created.
declare
*
ERROR at line 1:
ORA-22288: file or LOB operation FILEOPEN failed
No such file or directory
ORA-06512: at “SYS.XMLTYPE”, line 296
ORA-06512: at line 15

Ostatni krok to ustawienie hasła dla Administratora workspace-ów.

SQL> @apxxepwd.sql jakies_haslo

Session altered.
…changing password for ADMIN
PL/SQL procedure successfully completed.

12 stycznia 2011

Odessa – sierpień 2009

Zaszufladkowany do: Podróże,Zdjęcia — Tagi: , — Jacek @ 01:56

7 stycznia 2011

PL/SQL Associative Arrays

Zaszufladkowany do: PL/SQL — Tagi: — Jacek @ 15:04

declare
type assoc_arr is table of varchar2(255) index by varchar2(255);
apollo_commanders assoc_arr;
begin
apollo_commanders(‘Apollo 11′) := ‘Neil Armstrong’;
apollo_commanders(‘Apollo 12′) := ‘Pete Conrad’;
apollo_commanders(‘Apollo 13′) := ‘James Lovell’;
apollo_commanders(‘Apollo 14′) := ‘Alan Shepard’;
apollo_commanders(‘Apollo 15′) := ‘David Scott’;
apollo_commanders(‘Apollo 16′) := ‘John W. Young’;
apollo_commanders(‘Apollo 17′) := ‘Eugene A. Cernan’;

dbms_output.put_line(apollo_commanders(‘Apollo 11′));
dbms_output.put_line(apollo_commanders(‘Apollo 14′));
end;
/

– Results:
– Neil Armstrong
– Alan Shepard

Znalezione na: http://tylermuth.wordpress.com/2008/02/21/plsql-associative-arrays/

4 stycznia 2011

Iran – info

Zaszufladkowany do: BLOG — Tagi: , — Jacek @ 12:06

Plan podróży:

Przelot do Erevania. Przejazd do Vanadzor. Motocyklem do Iranu. Do zatoki.
Powrót do Armenii przez Teheran.
Arminia – spotkanie z Markiem. Wspólne zwiedzanie Armenii i Gruzji.
Promem z Batumi do Odessy.
Z Odessy przez Lwów do granicy z Polską.
Przez Ciechanów do Gdyni.


Poglądowa mapa podróży: Wakacje 2011 – ogólna

Do zrobienia:

  • międzynarodowe prawko
  • Carnet de passage (PZM-ot w Warszawie, wyrobienie ok 2 tyg)
    podobno można załatwić w ADAC w Monachium, wszystko pocztą. Opłata wynosi 250 EUR (za 25 kartek), no i kaucja 3.000 EUR. (informacja nie sprawdzona)
    400 zł – wydanie w PZMocie (04.01.2011).
    kaucja za motocykl (16000zł, 04.01.2011).
    ZASADY-KORZYSTANIA-Z-KARNETU-CPD
    ogolne-informacje
  • wymiana pieniędzy
  • wizy dla mnie i Rimy (50 e od głowy) (ważne tylko przez 3 miesiące od daty wydania) Podobno szanse na pozytywne rozpatrzenie wniosku to ok 50%.
  • kupić namiot
  • kupić kufry
  • spodnie motocyklowe dla mnie
  • nowy kask dla mnie

INFO

Strony które warto odwiedzić:
IRAN BLOG
Przewodnik – Iran
Ambasada Iranu w Warszawie
iran2008ceny (znalezione na:
http://www.transazja.pl/pl-12.html)

Iran w 1935 roku odszedł od nazwy Persja.

Na północy – góry, w centralnej i wschodniej części kraju występują pustynie.
W Iranie panuje klimat zwrotnikowy i podzwrotnikowy, ze znacznymi terenami dotkniętymi suszą.

W większości Irańczycy to muzułmanie, chociaż jest wśród nich sporo niewierzących, którzy jednak nie mogą tego zdeklarować publicznie. Iran ma niemałą społeczność zoroastrian (wyznawców starożytnej religii perskiej), z głównym skupiskiem w okolicach Jezdu. Razem z Ormianami i innymi tradycyjnie mieszkającymi w Iranie chrześcijanami (np. asyryjczycy) cieszą się oni względną swobodą wyznania.

Dość powszechna jest odmowa przyjęcia zapłaty, np. przez taksówkarza. Nie należy jednak na coś takiego przystawać, zachowanie to bowiem wynika jedynie z powszechnej uprzejmości. Przejęcie propozycji będzie odebrane jako totalny brak kultury.

Do Iranu zabronione jest wwożenie alkoholu, środków odurzających, a także materiałów godzących w wartości muzułmańskie (np. pornografia).

Trzeba zwrócić uwagę, że nie można posługiwać się kartami kredytowymi czy debetowymi banków nieirańskich – ani w bankomatach, ani przy transakcjach bezgotówkowych. Należy więc mieć ze sobą odpowiednią ilość gotówki!

W Iranie można płacić też dolarami, jednak kurs bywa wtedy niekorzystny, a za drobne zakupy mimo wszystko lepiej zapłacić lokalną walutą. Euro nie jest tak mile widziane jak dolar.

kurs: 1 USD – 10950.400 IRR bez zmian
kurs: 1 PLN – 3698.210 IRR
data notowania: 2010-10-31

Urzędowym językiem Iranu jest farsi, czyli język perski. Na północnym-zachodzie kraju mówi się jednak po turecku (azersku). Wiele osób zna język angielski i szuka okazji, by go podszlifować, więc gdy widzi obcokrajowca stara się zagadać i dowiedzieć choć paru rzeczy o nim.
Pismo perskie dało początek alfabetu arabskiego. Drogi są dobrze opisane i nazwy miejscowości transkrybowane na alfabet łaciński.

Kuchnia perska składa się głównie z ryżu i kebaba w towarzystwie niesłodkiego jogurtu, popijanego dugh-em. Mięso czywiście jest halal, czyli czyste w sensie religijnym. Nie podaje się więc wieprzowiny. Bezmięsne są zupy - asz.

Iran oferuje zróżnicowaną ofertę noclegową. Oszczędnym wystarczą proste i skromne schroniska dla pielgrzymów, tzw. mosaferchune. W każdym mieście znajdzie się też spanie na przecietną kieszeń od 20 do 40 EUR za pokój z podwójnym łóżkiem. A kto dysponuje większymi możliwościami finansowymi, ten znajdzie i coś dla siebie, lecz wybór w niektórych miejsach może być zawężony do jednego lub dwóch hoteli.

Koszt wizy dla obywateli Ukrainy i Polski (50 euro) (04.01.2011) Płatne z góry.
Podobno ok 50% wiz jest odrzucanych. Można spróbować załatwić przez agencje turystyczne.
W przypadku odrzucenia wizy, pieniądze nie są zwracane.

Największy problem związany z wjazdem do Iranu samochodem to niejaki Carnet de passage czyli krótko mówiąc kaucja zwrotna – dokument zabezpieczający, zapewniający państwo, że tak jak wjechaliśmy – tak też wyjedziemy. Załatwia się go w PZM-ocie w Warszawie.
Carnet de passage to sprawa kosztowna, kosztuje 20 000zł plus 350zł za wystawienie dokumentu. Formalności trwają ok. 1,5 tygodnia gdyż musi on zostać autoryzowany w Genewie.
Warto też wyrobić międzynarodowe prawo jazdy.

ROZMÓWKI:
Polska - Lachestaan
polski - lachestaani
dzień dobry (ogólne) - salaam!
dzień dobry (rano) - sob becheyr!
dzień dobry (po południu) - asr becheyr!
dobry wieczór - szab becheyr!
do widzenia - chodaa haafez!
dziękuję - mersi, motaszakkeram
przepraszam - bebachszid
tak - bali
nie - na
dobrze - baasze, chubam
źle - bad, ghalat
ja - man
ty - to (potocznie)
ty - szomaa (uprzejmie)
on/a/o - u (ożywione)
on/a/o - aan (nieożywione)
my - maa
wy - szomaa
oni - aanhaa
jestem - (hast)am
jesteś - hasti
jest - (ha)st
jesteśmy - hastim
jesteście - hastid
są - hastand
jestem Polakiem - man lachestaani am
jestem studentem - man daaneszdżu am
kim pan jest? - shomaa ki hasti?
gdzie jest ...? - ... kodżaast?
gdzie jest bank? - baank kodżaast?
ojciec - pedar
matka - maadar
siostra - chaahar
brat - baraadar
rodzina - chaanevaade
jeden - yek
dwa - do
trzy - se
cztery - czahaar
pięć - pandż
sześć - szisz
siedem - haft
osiem - haszt
dziewięć - noh
dziesięć - dah

dwadzieścia - bist
dwadzieścia jeden - bist o yek
trzydzieści - si
trzydzieści trzy - si o se
czterdzieści - czehel
sto - sad
AMBASADY:
Teheran
No. 1/3, Pirouz St., Africa Expressway
tel. +98 21 8878 7262 do 64
faks +98 21 8878 8774
www: www.teheran.polemb.net

Sekcja konsularna
faks +98 21 8887 2627
P.O. Box: 11365-3489
mail ambasada@teheran.polemb.net

Ambasada Iranu w Warszawie

ul. Królowej Aldony 22
03-928 Warszawa
tel. +48 22 6174293, 6171585
faks +48 22 6178452
www: www.iranemb.warsaw.pl

3 stycznia 2011

PL/SQL – functions, zwrot wartości tablicy z funkcji.

Zaszufladkowany do: PL/SQL — Tagi: — Jacek @ 13:16

Tu jest dobry artykuł o funkcjach.

A function is a named PL/SQL Block which is similar to a procedure. The major difference between a procedure and a function is, a function must always return a value, but a procedure may or may not return a value.

The General Syntax to create a function is:

CREATE [OR REPLACE] FUNCTION function_name [parameters]
RETURN return_datatype;
IS
Declaration_section
BEGIN
Execution_section
Return return_variable;
EXCEPTION
exception section
Return return_variable;
END;

1) Return Type: The header section defines the return type of the function. The return datatype can be any of the oracle datatype like varchar, number etc.
2) The execution and exception section both should return a value which is of the datatype defined in the header section.

For example, let’s create a frunction called ”employer_details_func’ similar to the one created in stored proc

1> CREATE OR REPLACE FUNCTION employer_details_func
2>    RETURN VARCHAR(20);
3> IS
5>    emp_name VARCHAR(20);
6> BEGIN
7>	SELECT first_name INTO emp_name
8>	FROM emp_tbl WHERE empID = '100';
9>	RETURN emp_name;
10> END;
11> /

In the example we are retrieving the ‘first_name’ of employee with empID 100 to variable ‘emp_name’.
The return type of the function is VARCHAR which is declared in line no 2.
The function returns the ‘emp_name’ which is of type VARCHAR as the return value in line no 9.

How to execute a PL/SQL Function?

A function can be executed in the following ways.

1) Since a function returns a value we can assign it to a variable.

employee_name :=  employer_details_func;

If ‘employee_name’ is of datatype varchar we can store the name of the employee by assigning the return type of the function to it.

2) As a part of a SELECT statement

SELECT employer_details_func FROM dual;

3) In a PL/SQL Statements like,

dbms_output.put_line(employer_details_func);

This line displays the value returned by the function.

Zawartość tablicy jako wynik funkcji.

Za http://www.tek-tips.com/faqs.cfm?fid=846.
If you need to return dynamic amounts of data, you probably want to use PL/SQL tables.  A PL/SQL table is similar to an array, but it can have only one bound.

PL/SQL tables are sparse.  That is if you write to index 1 and index 10, only two values are stored in memory.  Oracle doesn’t store NULL values for indexes 2 through 9.  If you reference an index that has not been stored yet, you will get a NO_DATA_FOUND exception.

You need to define a TYPE to hold your data before you can use a table.  You do that with the oracle TYPE statement.
<type_name> IS TABLE OF ORACLE_DATA_TYPE INDEX BY BINARY_INTEGER;

You can declare the type anywhere declarations are valid.  You can put them in a package header or in a DECLARE section.  Putting them in a package header makes them sharable between packages and easily reusable.  I always create a package header that defines useful table structures an I call it TABLE_TYPES

CREATE OR REPLACE PACKAGE TABLE_TYPES
AS
TYPE tNumber IS TABLE OF NUMBER INDEX BY BINARY_INTEGER;
TYPE tString IS TABLE OF VARCHAR2(250) INDEX BY BINARY_INTEGER;
END;

If you put the table definitions into their own package you don’t have to worry about cluttering up all your other packages with useless table definitions.  Notice, I use the TABLE_TYPES package in the package example below.

When you create a table variable, you can place data into it sparsely, as I said before..  Take this anonymous block for example.

DECLARE
tab TABLE_TYPE.tNumber;
BEGIN
tab(1) := 30;
tab(30) := 1;
tab(2) := tab(30) – tab(1);

DBMS_OUTPUT.ENABLE();
DBMS_OUTPUT.PUT_LINE(‘Index two contains: ‘ || tab(2));
END;

If you run the above anonymous block you should get the output:

Index two contains: -29

PL/SQL procedure successfully completed.

if you only see the last line, type set serveroutput on before running the anonymous block.

The COUNT property of a table returns the total number of rows that are found in that table.  If the table is defined sparesly, unfilled rows ARE NOT INCLUDED.  In the above anonymous block tab.COUNT will be THREE.


1. CREATE OR REPLACE PACKAGE EXAMPLE_PKG AS
2. FUNCTION myFunction() RETURN TABLE_TYPES.tNumber;
3. PRAGMA RESTRICT_REFERENCES(myFunction,WNDS);
4. END;
5. /

And here is the packge body

1.  CREATE OR REPLACE PACKAGE BODY EXAMPLE_PKG AS
2.  FUNCTION myFunction() RETURN tNumber
3.  – this function returns a table of numbers 1 to 10
4.  IS
5.    example_table TABLE_TYPES.tNumber;
6.  BEGIN
7.    FOR indx IN 1 .. 10
8.    LOOP
9.      example_table(indx) := i;
10.   END LOOP;
11. END;
12. /

Finally, we’ll create an anonymous block that calls the myFunction function, gets a table of results and displays them on the screen.


1. DECLARE
2.  tab TABLE_TYPES.tNumber;
3. BEGIN
4.   tab := EXAMPLE_PKG.myFunction();
5.   DBMS_OUTPUT.ENABLE();
6.   for i in 1 .. tab.COUNT
7.   LOOP
8.      DBMS_OUTPUT.PUT_LINE(‘Row ‘ || i || ‘. value = ‘ || tab(i));
9.  END LOOP;
10.END;

I DRUGI OPIS

How to return a table from function.

SQL> create type numtab is table of number;
  2  /

Type created.

SQL> create type rectype as object (col1 number, col2 date, col3 varchar2(120));
  2  /

Type created.

SQL> create type complextab as table of rectype;
  2  /

Type created.

SQL> create or replace function f1 return numtab
  2  is
  3    v_temptab numtab;
  4  begin
  5    v_temptab := new numtab();
  6    for j in 1..20 loop
  7      v_temptab.extend();
  8      v_temptab(v_temptab.last) := j;
  9    end loop;
 10    return v_temptab;
 11  end;
 12  /

Function created.

SQL> create or replace function f2 return complextab
  2  is
  3    v_temptab complextab;
  4  begin
  5    v_temptab := new complextab();
  6    for j in 1..20 loop
  7      v_temptab.extend();
  8      v_temptab(v_temptab.last) := new rectype( col1 => j
  9                                              , col2 => sysdate - j
 10                                              , col3 => to_char(to_date(j,'J'),'JSP')
 11                                              );
 12    end loop;
 13    return v_temptab;
 14  end;
 15  /

Function created.

SQL> select *
  2    from table(f1);

COLUMN_VALUE
------------
           1
           2
           3
           4
           5
           6
           7
           8
           9
          10
          11

COLUMN_VALUE
------------
          12
          13
          14
          15
          16
          17
          18
          19
          20

20 rows selected.

SQL> select *
  2    from table(f2);

      COL1 COL2      COL3
---------- --------- --------------------
         1 09-MAY-05 ONE
         2 08-MAY-05 TWO
         3 07-MAY-05 THREE
         4 06-MAY-05 FOUR
         5 05-MAY-05 FIVE
         6 04-MAY-05 SIX
         7 03-MAY-05 SEVEN
         8 02-MAY-05 EIGHT
         9 01-MAY-05 NINE
        10 30-APR-05 TEN
        11 29-APR-05 ELEVEN

      COL1 COL2      COL3
---------- --------- --------------------
        12 28-APR-05 TWELVE
        13 27-APR-05 THIRTEEN
        14 26-APR-05 FOURTEEN
        15 25-APR-05 FIFTEEN
        16 24-APR-05 SIXTEEN
        17 23-APR-05 SEVENTEEN
        18 22-APR-05 EIGHTEEN
        19 21-APR-05 NINETEEN
        20 20-APR-05 TWENTY

20 rows selected.

SQL>
The first is a small numeric table, the second uses not only NUMBER, but also DATE and VARCHAR2.

2 stycznia 2011

Poznań – u mojego kuzyna :-)

Zaszufladkowany do: Zdjęcia — Tagi: — Jacek @ 23:20

Sylwester 2010/2011

Zaszufladkowany do: Zdjęcia — Tagi: — Jacek @ 14:44

ApEx – instalacja.

Zaszufladkowany do: ApEx,Oracle — Tagi: , — Jacek @ 10:29

Fajny artykuł dotyczący instalacji ApExa.

Osobliwości informatyczne :-)

Zaszufladkowany do: Informatyka - pozostałe — Jacek @ 10:26

Windows – jedno z moich ulubionych. Jeżeli próbujesz się zalogować tą samą nazwą na inny serwer … dupa :-) Trzeba zrestartować komputer … to i tak nieźle, bo już się bałem, że system trzeba będzie reinstalować :-)

Word, Windows - tajemnicze uprawnienia. Sytuacja: otwarty dokument MS Word (lokalnie). Próba zapisu:

OK i drugie naciśnięcie przycisku zapisz – tym razem zapis bez problemów …. hmmmm …. może wiatr zmienił kierunek :-D i teraz windows pozwala już na dokonywanie zapisu. A do Microsoftu: Dziękuję. Informacje były bardzo pomocne. To były jedne z najbardziej pomocnych informacji w moim życiu. Już dałem na mszę w podzięce za udzielenie tak pomocnych informacji. Chyba dzisiaj nie zasnę, bo cały czas przeżywam, że otrzymałem tak pomocne informacje.

Windows 7 – problemy z pulpitem. Kopiowany plik na pulpit nie wyświetla się. Ponowna próba skopiowania skutkuje komunikatem o możliwości nadpisania pliku którego nie widać. Plik jest widoczny w eksploratorze. Przeładowanie komputera skutkuje :-) w myśl zasady: system windows wykrył ruch myszką, przeładuj komputer aby zmiany odniosły skutek.

Windows (generalnie) – w oknie “mój komputer” w niektórych sytuacjach windows szuka swoich dysków (słynna latarka) – przez pierwsze 5 sekund mnie to bawi …

Flash player (generalnie) – wkurzający napis “Press ESC to exit full screen mode” (“Naciśnij ESC, aby …”) wyświetlający się chyba przez pół godziny ;-) . Tu znajduje się artykuł z informacjami jak pozbyć się tego gówna.

Windows (Vista) – mapowanie dysku sieciowego – “The mapped network drive could not be created because the following error had occured: An extended error has occurred.
Trzeba przyznać, że windows ma naprawdę dopracowane komunikaty o błędach. Teraz rozumiem już, że nie można zamapować dysku bo: nie można zamapować dysku. Ktoś ma jeszcze jakieś pytania. Rozwiązanie problemu: restart komputera … (bez komentarza)

Windows (Vista) – tak na marginesie – na podstawie codziennych obserwacji – Windows pomylił się w nadawaniu nazwy dla tego systemu. On powinien nazywać się: Windows disc killer – bo cały czas coś tam indeksuje, aby działać jeszcze szybciej … taki żarcik :-)

Windows(XP) – wypakowywanie archiwum rar:  Całkowita długość ścieżki i nazwy pliku nie może przekraczać 260 znaków!   System nie może odnaleźć określonej ścieżki. – WTF???

Windows 2000 – to naprawdę dobry system serwerowy. Byle by za dużo ludzi nie chciało z niego korzystać równocześnie :-D

Wydawało by się, że wystarczy gdzieś zwiększyć limit … nie, nie, nie – nie tak łatwo – oto rady jakie znalazłem wygłaszane przez speców od tego systemu: kupić nowszego windowsa – upgrade do wersji serwrowej
lub
użyć innych serwerów które będą wystawiały dany udział sieciowy (to chyba moje ulubione!!!)
lub
zmniejszyć timeout z domyślnych 15 minut (gorzej jak wszyscy chcą pracować dłużej – po prostu część ludzi niech idzie do domu – przepraszam ale, nie mogłem się powstrzymać od małych złośliwości)
lub
zrobić drugi udział sieciowy, który będzie wystawiał te same pliki
dorzucę jeszcze swoje rozwiązanie (mniej więcej z tej samej serii)
- rozdać wszystkim użytkownikom palce USB – niech rano każdy przyjdzie i sobie skopiuje zawartość katalogu. Potem niech pracują lokalnie, a po południu wszyscy się spotkają, ustalą co kto zmieniał w każdym dokumencie. Niech stworzą ostateczną wersję wszystkich dokumentów które zmieniali i już po tych kilku godzinkach mogą iść do domu … albo nie, bo po co … zaraz i tak muszą wracać do roboty…
lub
wywalić ten gówniany system i zrobić udziały sieciowe na sambie np. na jakimś linuksie, albo faktycznie kupić (kasa, kasa, kasa) nowy system serwerowy Microsoftu

!   D:\dvd2\PW Pruszcz Gdanski – Gdansk Poludniowy.rar: Nie mogę utworzyć PW Pruszcz Gdanski – Gdansk Poludniowy\Odcinek od km 318,400 do km 322,200\TG-10.1.12 Zasilanie trakcji i odbiorow nietrakcyjnych od km 318,400 do km 322,200\OSWIADCZENIA PROJ- Zasilanie trakcji i odb. nietrakc..pdf
Całkowita długość ścieżki i nazwy pliku nie może przekraczać 260 znaków
!   System nie może odnaleźć określonej ścieżki.
!   D:\dvd2\PW Pruszcz Gdanski – Gdansk Poludniowy.rar: Nie mogę utworzyć PW Pruszcz Gdanski – Gdansk Poludniowy\Odcinek od km 318,400 do km 322,200\TG-10.1.12 Zasilanie trakcji i odbiorow nietrakcyjnych od km 318,400 do km 322,200\rys6-istniejaca stacja transformatorowa kontenerowa.pdf
!   System nie może odnaleźć określonej ścieżki.
!   D:\dvd2\PW Pruszcz Gdanski – Gdansk Poludniowy.rar: Nie mogę utworzyć PW Pruszcz Gdanski – Gdansk Poludniowy\Odcinek od km 318,400 do km 322,200\TG-10.1.15 Likwidacja kladki dla pieszych w km 319,478 i budowa przejscia podziemnego w km 319,488\I. opis techniczny\OSWIADCZENIA PROJ.pdf
Całkowita długość ścieżki i nazwy pliku nie może przekraczać 260 znaków
!   System nie może odnaleźć określonej ścieżki.
!   D:\dvd2\PW Pruszcz Gdanski – Gdansk Poludniowy.rar: Nie mogę utworzyć PW Pruszcz Gdanski – Gdansk Poludniowy\Odcinek od km 318,400 do km 322,200\TG-10.1.15 Likwidacja kladki dla pieszych w km 319,478 i budowa przejscia podziemnego w km 319,488\I. opis techniczny\PW opis  319,488.pdf
!   System nie może odnaleźć określonej ścieżki.
!   D:\dvd2\PW Pruszcz Gdanski – Gdansk Poludniowy.rar: Nie mogę utworzyć PW Pruszcz Gdanski – Gdansk Poludniowy\Odcinek od km 318,400 do km 322,200\TG-10.1.15 Likwidacja kladki dla pieszych w km 319,478 i budowa przejscia podziemnego w km 319,488\II. zest. stali\05 – BALUSTRADA NR1.pdf
!   System nie może odnaleźć określonej ścieżki.
!   D:\dvd2\PW Pruszcz Gdanski – Gdansk Poludniowy.rar: Nie mogę utworzyć PW Pruszcz Gdanski – Gdansk Poludniowy\Odcinek od km 318,400 do km 322,200\TG-10.1.15 Likwidacja kladki dla pieszych w km 319,478 i budowa przejscia podziemnego w km 319,488\III. czesc rysunkowa\01- plan sytuacyjny pp 319.488.pdf
Całkowita długość ścieżki i nazwy pliku nie może przekraczać 260 znaków
!   System nie może odnaleźć określonej ścieżki.
!   D:\dvd2\PW Pruszcz Gdanski – Gdansk Poludniowy.rar: Nie mogę utworzyć PW Pruszcz Gdanski – Gdansk Poludniowy\Odcinek od km 318,400 do km 322,200\TG-10.1.15 Likwidacja kladki dla pieszych w km 319,478 i budowa przejscia podziemnego w km 319,488\III. czesc rysunkowa\02 – zestawieniowy.pdf
Całkowita długość ścieżki i nazwy pliku nie może przekraczać 260 znaków
!   System nie może odnaleźć określonej ścieżki.
!   D:\dvd2\PW Pruszcz Gdanski – Gdansk Poludniowy.rar: Nie mogę utworzyć PW Pruszcz Gdanski – Gdansk Poludniowy\Odcinek od km 318,400 do km 322,200\TG-10.1.15 Likwidacja kladki dla pieszych w km 319,478 i budowa przejscia podziemnego w km 319,488\III. czesc rysunkowa\03 – konstrukcja ramy.pdf
Całkowita długość ścieżki i nazwy pliku nie może przekraczać 260 znaków
!   System nie może odnaleźć określonej ścieżki.
!   D:\dvd2\PW Pruszcz Gdanski – Gdansk Poludniowy.rar: Nie mogę utworzyć PW Pruszcz Gdanski – Gdansk Poludniowy\Odcinek od km 318,400 do km 322,200\TG-10.1.15 Likwidacja kladki dla pieszych w km 319,478 i budowa przejscia podziemnego w km 319,488\III. czesc rysunkowa\05 – balustrada nr1.pdf
Całkowita długość ścieżki i nazwy pliku nie może przekraczać 260 znaków
!   System nie może odnaleźć określonej ścieżki.
!   D:\dvd2\PW Pruszcz Gdanski – Gdansk Poludniowy.rar: Nie mogę utworzyć PW Pruszcz Gdanski – Gdansk Poludniowy\Odcinek od km 318,400 do km 322,200\TG-10.1.15 Likwidacja kladki dla pieszych w km 319,478 i budowa przejscia podziemnego w km 319,488\III. czesc rysunkowa\06 – balustrada nr2.pdf
Całkowita długość ścieżki i nazwy pliku nie może przekraczać 260 znaków
!   System nie może odnaleźć określonej ścieżki.
!   D:\dvd2\PW Pruszcz Gdanski – Gdansk Poludniowy.rar: Nie mogę utworzyć PW Pruszcz Gdanski – Gdansk Poludniowy\Odcinek od km 318,400 do km 322,200\TG-10.1.16 Likwidacja kladki dla pieszych w km 319,478 i budowa przejscia podziemnego w km 319,488 – czesc elektryczna\OSWIADCZENIA – likwidacja kladki.pdf
Całkowita długość ścieżki i nazwy pliku nie może przekraczać 260 znaków
!   System nie może odnaleźć określonej ścieżki.
!   D:\dvd2\PW Pruszcz Gdanski – Gdansk Poludniowy.rar: Nie mogę utworzyć PW Pruszcz Gdanski – Gdansk Poludniowy\Odcinek od km 318,400 do km 322,200\TG-10.1.16 Likwidacja kladki dla pieszych w km 319,478 i budowa przejscia podziemnego w km 319,488 – czesc elektryczna\PW LCS GDANSK- KLADKA-ELEKTR..pdf
Całkowita długość ścieżki i nazwy pliku nie może przekraczać 260 znaków
!   System nie może odnaleźć określonej ścieżki.
!   D:\dvd2\PW Pruszcz Gdanski – Gdansk Poludniowy.rar: Nie mogę utworzyć PW Pruszcz Gdanski – Gdansk Poludniowy\Odcinek od km 318,400 do km 322,200\TG-10.1.16 Likwidacja kladki dla pieszych w km 319,478 i budowa przejscia podziemnego w km 319,488 – czesc elektryczna\rys2 inst.el.w przej.podz..pdf
Całkowita długość ścieżki i nazwy pliku nie może przekraczać 260 znaków
!   System nie może odnaleźć określonej ścieżki.
!   D:\dvd2\PW Pruszcz Gdanski – Gdansk Poludniowy.rar: Nie mogę utworzyć PW Pruszcz Gdanski – Gdansk Poludniowy\Odcinek od km 318,400 do km 322,200\TG-10.1.16 Likwidacja kladki dla pieszych w km 319,478 i budowa przejscia podziemnego w km 319,488 – czesc elektryczna\rys3-schemat tablicy SOT.pdf
Całkowita długość ścieżki i nazwy pliku nie może przekraczać 260 znaków
!   System nie może odnaleźć określonej ścieżki.
!   D:\dvd2\PW Pruszcz Gdanski – Gdansk Poludniowy.rar: Nie mogę utworzyć PW Pruszcz Gdanski – Gdansk Poludniowy\Odcinek od km 318,400 do km 322,200\TG-10.1.16 Likwidacja kladki dla pieszych w km 319,478 i budowa przejscia podziemnego w km 319,488 – czesc elektryczna\rys4-schemat tablicy SP.pdf
Całkowita długość ścieżki i nazwy pliku nie może przekraczać 260 znaków
!   System nie może odnaleźć określonej ścieżki.
!   D:\dvd2\PW Pruszcz Gdanski – Gdansk Poludniowy.rar: Nie mogę utworzyć PW Pruszcz Gdanski – Gdansk Poludniowy\Odcinek od km 318,400 do km 322,200\TG-10.1.16 Likwidacja kladki dla pieszych w km 319,478 i budowa przejscia podziemnego w km 319,488 – czesc elektryczna\rys5-wyposazenie szafy SOT.pdf
Całkowita długość ścieżki i nazwy pliku nie może przekraczać 260 znaków
!   System nie może odnaleźć określonej ścieżki.
!   D:\dvd2\PW Pruszcz Gdanski – Gdansk Poludniowy.rar: Nie mogę utworzyć PW Pruszcz Gdanski – Gdansk Poludniowy\Odcinek od km 318,400 do km 322,200\TG-10.1.16 Likwidacja kladki dla pieszych w km 319,478 i budowa przejscia podziemnego w km 319,488 – czesc elektryczna\rys6-wyposazenie szafy SP.pdf
Całkowita długość ścieżki i nazwy pliku nie może przekraczać 260 znaków
!   System nie może odnaleźć określonej ścieżki.
!   D:\dvd2\PW Pruszcz Gdanski – Gdansk Poludniowy.rar: Nie mogę utworzyć PW Pruszcz Gdanski – Gdansk Poludniowy\Odcinek od km 318,400 do km 322,200\TG-10.1.16 Likwidacja kladki dla pieszych w km 319,478 i budowa przejscia podziemnego w km 319,488 – czesc elektryczna\rys7-fundament pod szafy.pdf
Całkowita długość ścieżki i nazwy pliku nie może przekraczać 260 znaków
!   System nie może odnaleźć określonej ścieżki.
!   D:\dvd2\PW Pruszcz Gdanski – Gdansk Poludniowy.rar: Nie mogę utworzyć PW Pruszcz Gdanski – Gdansk Poludniowy\Odcinek od km 318,400 do km 322,200\TG-10.1.22 Mala architektura, elementy zagospodarowania terenu, informacja podroznych – p.o. Gdansk Lipce\opis-OSWIADCZENIA PROJ-  MALA ARCH..pdf
Całkowita długość ścieżki i nazwy pliku nie może przekraczać 260 znaków
!   System nie może odnaleźć określonej ścieżki.
!   D:\dvd2\PW Pruszcz Gdanski – Gdansk Poludniowy.rar: Nie mogę utworzyć PW Pruszcz Gdanski – Gdansk Poludniowy\Odcinek od km 318,400 do km 322,200\TG-10.1.22 Mala architektura, elementy zagospodarowania terenu, informacja podroznych – p.o. Gdansk Lipce\opis-Str-tyt-LCS GDANSK-MALA ARCHIT..pdf
Całkowita długość ścieżki i nazwy pliku nie może przekraczać 260 znaków
!   System nie może odnaleźć określonej ścieżki.
!   D:\dvd2\PW Pruszcz Gdanski – Gdansk Poludniowy.rar: Nie mogę utworzyć PW Pruszcz Gdanski – Gdansk Poludniowy\Odcinek od km 318,400 do km 322,200\TG-10.1.22 Mala architektura, elementy zagospodarowania terenu, informacja podroznych – p.o. Gdansk Lipce\rys2-tablica z nazwa przystanku.pdf
Całkowita długość ścieżki i nazwy pliku nie może przekraczać 260 znaków
!   System nie może odnaleźć określonej ścieżki.
!   D:\dvd2\PW Pruszcz Gdanski – Gdansk Poludniowy.rar: Nie mogę utworzyć PW Pruszcz Gdanski – Gdansk Poludniowy\Odcinek od km 322,200 do km 324,100\TG-10.2.13 Obiekty inzynieryjne – przepust w km 323,355\08. Rysunek szczegolow konstrukcyjnych – schody naskarpowe od strony toru nr 1.pdf
!   System nie może odnaleźć określonej ścieżki.
!   D:\dvd2\PW Pruszcz Gdanski – Gdansk Poludniowy.rar: Nie mogę utworzyć PW Pruszcz Gdanski – Gdansk Poludniowy\Odcinek od km 322,200 do km 324,100\TG-10.2.13 Obiekty inzynieryjne – przepust w km 323,355\09. Rysunek szczegolow konstrukcyjnych – schody naskarpowe od strony toru nr 2.pdf
!   System nie może odnaleźć określonej ścieżki.
!   D:\dvd2\PW Pruszcz Gdanski – Gdansk Poludniowy.rar: Nie mogę utworzyć PW Pruszcz Gdanski – Gdansk Poludniowy\Odcinek od km 324,100 do km 325,000\TG-10.3-2.3.11.1 Obiekty kubaturowe. Remont budynku kasy z przeznaczeniem na straznice przejazdowa w km 324,540\PW – TG-10-3_2_3_11_1 – REMONT KASY.pdf
Całkowita długość ścieżki i nazwy pliku nie może przekraczać 260 znaków
!   System nie może odnaleźć określonej ścieżki.
!   D:\dvd2\PW Pruszcz Gdanski – Gdansk Poludniowy.rar: Nie mogę utworzyć PW Pruszcz Gdanski – Gdansk Poludniowy\Odcinek od km 324,100 do km 325,000\TG-10.3-2.3.11.1 Obiekty kubaturowe. Remont budynku kasy z przeznaczeniem na straznice przejazdowa w km 324,540\Rys zalacznik – studzienka rewiz..pdf
Całkowita długość ścieżki i nazwy pliku nie może przekraczać 260 znaków
!   System nie może odnaleźć określonej ścieżki.
!   D:\dvd2\PW Pruszcz Gdanski – Gdansk Poludniowy.rar: Nie mogę utworzyć PW Pruszcz Gdanski – Gdansk Poludniowy\Odcinek od km 324,100 do km 325,000\TG-10.3-2.3.11.2 Obiekty kubaturowe. Rozbiorka budynku straznicy przejazdowej w km 324,510\PW – TG-10-3_2_3_11_2 – ROZBIORKA STRAZNICY.pdf
!   System nie może odnaleźć określonej ścieżki.
!   D:\dvd2\PW Pruszcz Gdanski – Gdansk Poludniowy.rar: Nie mogę utworzyć PW Pruszcz Gdanski – Gdansk Poludniowy\Odcinek od km 324,100 do km 325,000\TG-10.3-2.3.13 SIECI, URZADZENIA SANITARNE I PRZEMYSLOWE – ZEWNETRZNE. Przebudowa sieci gazowej\PW – TG-10-3_2_3_13 – PRZEBUDOWA SIECI – GAZ.pdf
Całkowita długość ścieżki i nazwy pliku nie może przekraczać 260 znaków
!   System nie może odnaleźć określonej ścieżki.

Oracle Datastructures (K1)

Zaszufladkowany do: Oracle — Tagi: — Jacek @ 08:59

CHAR
between 1 and 2000 characters. Domyślna długośc 1. Jeżeli string krótszy niż zadeklarowana wartość, to pozostałe pola są wypełnione spacjami.
VARCHAR2
Określa się maksymalną długość, puste pola nie są wypełniane spacjami. Do 4000 znaków.
NCHAR, NVARCHAR2
datatypes store fixed-length or variable-length character data, respectively, using a different character set from the one used by the rest of the database.
LONG
up to 2 GB of character data. Lepiej używć CLOB i NCLOB. You cannot use LONGs in WHERE, GROUP BY, ORDER BY, or CONNECT BY clauses or in SQL statements with the DISTINCT qualifier. You also cannot create an index on a LONG column.
CLOB and NCLOB
up to 4 GB of character data prior to Oracle Database 10g. Starting with Oracle Database 10g, the limit has been increased to 128 TBs, depending on the block size of the database. The NCLOB datatype stores the NLS data.

NUMBER
provide a precision of 38 digits.
The NUMBER datatype is the only datatype that stores numeric values in Oracle.
The ANSI datatypes of DECIMAL, NUMBER, INTEGER, INT, SMALLINT,
FLOAT, DOUBLE PRECISION, and REAL are all stored in the NUMBER datatype.
With Oracle Database 10g, Oracle added support for the precision defined in the
IEEE 754-1985 standard with the number datatypes of BINARY_FLOAT and
BINARY_DOUBLE. Oracle Database 11g added support for the number datatype
SIMPLE_INTEGER.

DATE
As with the NUMERIC datatype, Oracle stores all dates and times in a standard
internal format.
The standard Oracle date format for input takes the form of DD-MON-YY HH:MI:SS
Youcan change the format youu se for inserting dates for an instance by changing
the NLS_DATE_FORMAT parameter for the instance. Youcan do this for a session
by using the ALTER SESSION SQL statement or for a specific value by using parameters
with the TO_DATE expression in your SQL statement.
As of Oracle9i Release 2, Oracle also supports two INTERVAL datatypes, INTERVAL
YEAR TO MONTH
and INTERVAL DAY TO SECOND.

RAW, LONG RAW
When youspecify one of these datatypes, Oracle will
store the data as the exact series of bits presented to it. The RAW datatypes typically
store objects with their own internal format, such as bitmaps. A RAW
datatype can hold 2 KB, while a LONG RAW datatype can hold 2 GB.
ROWID
special type of column known as a pseudocolumn.The ROWID
pseudocolumn can be accessed just like a column in a SQL SELECT statement.
There is a ROWID pseudocolumn for every row in an Oracle database.
The ROWID relates to a specific location on a disk drive. Because of this, the
ROWID is the fastest way to retrieve an individual row. However, the ROWID
for a row can change as the result of dumping and reloading the database.
It points to the database object number in addition to the identifiers that point to the datafile, block, and row.
ORA_ROWSCN
Oracle Database 10g and later releases support a pseudocolumn ORA_ROWSCN,
which holds the System Change Number (SCN) of the last transaction that modified
the row.
LOB
4 GB of information. CLOB, which can store only character data. NCLOB, which stores National Language character set data. BLOB, which stores data as binary information.
Youcan designate that a LOB should store its data within the Oracle database or
that it should point to an external file that contains the data.
LOBs can participate in transactions. Selecting a LOB datatype from Oracle will
return a pointer to the LOB. You must use either the DBMS_LOB PL/SQL builtin
package or the OCI interface to actually manipulate the data in a LOB.
BFILE
acts as a pointer to a file stored outside of the Oracle database.
columns or variables with BFILE datatypes don’t
participate in transactions, and the data stored in these columns is available only
for reading.
XMLType
A column defined as this type of data will store an XML document in a
character LOB column. There are built-in functions that allow you to extract
individual nodes from the document.
User-defined data
combinations of the basic Oracle datatypes.
AnyType, AnyData, AnyDataSet
datatypes that can be used to explicitly define data structures that exist outside the realm of existing datatypes.
Each of these datatypes must be defined with program units that let Oracle know how
to process any specific implementation of these types.

Tables
As of Oracle9i, youcan define external tables. As the name implies, the data for an
external table is stored outside the database, typically in a flat file. The external table is read only.
The external table is good for loading and unloading data to files from a database, among other purposes.
Oracle Database 11g introduces the ability to create virtual columns for a table.
These columns are defined by an expression and, although the results of the expression
are not stored, the columns can be accessed by applications at runtime.

VIEWS
data structure defined through a SQL statement. The SQL statement
is stored in the database. When you use a view in a query, the stored query is
executed and the base table data is returned to the user. Views do not contain data.
Use a view for:

  • To simplify access to data stored in multiple tables
  • To implement specific security for the data in a table. Starting with Oracle9i, youcan use fine-grained access control to accomplish the
    same purpose.
  • Starting with Oracle9i, youcan use fine-grained access control to accomplish the
    same purpose.

Oracle8i introduced materialized views. These are not really views as defined in this
section, but are physical tables that hold presummarized data providing significant
performance improvements in a data warehouse.

Indeksy
An index is a data structure that speeds up access to particular rows in a database.
An index is associated with a particular table and contains the data from one or more
columns in the table.
The Oracle database server automatically modifies the values in the index when the
values in the corresponding columns are modified.
An index can be either unique (which means that no two rows in the table or view
can have the same index value) or nonunique. If the column or columns on which an
index is based contain NULL values, the row isn’t included in an index.

B*-tree indexes – default index used in Oracle.

The B*-tree index structure doesn’t contain many blocks at the higher levels of
branch blocks, so it takes relatively few I/O operations to read quite far down the B*-
tree index structure.
Oracle allows youto create index organized tables (IOTs), in which the leaf blocks
store the entire row of data rather than only the ROWID that points to the associated
row. Index organized tables reduce the total amount of space needed to store an
index and a table by eliminating the need to store the ROWID in the leaf page. But
index organized tables cannot use a UNIQUE constraint or be stored in a cluster.
(kolejne wersje oracle znoszą w znacznej mierze te ograniczenia)

Reverse key indexes
Reverse key indexes, as their name implies, automatically reverse the order of the
bytes in the key value stored in the index. If the value in a row is “ABCD”, the value
for the reverse key index for that row is “DCBA”.
This reversal causes the index entries to be more evenly distributed
over the width of the leaf nodes.
For example, rather than having the values
234, 235, and 236 be added to the maximum side of the index, they are translated to
the values 432, 532, and 632 for storage. These values are more evenly spread throughout the leaf nodes.

Bitmap indexes (113)
In a standard B*-tree index, the ROWIDs are stored in the leaf blocks of the index. In
a bitmap index, each bit in the index represents a ROWID. If a particular row contains
a particular value, the bit for that row is “turned on” in the bitmap for that
value.The functionality provided by bitmap indexes is especially important in data warehousing
applications in which each dimension of the warehouse contains many
repeating values.

Function-based indexes
A function-based index is just like a standard B*-tree or bitmap index, except that youcan base the index on the
result of a SQL function, rather than just on the value of a column or columns.

Invisible indexes
Normally, all indexes are used by the optimizer.
With the invisible option, an index is not considered as a possible step in an access path, but updates and
deletes to the underlying data are still applied to the index.

PARTITIONING

A partitioned data structure is divided based on column values in the table.
Oracle won’t bother to access partitions that won’t contain any data to satisfy
the query.
You can perform all maintenance operations, such as backup, recovery, and loading, on a single partition.
Youcan automatically implement this type of partitioning,
which is called equipartitioning, by specifying an index for a partitioned table as
a LOCAL index. Local indexes simplify maintenance, since standard operations,
such as dropping a partition, will work transparently with both the index partition
and the table partition.

Sequences

Sequence numbers are defined with a name, an incremental value, and some additional
information about the sequence. Sequences exist independently of any particular table,
so more than one table can use the same sequence number.

Synonyms

To make names simpler and more readable, you can create a synonym for any
table, view, snapshot, or sequence, or for any PL/SQL procedure, function, or package.
Synonyms can be either public, which means that all users of a database can use
them, or private, which means that only the user whose schema contains the synonym
can use it.

Clusters

A cluster is a data structure that improves retrieval performance. A cluster, like an
index, does not affect the logical view of the table.
A cluster is a way of storing related data values together on disk.
Oracle reads data a block at a time, so storing related values together reduces the number of I/O operations
needed to retrieve related values, since a single data block will contain only related rows.
A cluster is composed of one or more tables. The cluster includes a cluster index,
which stores all the values for the corresponding cluster key.
Clusters may not be appropriate for tables that regularly require full table scans, in
which a query requires the Oracle database to iterate through all the rows of the
table. Because you access a cluster table through the cluster index, which then points
to a data block, full table scans on clustered tables can actually require more I/O
operations, lowering overall performance.

Hash Clusters

Each request for data in a clustered table involves at least two I/O operations,
one for the cluster index and one for the data. A hash cluster stores related data rows
together, but groups the rows according to a hash value for the cluster key. The hash
value is calculated with a hash function, which means that each retrieval operation
starts with a calculation of the hash value and then goes directly to the data block
that contains the relevant rows.
By eliminating the need to go to a cluster index, a hash clustered table can be even
faster for retrieving data than a clustered table.

Rules Manager

The concept behind the Rules Manager is simple. A rule is stored in the database and
is called and evaluated by applications. If business conditions or requirements
change, the rule covering those scenarios can be changed without having to touch
the application code. Rules can be shared across multiple application systems, bringing
standardization along with reduced maintenance across the set of applications.
Rules are invoked by events.
You can define conflict resolution routines to handle situations where more than one
rule is matched by an event. The Rules Manager also can aggregate different events
into composite events and maintain state information until all events are received.
Using rules can be a very powerful tool for implementing complex logic, but the use
of rules can affect your application design.

The external table
Should You Use NULLs?
The idea of three-state logic may seem somewhat confusing, especially when you imagine
your poor end users executing ad hoc queries and trying to account for a value
that’s neither TRUE nor FALSE. This prospect may concern you, so you may decide
not to use NULL values at all.
We believe that NULLs have an appropriate use. The NULL value covers a very specific
situation: a time when a column has not had a value assigned. The alternative to
using a NULL is using a value with another meaning—such as 0 for numbers—and
then trying to somehow determine whether that value has actually been assigned or
simply exists as a replacement for NULL.
If you choose not to use NULL values, you’re forcing a value to be assigned to a column
for every row. Youare, in effect, eliminating the possibility of having a column that
doesn’t require a value, as well as potentially assigning misleading values for certain
columns. This situation can be misleading for end users and can lead to inaccurate
results for summary actions such as AVG (average).
Avoiding NULL values simply replaces one problem—educating users or providing
them with an interface that implicitly understands NULL values—with another set of
problems, which can lead to a loss of data integrity.
Basic Data Structures | 91
is read-only;

1 stycznia 2011

Śniadanie krogulca.

Zaszufladkowany do: Zdjęcia — Tagi: — Jacek @ 10:24

31 grudnia 2010

PL/SQL – przykład prostych procedur

Zaszufladkowany do: Skrypty SQL i PL/SQL — Jacek @ 09:47
create or replace procedure sfis_owner.wsp_kwadratow(numer varchar)
AS
CURSOR id_obszaru IS
select obsz_id from sfis_owner.fis_obszary where obsz_kod like numer||'%' and obsz_rodzaj_obszaru='FAO';
BEGIN
dbms_output.put_line('Podany numer ' || numer);
FOR rekord IN id_obszaru LOOP
-- trzeba ustawic 'set serveroutput on' na kliencie
dbms_output.put_line(rekord.obsz_id);
END LOOP;
END
/
DATA TYPE: composite (nested table of numbers):
create or replace procedure sfis_owner.wsp_kwadratow(numer varchar)
AS
TYPE num_arr_type IS TABLE OF NUMBER;
sid_obszarow num_arr_type;
CURSOR id_obszaru IS
select obsz_id from sfis_owner.fis_obszary where obsz_kod like numer||'%' and obsz_rodzaj_obszaru='FAO';
BEGIN
sid_obszarow := num_arr_type();
dbms_output.put_line('Podany numer ' || numer);
FOR rekord IN id_obszaru LOOP
-- trzeba ustawic 'set serveroutput on' na kliencie
-- dbms_output.put_line(rekord.obsz_id);
sid_obszarow.extend;
sid_obszarow(sid_obszarow.Count) := rekord.obsz_id;
Dbms_Output.put_line(sid_obszarow.Count || ' ' || sid_obszarow(sid_obszarow.Count));
END LOOP;
END;
Odwołania do wartości nested table of numbers:
create or replace procedure sfis_owner.wsp_kwadratow(numer varchar)
AS
TYPE num_arr_type IS TABLE OF NUMBER;
sid_obszarow num_arr_type;
CURSOR id_obszaru IS
select obsz_id from sfis_owner.fis_obszary where obsz_kod like numer||'%' and obsz_rodzaj_obszaru='FAO';
nr1 NUMBER;
BEGIN
sid_obszarow := num_arr_type();
dbms_output.put_line('Podany numer ' || numer);
FOR rekord IN id_obszaru LOOP
-- trzeba ustawic 'set serveroutput on' na kliencie
-- dbms_output.put_line(rekord.obsz_id);
sid_obszarow.extend;
sid_obszarow(sid_obszarow.Count) := rekord.obsz_id;
Dbms_Output.put_line(sid_obszarow.Count || ' ' || sid_obszarow(sid_obszarow.Count));
END LOOP;
dbms_output.put_line('Koniec petli 1');
dbms_output.put_line(sid_obszarow(sid_obszarow.Count-2));
dbms_output.put_line(sid_obszarow.Count);
nr1 := sid_obszarow.Count;dbms_output.put_line('nr1: ' || nr1);
FOR X IN 1..nr1 LOOP
dbms_output.put_line(X || ' ' || sid_obszarow(X));
END LOOP;
END;
Kasowanie wartości nested table of numbers:
create or replace procedure sfis_owner.wsp_kwadratow(numer varchar)
AS
TYPE num_arr_type IS TABLE OF NUMBER;
sid_obszarow num_arr_type;
CURSOR id_obszaru IS
select obsz_id from sfis_owner.fis_obszary where obsz_kod like numer||'%' and obsz_rodzaj_obszaru='FAO';
nr1 NUMBER;
BEGIN
sid_obszarow := num_arr_type();
dbms_output.put_line('Podany numer regionu: ' || numer);
FOR rekord IN id_obszaru LOOP
-- trzeba ustawic 'set serveroutput on' na kliencie
-- dbms_output.put_line(rekord.obsz_id);
sid_obszarow.extend;
sid_obszarow(sid_obszarow.Count) := rekord.obsz_id;
--Dbms_Output.put_line(sid_obszarow.Count || ' ' || sid_obszarow(sid_obszarow.Count));
END LOOP;
--dbms_output.put_line('Koniec petli 1');
--dbms_output.put_line(sid_obszarow(sid_obszarow.Count-2));
--dbms_output.put_line(sid_obszarow.Count);
nr1 := sid_obszarow.Count;
--dbms_output.put_line('nr1: ' || nr1);
FOR X IN 1..nr1 LOOP
dbms_output.put_line(X || ' ' || sid_obszarow(X));
END LOOP;
-- kasujemy rekord nr 5 
sid_obszarow.DELETE(5);
FOR X IN 1..nr1 LOOP
-- trzeba sprawdzić czy rekord istnieje bo w przeciwnym wypadku wywali błąd 
IF(sid_obszarow.exists(X))
THEN
dbms_output.put_line(X || ' ' || sid_obszarow(X));
END IF;
END LOOP;
END;
« Nowsze wpisyStarsze wpisy »

Strona startowa: www.jaceksen.pl