Recently I got the opportunity to be a part of the windows team. We are (yes still are) using a microsoft (yes the same microsoft) product to handle one of our websites due to legacy bindings - user base, existing technology, backend team. My first encounter with microsoft on the enterprise end was when we were trying to use Microsoft Navision - supply chain management solution - in one of my
Background Knowledge
I will explain how to convert a DATETIME (data type) value in Microsoft SQL Server to Unix timestamp and how to convert Unix timestamp to DATETIME. A Unix timestamp is a integer value of seconds since January 1, 1970 at midnight. For further explanation of Unix timestamps refer to Wikiepedia, UnixTimestamp.com or http://unixtimesta.mp/.
Note: This solution only work on dates prior to 2038-01-19 at 3:14:08 AM, where the delta in seconds exceeds the limit of the INT data type (integer is used as the result of DATEDIFF). See source for further details as I have not verified a solution to this problem.
Solutions
Convert Datetime Value to Unix Timestamp (today)
GreenSQL invites you to participate in our May
Webinars
MAY 18- Securing Databases in Minutes with GreenSQL Express
MAY 24 – Unified Database Security, the Next Generation of
Database Security
Press here to
sign
http://hosted.verticalresponse.com/579426/4aa0167718/316941501/bdea25b57a/
Hi Everyone,
I would like to personally invite you to a GreenSQL Express
Webinar,
I’ll be demonstrating GreenSQL Express, the free and simple way
to keep your information private and safe.
On Wednesday, March 16th (just 2 weeks from now),
It’s called “How to Protect Sensitive Information in Minutes:
Setting up GreenSQL Express with Basic Security Rules”
If you’re serious about protecting your data, you need to hear and see how it’s done. I’ll talk about:
1. Why you need a Database firewall / security solution
2. Where and How to install GreenSQL Express in your
infrastructure
3. How to use GreenSQL Express to protect you database
4. How to create the security polices you need in minutes
5. How to protect your database from SQL injection attacks
6. How to implement a separation of duties in your database
access
7. How to maintain business continuity …
From the Security threat report 2011 by Sophos, Page 46:
“Cybercrime is encroaching more and more into the business space. Industrial espionage, spearphishing of important employees to breach network boundaries and mass theft of customer information are more diffcult to detect and have very serious consequences. At the same time, network boundaries are becoming ever more indistinct and porous as new technologies enable greater access from remote workers and mobile devices. In addition, legal requirements place greater emphasis on traceability and compliance with predefned standards of data hygiene.
Increasing amounts of sensitive data is stored, accessed and manipulated in databases connected to company websites as businesses increasingly interact with their customers through the Internet. As a result, it’s become as easy to …
[Read more]
New Community version of GreenSQL Database Firewall, version 1.3
is now available.
GreenSQL 1.3 includes new features, many bug fixes and
enhancements.
In this version, GreenSQL improvers the native support for PostgreSQL (http://www.postgresql.org) databases, improvers the native support for MySQL (http://www.mysql.com) databases and provides many Protocol and Network Optimizations. The Web Based GUI usability has been improved and many bugs been fixed.
GreenSQL community version 1.3.0 improvements and enhancements include:
1. Proxies dashboard: correctly displaying the proxy current
status
2. Proxies automatic reloading fixes
3. Alerts include User IP Address
4. MySQL and PostgreSQL protocol fixes
5. Network optimizations
6. Alerts – redesign and graphics
7. …
Last week a customer called me and reported that MySQL was 30
times slower than MS SQL server. Oooops. That's a lot. No way to
argue or throw smoke bombs. 30 times slower! It was a standard
installation of MySQL (typical install option) on plain Windows 7
and the same for MS SQL Server 2008. The test run was a batch of
30.000 INSERT commands in an SQL script. Runtime was 1 minute on
MSSQL and 30 minutes on MySQL. Some tests later we found out that
it was only bad on InnoDB. MyISAM was as fast as MSSQL. (I didn't
care which one was a bit faster. I didn't care as long as InnoDB
was 30 times slower) Finally we nailed the problem down to one
parameter in MySQL: innodb_flush_log_at_trx_commit Each INSERT
statement is a single transaction (autocommit mode). MySQL is
configured very faithfully and ensures that each …
An example of a basic MSSQL (Microsoft SQL Server/SQL Server Express) query using PHP.
1 2 3 4 5 6 7 8 9 |
$szQry = "SELECT column1, column2 FROM foo"; $szDBConn = mssql_connect("host","username","password"); mssql_select_db("database_name", $szDBConn); $saResults = mssql_query($szQry, $szDBConn); while($obResults = mssql_fetch_row($saResults)) { echo $obResults[0]." ".$obResults[1]; } mssql_close($szDBConn); |
Comments/description of Example
- Line #1
- SQL statement that will be sent to the MySQL database server.
- Line #2
- MSSQL database login credentilas; host (127.0.0.1), username and password.
- The “host” is the server name or IP address of your database server. If your host has multiple instances the “host” value would be formatted like so …
I was poking around the MySQL Worklog again over the weekend, and found a request for materialized views for MySQL. This feature has existed in Oracle for a while, in DB2 as a materialized query table, and appeared in MS SQL Server 2000 and 2005 as indexed views.
What is a materialized view?
A materialized view is a database object that contains the results of a query. The FROM clause of the query can name tables, views, and other materialized views. (from Oracle).
Essentially a materialized view …
[Read more]