Autor Beitrag
MBaier
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 22



BeitragVerfasst: Di 03.04.12 10:31 
Guten Tag,
ich möchte mich erkundigen, ob es für Oracle ein Pendant zum SQL-Server (für den DBCC DBCECK) gibt.
Es soll einfach die logische und physische Integrität der Datenbank geprüft werden.
Mfg
Michael B.
Th69
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Moderator
Beiträge: 4796
Erhaltene Danke: 1059

Win10
C#, C++ (VS 2017/19/22)
BeitragVerfasst: Di 03.04.12 10:56 
Hallo Michael,

du meinst "DBCC CHECKDB" ;-) ?

Das Internet hat mir folgende Seite dazu ausgegeben:
codekicker.de/fragen...hler-oracle-11g/1250 -> docs.oracle.com/cd/B...b28310/repair004.htm
MBaier Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 22



BeitragVerfasst: Di 03.04.12 11:09 
Vielen Dank Th69,für deine schnelle Antwort. Ja meinte ich.^^

Ich hatte das schon mit
ausblenden C#-Quelltext
1:
execute DBMS_REPAIR.check_object('DatenbankXY','TabelleXY')					

probiert.

Aber ich bekomme jedes mal den Fehler: ORA-00900: Ungültige SQL-Anweisung
..

EDIT:
'DatenbankXY' = Meine DB
'TabelleXY' = Meine Tabelle


Zuletzt bearbeitet von MBaier am Fr 27.04.12 15:51, insgesamt 2-mal bearbeitet
Th69
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Moderator
Beiträge: 4796
Erhaltene Danke: 1059

Win10
C#, C++ (VS 2017/19/22)
BeitragVerfasst: Di 03.04.12 11:46 
Welche Oracle-Version hast du denn?
Und bist du auch als Admin (sys) auf der DB angemeldet? s. docs.oracle.com/cd/B.../b14258/d_repair.htm
Zitat:

Overview

Note:
The DBMS_REPAIR package is intended for use by database administrators only. It is not intended for use by application developers.

Security Model

The package is owned by SYS. Execution privilege is not granted to other users.
MBaier Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 22



BeitragVerfasst: Di 03.04.12 11:52 
Die Version lautet "Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production"
Der Benutzer mit dem ich arbeite hat alle Adminrechte.

Ist die Syntax von dem Befehl so korrekt?
Th69
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Moderator
Beiträge: 4796
Erhaltene Danke: 1059

Win10
C#, C++ (VS 2017/19/22)
BeitragVerfasst: Di 03.04.12 12:14 
Die Syntax ist m.E. in Ordnung so.
Von wo führst du den Befehl denn aus (per SqlPlus o.ä. oder per Programmcode)?
Wenn zweiteres dann zeig mal die Sourcen...
MBaier Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 22



BeitragVerfasst: Di 03.04.12 13:04 
Ich führe den Command Sowohl vom Oracle Sql Developer als auch mit dem Query ExPlus aus.
Hat also nichts mit der Entwicklungsumgebung zu tun. :S

Edit:

Zitat:
The package is owned by SYS. Execution privilege is not granted to other users.


Versteh ich das richtig dass der Command NUR vom User SYS ausgeführt werden darf,
selbst wenn die anderen User auch Adminrechte haben?