Showing posts with label Database. Show all posts
Showing posts with label Database. Show all posts

Wednesday, April 14, 2010

Move MS SQL to MySQL

Transferring databases? A great way to do this is through the easy to use simple program MSSQL to MySQL. Using the trial version I successfully transferred the ITAssets database from MS SQL 2005 to MySQL.

Once you've downloaded and installed the program it is easy to use. The following screen shots display the steps used to move the ITAssets database.








Note: When using the trial version only 5 records will be moved.
http://www.convert-in.com/mss2sql.htm

Monday, March 1, 2010

SQL Server 2005: Windows Authentication Mode

There are two authentication modes in SQL Server 2005 one is Mixed mode that allows all users from differing Operating Systems to gain access by requiring a user name and password, separate from those given to gain network access. Windows Authentication mode allows only Windows based Operating Systems to gain access. It is claimed to be much more secure because users in this case would not need a separate user name and password from their network credentials and they would not have the opportunity to write their credentials on a sticking note that they keep under their keyboard.

According to Susan Sales Harkins and Mike Gunderloy article SQL Server: Design for security from the start,
published by TechRepublic, recommend using Windows Autehntication mode when possible.
They state that, "Windows Authentication is integrated with the Windows security system, which provides more
features than SQL Server Authentication and is generally easier to use, more efficient, and more secure"
(2003, Harkins & Gunderloy)

Works Cited:
S. Harkins & M. Gunderloy. (2003). SQL Server: Design for security from the start. TechRepublic. Retrieved on March 01, 2010 from http://articles.techrepublic.com.com/5100-10878_11-5035150.html

Friday, February 5, 2010

WAMP: MySQL



The debate was between whether or not MySQL when installed from WAMP would work on Server 2003 with SQL Server 2005 installed. The concern was that with the IIS already running that Apache would have a conflict. I installed WAMP. The WAMP notification icon was yellow indicating that one service was running. When I tried to start all services I received an error.
I was able to access MySQL, create add records to a table I created in a database I created.

Follow these instructions modifying names with your own.

Click on the MySQL console in WAMP Server.
When promted for a password hit enter (password is blank).
To Create a Database
type:
CREATE DATABASE database_name

To create a Table
type:
USE database_name; Create Table table_name (column_one text NOT NULL, column_two text NOT NULL, column_ID int(5) NOT NULL default '0' , PRIMARY KEY (column_ID) ) TYPE=MyISAM;

To add records to the Table
type:
USE database_name; Insert into table_name (column_one, column_two, column_ID) values ("value1", "value2", value3);

To display specific columns
type: USE database_name; Select column_one, column_two From table_name;

I learned how to create a database in MySQL from the MySQL Manual.
I learned how to create a table in MySQL from netadmintools.com.
I learned how to add records to a table from webdevelopersnotes.com

SQL Server 2005: Creating a View

Another day at work:
Let's say your boss wants to see orders with a line total less than $5. He is planning on writing up the Sales people who have made such orders. He just wants the line total.

Hint: The table used is sales.salesorderdetail.

In a New Query type:

USE AdventureWorks
Select
SalesOrderID, LineTotal

FROM
Sales.SalesOrderDetail

WHERE
LineTotal

Order by LineTotal

Execute and you will see two columns the SalesOrderID and the LineTotal. The Line Total will be ordered (sorted) least to greatest because of the "Order by" command.
If you want to know more about views see The Code Project article about Views.

Friday, January 29, 2010

SQL Server 2005: Delete Table in Database

Using T-SQL statements, Microsoft's version of SQL (Standard Query Language).
To delete a table in a database let's use this example.
Database called Textbooks. Table called Publishers.
Type
Use Database Textbooks
Go
Drop TABLE Publishers



Among the great SQL resources of Books Online, Microsoft support, MSDN Online, Codezone, and Technet; SQLAuthority.com is useful.

If you've had an error attempting to delete tables, but receiving the message that the database "is currently in use."
See http://blog.sqlauthority.com/2007/12/07/sql-server-fix-error-3702-cannot-drop-database-because-it-is-currently-in-use/

Thursday, November 12, 2009

An attack on Open Source

The Oracle-Sun merger is causing many people to throw their hands in the air. Some are doing it with excitement while others are fearing that this merger could destroy the powerful free source program MySQL.

“In Linux there actually is fierce competition between Oracle's flagship product and MySQL,” Mueller said. “MySQL really has already made its presence felt at the high end of the market where Oracle generates most of its revenues and profits, and is a pretty painful, hurtful competitor to Oracle because of its open-source nature and extremely aggressive price structure. What the market needs is for MySQL to continue that trajectory.”...Read the entire article at the Examiner.com.