Tuesday, July 1, 2008

Mysql Data Transfer from one server to other server - mysqldump

1>First run this command in you windows folder I mean in C:\Program Files\MySQL\MySQL Server 5.0\bin>
mysqldump -u root -p password -h Host IP DatabaseName>Sql_Text_file.sql
2> this will create all tables and data with insert command.
3> copy this script and connect to remote server by using mysql query browser and run to insert/create database and table.
www.visli.com - hot deals

InformIT: Using MySQL Client Programs > Using mysqldump

InformIT: Using MySQL Client Programs > Using mysqldump: "Using mysqldump"

Transfer MySQL database from one server to another UNIX / Linux server

How to: Transfer MySQL database from one server to another UNIX / Linux server: "How to: Transfer MySQL database from one server to another UNIX / Linux server"

How to Identify and Delete Duplicate SQL Server Records

How to Identify and Delete Duplicate SQL Server Records: "How to Identify and Delete Duplicate SQL Server Records"

/**********************************************Example of a simple duplicate data delete script.**********************************************/
/**********************************************Set up test environment**********************************************/SET NOCOUNT ON
--Create test tableIF OBJECT_ID('tDupData') IS NOT NULLDROP TABLE tDupDataGO
CREATE TABLE tDupData(lngCompanyID INTEGER ,strCompanyName VARCHAR(20),strAddress VARCHAR(10),dtmModified DATETIME)
--Create test dataINSERT INTO tDupData VALUES (1,'CompanyOne','Address1','01/15/2003')INSERT INTO tDupData VALUES (2,'CompanyTwo','Address2','01/15/2003')INSERT INTO tDupData VALUES (3,'CompanyThree','Address3','01/15/2003')INSERT INTO tDupData VALUES (2,'CompanyTwo','Address','01/16/2003') INSERT INTO tDupData VALUES (3,'CompanyThree','Address','01/16/2003')
-- Dup Data INSERT INTO tDupData VALUES (1,'CompanyOne','Address1','01/15/2003') GO
/**********************************************Finish set up**********************************************/
/**********************************************Simple duplicate data**********************************************/select * from tDupData--Create temp table to hold duplicate dataCREATE TABLE #tempduplicatedata(lngCompanyID INTEGER ,strCompanyName VARCHAR(20),strAddress VARCHAR(10),dtmModified DATETIME)
--Identify and save dup data into temp tableINSERT INTO #tempduplicatedataSELECT * FROM tDupDataGROUP BY lngCompanyID,strCompanyName,strAddress, dtmModifiedHAVING COUNT(*) > 1
--Confirm number of dup rowsSELECT @@ROWCOUNT AS 'Number of Duplicate Rows'
--Delete dup from original tableDELETE FROM tDupData FROM tDupDataINNER JOIN #tempduplicatedataON tDupData.lngCompanyID = #tempduplicatedata.lngCompanyIDAND tDupData.strCompanyName = #tempduplicatedata.strCompanyNameAND tDupData.strAddress = #tempduplicatedata.strAddressAND tDupData.dtmModified = #tempduplicatedata.dtmModified
--Insert the delete data backINSERT INTO tDupDataSELECT * FROM #tempduplicatedata
--Check for dup data.SELECT * FROM tDupDataGROUP BY lngCompanyID,strCompanyName,strAddress,dtmModifiedHAVING COUNT(*) > 1
--Check tableSELECT * FROM tDupData
--Drop temp tableDROP TABLE #tempduplicatedata
--drop test tableIF OBJECT_ID('tDupData') IS NOT NULLDROP TABLE tDupDataGO

CodeProject: End-to-End Real World BlackBerry Application, Part 1. Free source code and programming help

CodeProject: End-to-End Real World BlackBerry Application, Part 1. Free source code and programming help

Screen Shot Application.

CodeProject: Screen Shot Application. Free source code and programming help

GridView Enhancements and Fixes

CodeProject: GridView Enhancements and Fixes. Free source code and programming help

GridView Enhancements and Fixes

CodeProject: GridView Enhancements and Fixes. Free source code and programming help

An ASP.NET/AJAX Interface for Utorrent

CodeProject: An ASP.NET/AJAX Interface for Utorrent. Free source code and programming help

LINQ-to-SQL: Generic Primary Key function

CodeProject: LINQ-to-SQL: Generic Primary Key function . Free source code and programming help

Implementing an ugly tab structure in reporting services

CodeProject: Implementing an ugly tab structure in reporting services. Free source code and programming help

TetroGL: An OpenGL Game Tutorial in C++ for Win32 Platforms - Part 1

CodeProject: TetroGL: An OpenGL Game Tutorial in C++ for Win32 Platforms - Part 1. Free source code and programming help

Version control for SQL databases with SQL -> XML

CodeProject: Version control for SQL databases with SQL -> XML. Free source code and programming help: "Version control for SQL databases with SQL -> XML"

CodeProject: Demystify LINQ in 10 minutes. Free source code and programming help

CodeProject: Demystify LINQ in 10 minutes. Free source code and programming help: "Demystify LINQ in 10 minutes"

MySQL Datatypes Field Length

MySQL :: Visual Basic / MySQL Datatypes: "MySQL Datatypes"

TINYINT
-128 to 127
integer
-32,768 to 32,767
*
TINYINT UNSIGNED
0 to 255
byte
0 to 255

SMALLINT
-32,768 to 32,767
integer
-32,768 to 32,767

SMALLINT UNSIGNED
0 to 65,535
long
-2,147,483,647 to 2,147,483,647
*
MEDIUMINT
-8,388,608 to 8,388,607
long
-2,147,483,647 to 2,147,483,647
*
MEDIUMINT UNSIGNED
0 to 16,777,215
long
-2,147,483,647 to 2,147,483,647
*
INT
-2,147,483,647 to 2,147,483,647
long
-2,147,483,647 to 2,147,483,647

INT UNSIGNED
0 to 4,294,967,295
double
64 Bit
1*
BIGINT
64 Bit
N/A
N/A
2
FLOAT
32 Bit Floating Point
single
32 Bit Floating Point

DOUBLE
64 Bit Floating Point
double
64 Bit Floating Point

DECIMAL
Variable Floating Point
double
64 Bit Floating Point
3*
CHAR
1 to 255 Characters
string
1 to Approx. 2,000,000,000 Characters
*
VARCHAR
1 to 255 Characters
string
1 to Approx. 2,000,000,000 Characters
*
TINYTEXT
1 to 255 Characters
string
1 to Approx. 2,000,000,000 Characters
*
TEXT
1 to 65535 Characters
string
1 to Approx. 2,000,000,000 Characters
4*
MEDIUMTEXT
1 to 16,777,215 Characters
string
1 to Approx. 2,000,000,000 Characters
4*
LONGTEXT
1 to 4,294,967,295 Characters
N/A
N/A
5
all BLOB types
1 to 4,294,967,295 Bytes
Variant
Varies
6
DATE
Date without Time
date
Date and Time value
*
DATETIME
Date and Time
date
Date and Time value

TIMESTAMP
Date and Time
date
Date and Time value

TIME
Time
date
Date and Time value
*
YEAR
Year
integer
-32,768 to 32,767
*
ENUM
Enumeration of Value Set
string
1 to Approx. 2,000,000,000 Characters
*
SET
Set of Values
string
1 to Approx. 2,000,000,000 Characters
*
Notes: