MS SQL Server: Anomalies

..contributing to IT in London since 2002..

MS SQL Server: Anomalies

Backup/restore databases:

After the restore, you must revoke (sp_revokelogin) and grant access (sp_grantlogin) to users again, esp. if you are restoring the database on a different machine.

Note: I use mixed mode authentication and prefer not to use Windows or domain users.


Pro VARCHAR: They recommend to avoid using fields of type TEXT as much as possible?! ..because of performance issues which is because the TEXT data is kept separately. You can not apply filters and sorts on TEXT fields.

Pro TEXT: M$ SQL Server will not allow you to store a record of size over 8060 bytes. Practically, you can have 5 fields of type VARCHAR(4000) in one record, but if you request to save a record including large articles, for instance, 2000 characters each, you will be refused.

Beware: In your PHP code, you may experience truncation of large text (255 characters). If you are using VIEWs or FUNCTIONs that gather tables having TEXT fields, I recommend to use explicitly redefining data types. It’s not PHP’s fault; M$ has not updated the client library for long time :p


No Comments

Add your comment