• Home
  • Referenzen
  • Südtirol Panorama
  • Impressum
  • Kontakt
  • Blog
  • Bilder Gallery
  • Artikel

    • Image Zoom mit Javascript
    • Windows Server 2008 mehrere RDP (Remote Dektop Verbindungen) zulassen
    • TR/Phorpiex 552960 Lösung
    • Facebook Connect via Asp.net
    • Samsung Wave S8500-S8530 Touchscreen/Display Tausch Anleitung
    • ERROR CREATING CONTROL FOR NODETYPE: Media Umbraco v4
    • Samsung Wave Bada 2.0 S8500XXKK5 zum download bereit
    • Funktionen und Views beim selbergenieren des LinqToSql Codes einbeziehen
    • Samsung Wave Google Exchange einrichten
    • Keep div:hover open when changing nested select box
    • Links

      • Flightplanning24 – Metar Taf Webcams
      • Internetseiten Südtirol
      • Jobbörse Südtirol
      • Niederkofler Webentwicklung
      • Snowtrex – Skiurlaub in Südtirol
  • Kategorien

    • Allgemein (23)
    • In eigener Sache (4)
    • Javascript (3)
    • Kaufberatung (2)
    • Konsolen (4)
    • Programmierung (9)
    • Spiele (7)
    • Technik (23)
    • Tools (6)
    • Webprogrammierung (78)
    • Windows (34)
      • Treiber (4)
    • XBox 360 (3)
  • Archive

    • Februar 2012
    • Januar 2012
    • Dezember 2011
    • November 2011
    • Oktober 2011
    • September 2011
    • August 2011
    • Juli 2011
    • Juni 2011
    • Mai 2011
    • April 2011
    • März 2011
    • Februar 2011
    • November 2010
    • Oktober 2010
    • September 2010
    • August 2010
    • Juli 2010
    • Juni 2010
    • Mai 2010
    • April 2010
    • März 2010
    • Februar 2010
    • Januar 2010
    • Dezember 2009
    • November 2009
    • Oktober 2009
    • September 2009

Archiv für Juni 2011

Mircosoft SQL Server 2008 Datenbank Schema ändern

Dienstag, 28. Juni 2011

Derzeit beschäftige ich mich ein wenig mit dem SQL-Server 2008 und wollte einen ganz simple Geschichte machen: Eine bestehende Tabelle ein wenig anpassen. Beim Speichern der Daten kam aber vom Microsoft SQL Server Management Studio immer die Meldung, dass die Tabelle nicht gespeichert werden kann – mit dem Kommentar: “Speichern von Änderungen verhindern, die die Neuerstellungder Tabelle erfordern”

Die Lösung dafür ist eigentlich recht simple: Man öffnet im SQL Server Managementstudio den Menüpunkt Extras -> Optionen; geht dann in den Bereich Designer -> Tabellen- und Datenbank-Designer und deaktiviert dort unter “Tabellenoptionen” die Checkbox “Speichern von Änderungenverhindern, die die Neuerstellung der Tabelle erfordern”.

Anschließend kann man wie gewohnt die Tabelle modifizieren und auch speichern….

Veröffentlicht in Webprogrammierung, Windows | Keine Kommentare »

Mssql Database log is growing

Samstag, 25. Juni 2011

If you are using MsSQL, you might have noticed an abnormal growth of your ldf file. I will explain in this article the principle of the transaction log file, and how to limit its growth.

Whenever a data update is made in the database, entries are added to the transaction log (ldf file). It is not possible to prevent this as it is part of the way Microsoft SQL server maintains integrity – particularly during recovery.

The transaction log is a circular file; when the end is reached any free entries at the start will be used. This means that all being well, the file will stay at a constant size as the current entry cycles round.

The system maintains the MinLSN which is a pointer to the first active log record. Any log records before this (in the circular file) are free. The MinLSN will be prevented from moving forward by any open transactions;  the oldest open transaction entry will be >= the MinLSN. The MinLSN is updated at checkpoint so committing a transaction will not immediately free entries and anything that holds up the checkpoint can cause problems.

If the database is in simple recovery mode all entries prior to the MinLSN will be freed at checkpoint.

If the database is in full recovery mode (and a full backup has been taken) the entries prior to the MinLSN will only be freed by a transaction log backup (not full backup).

Unfortunately the sql server default (except local editions) leaves the databases in full recovery mode. This means that if no action is taken, no transaction log entries will be freed and the log file will eventually fill the disk and crash the system.

I would recommend always setting the model database to simple recovery mode.

If the log file has grown to being in full recovery mode then set it to simple before going any further. This should immediately stop the log from growing.

Enterprise manager
Right click on the database, properties, Options, set model to simple, OK.

t-sql
sp_dboption [dbname], ‘trunc. log on chkpt.’, ‘true’

Before this make sure there are free entries by setting the recovery model to simple or backing up the log.

Enterprise manager

Right click on the database, All tasks, Shrink database, Files, Select log file, OK.

t-sql
dbcc shrinkfile ([db_log_name])
Here [db_log_name] is the logical name of the log file as found from sp_helpdb or the table sysfiles

Always take a full backup before a detach. Detach the database, delete/rename the log file, attach the database – this will create a minimum size log file.
Note that the log file must be deleted/renamed otherwise it will be re-used even though it is not mentioned in the attach.

Enterprise manager

Right click on the database, All tasks, Detach database, OK.
Delete/rename the disk log file.
Right click on databases, All tasks, Attach database, Select the .mdf file, OK, Yes (to the create new log message).

t-sql

sp_detach_db [dbname]
Delete/rename the disk log file.
sp_attach_single_file_db [dbname], [filename]
where [filename] is the name of the physical data file (.mdf).

Veröffentlicht in Webprogrammierung, Windows | Keine Kommentare »

Seat Ibiza Service Intervall zurückstellen Anleitung

Donnerstag, 16. Juni 2011

Folgende Anleitung funktioniert:

httpv://www.youtube.com/watch?v=pCMouuiRrqw

Veröffentlicht in Webprogrammierung | Keine Kommentare »

N2CMS throws 404 error at the first request

Dienstag, 14. Juni 2011

If N2CMS throws at the first request an 404 error change this in your IIS.

Solution: Go to Error Pages -> Edit Feature Setting -> Select Detailed errors

Schlagworte:404, Error, N2CMS
Veröffentlicht in Webprogrammierung | Keine Kommentare »

Forms authentication failed for the request

Dienstag, 14. Juni 2011
From http://msmvps.com/blogs/omar/archive/2006/08/20/108307.aspx
Omar AL Zabir, Many Variety of Posts (MVP)
Forms authentication failed for the request. Reason: The ticket supplied was invalid. (Solution)
When you turn on web garden (multiple process per application pool) or go into multi server load balance deployment where servers are serving the same website, you will have Forms Authentication problem. Users will get automatically logged out or see the Yellow screen of death (ASP.NET error page) frequently. This happens because ASP.NET encrypts the login information in cookie. But the encryption key is unique for each machine and for each process. So, if one user hits Server #1 and gets an ecnrypted key, and then the next hit goes to Server #2, it will fail to decrypt the cookie and log user out or throw user the asp.net general error message. (weiterlesen…)

Veröffentlicht in Webprogrammierung | Keine Kommentare »

MySql Single Quote escaping

Freitag, 10. Juni 2011

Problem: Singe Quote ‘ in Mysql escapen.

Lösung: ” also zwei Single Quotes

Veröffentlicht in Webprogrammierung | Keine Kommentare »

designed by tolpeit © 2010 - all rights reserved