Autor Beitrag
Christoph1972
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 690
Erhaltene Danke: 16


VS2015 Pro / C# & VB.Net
BeitragVerfasst: So 17.10.10 09:56 
Hallo Leute,

ich suche nach einer eleganten Lösung, alte Datensätze von einem SQL-Server zu löschen, ohne dabei ein fremdes Programm zu verwenden. Das sollte der Server doch selbst können, oder?

_________________
Gruß
Christoph
Trashkid2000
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 561
Erhaltene Danke: 137



BeitragVerfasst: So 17.10.10 12:31 
Hi,

ja, Du kannst auf einen SQL-Server sogenannte Jobs anlegen, der dann zu einer bestimmten Zeit bzw. immer wieder mal ausgeführt wird. Dort kannst Du dann auch Dein DELETE-Statement angeben.

Auf der Seite eine Beschreibung dazu:
msdn.microsoft.com/d...s186273(SQL.90).aspx

Allerdings ist halt die grosse Frage, an was Du "alte" Datensätze ausmachst. Ich hoffe, Du benutzt in Deinen Tabellen einen Zeitstempel!?

LG, Marko
Christoph1972 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 690
Erhaltene Danke: 16


VS2015 Pro / C# & VB.Net
BeitragVerfasst: So 17.10.10 15:46 
ah, cool, Danke! Werde ich mir anschauen. Ja ich verwende ein TimeStamp.

_________________
Gruß
Christoph