Wednesday, January 2, 2013

[LINUX] Verzeichnisgrößen ermitteln

um heruaszufinden, welche Verzeichnisse den meisten Platz verwenden, nutze man "du" mit folgendem Parameter:


Thursday, October 4, 2012

[SYBASE] How to fix a "suspect" database


Damit ich es wiederfinde, habe ich mir mal folgenden Beitrag aus einem Forumpost kopiert. Das Original ist hier zu finden: http://sybase-developer-network.com/conversation/44016/

 From: Bret Halford 
Clearing the suspect database flag is fairly easy, the suspect bit's
value in sysdatabases.status is 256. This code flips the bit off
if it is on:

sp_configure "allow updates", 1
go

-- on very old versions (pre-11.x), "reconfigure with override" would --
be needed here, it is not needed in current versions.
go
update sysdatabases
set
status = status ^ 256 -- exclusive or operator flip the bit
where
status & 256 = 256
[and name = "mydb"]


If you included the "name" clause, you should get 1 row affected.

The next step is to cause the database to go through recovery again
now that it is no longer marked suspect. On all versions, you can
do this by shutting down and then rebooting the whole ASE server.
In 12.5.4 ESD 1 and higher 12.5.x versions, and in 15.0.2 and above
you can use DBCC DBREBOOT to reboot just the one database

dbcc dbreboot("shutdown", )
go
dbcc dbreboot("restart",
)
go


The database should now either recover normally or hit a
problem and get marked suspect again.

If the problem is some sort of corruption in the database, your
options are to try loading an older dump of the database or
(if no such dump exists, for instance) working with tech support.
Generally speaking, though, if some sort of corruption is
preventing recovery from completing, it is unlikely that the
database can be brought to a transactionally consistent state.

Friday, July 20, 2012

[SYBASE] Stored Procedures erneut kompilieren

Ändert man eine Tabelle in Sybase und hat eine Stored Procedure oder einen Trigger, welcher auf diese Tabelle zugreift, so kann es sein, dass z.B. die Stored Procedure nicht mehr funktioniert. Diese muss dann neu kompiliert werden.

Mit sp_recompile braucht man sich nicht darum zu kümmern, welche Stored Procedures auf die geänderte Tabelle zugreifen. Man wendet sp_recompile stattdessen auf das geänderte Objekt an. Die Stored Procedure erhöht dann lediglich den Zähler "schemacnt". Sybase prüft diesen Zähler bei der Ausführung von z.B. Stored Procedures und rekompiliert die auszuführenden Objekte, wenn ein Unterschied bemerkt wird.

Links:

Wednesday, July 18, 2012

[LINUX] Dateien finden und in separaten Ordner kopieren

Möchte man in Linux Dateien finden und in einen separaten Ordner kopieren, so kann man dies mit folgendem Befehl bewerkstelligen:


find -type f -name "*.jpg" -exec cp {} /tmp/images/ \;

Soll die Verzeichnisstruktur erhalten bleiben:

find -type f -name "*.jpg" -exec cp '{}' /tmp/images/ --parents \;

Monday, March 12, 2012

Friday, July 15, 2011

[SYBASE] ASE 12.5 with UTF-8

This PDF describes to setup your ASE 12.5 with a default UTF-8 charset: http://www.sybase.com/content/1026310/unicode_support_wp.pdf

To fix the "text" fields check out this page: http://manuals.sybase.com/onlinebooks/group-asarc/srv10024/sag/@Generic__BookTextView/49306;pt=49154

Quote:

Changing to a multibyte character set makes the internal management of text data more complicated. Since a text value can be large enough to cover several pages, SQL Server must be able to handle characters that may span across page boundaries. To do so, the server requires additional information on each of the text pages.
To see the names of all tables that contain text data, use this query:
select sysobjects.name
from sysobjects, syscolumns
where syscolumns.type = 35
and sysobjects.id = syscolumns.id
The System Administrator or table owner must run dbcc fix_text to calculate the new values needed.

Wednesday, September 15, 2010

Passwort für Microsoft IE Test Virtual PC

Normalerweise habe ich die virtuellen Maschinen zum Testen des IE nur kurz auf. Wenn es mal wieder etwas länger dauert, kann es schonmal passieren, dass man zur Eingabe des Passwortes genötigt wird. Als guter Entwickler ändert man das natürlich auch nie :)

Das Passwort für den User IETest ist: P2ssw0rd


Um das Ganze noch zu vervollständigen, hier der Link zu den Test Images:
Internet Explorer Application Compatibility VPC Image