Back to Basics — What is DDL, DML, DCL & TCL?

Standard

I was talking with a database administrator about different categories that SQL Commands fall into — and I thought it would be great to document here. So here you go:

ACRONYMDESCRIPTIONSQL COMMANDS
DMLData Manipulation Language: SQL Statements that affect records in a table.SELECT, INSERT, UPDATE, DELETE
DDLData Definition Language: SQL Statements that create/alter a table structureCREATE, ALTER, DROP
DCLData Control Language: SQL Statements that control the level of access that users have on database objectsGRANT, REVOKE
TCLTransaction Control Language: SQL Statements that help you maintain the integrity of data by allowing control over transactionsCOMMIT, ROLLBACK

BONUS (Advance) QUESTION:

Is Truncate SQL command a DDL or DML? Please use comment section!

Author: Paras Doshi

How to fix the Non-unicode to unicode data type conversion problems in SQL Server Integration Services?

Standard

Problem:

Are you trying to import an Excel file into SQL Server using SQL Server Integration services…And ran into error that has words like “Non unicode” and “unicode”? Then this blog is for you.

Why does this error occur?

Well it turns out that things like SQL Server and Excel have encoding standards that they follow which provides them a way to process, exchange & store data. BUT turns out that SQL Server and Excel use different standards.

Solution:

So, the solution is simple right? Import the data from Excel into non-Unicode format because that’s what you need for SQL Server.

So how do you that? Between your Source and Destination tasks, include a task called “Data conversion” and do the following for all columns that have text:

Excel SQL Server Unicode Nonunicode

And in the destination task, you’ll have to make sure that the mapping section using the new output aliases that you defined in the “data conversion” step.

Conclusion:

In this post, we learned about how to solve a common error that pops up when you try to import excel file to sql server using SSIS. Hope that helps.

Author: Paras Doshi

[Video] I am 22 years old, So is SQL server! check out, history of SQL server:

Standard

Summary – SQL server to SQL Azure migration << Paras Doshi

Standard
In this blog post, I aim to summarize database migration options that I have been blogging about for past few weeks. Choosing right tool is a key decision when you decide to migrate SQL server to SQL Azure – And I hope this blog post can help you decide which is the best tool to be picked for your scenario:
 
Here is the summary:
 
Scenario/ToolGenerate script wizard SSISBCPDAC v2.0
Migrate SQL schemaYESYES YES
Migrate DataYESYESYESYES
Migrate large Data YESYESYES

 

Blog Posts featuring tools that help migrate SQL server database to SQL Azure:

BCP:

Migrating SQL server Data to SQL Azure using BCP << Paras Doshi

SSIS:

How to use SQL server Integration services (SSIS) to migrate data from SQL server to SQL Azure << Paras Doshi

Generate script wizard:

How to use Generate script wizard to migrate SQL server Database to SQL Azure << Paras Doshi

Dac’s v2.0 (SQL Azure Import Export CTP):

[ SQL Azure Labs ] Exploring SQL Azure Import/Export Feature (CTP)

 

Related posts:

Migrating TSQL file and SQL server 2005 / 2008 Database to SQL Azure using SQL Azure Migration wizard << Paras Doshi

“Migrating Data into Microsoft’s Data Platform – SQL Azure” << SolidQ Journal Article

 

CrossPosted From: Summary – SQL server to SQL Azure migration << Paras Doshi

 

Can you please consider posting your valuable feedback/comments/suggestion in comments section? Thanks!

Extending SQL Azure with Azure worker roles << Guest Post on Pinal sir’s blog

Standard

My guest post on “Extending SQL Azure with Azure worker role” got published on Pinal sir’s blog. In the article, I discuss three lightweight solutions that augment the contemporary capability of SQL Azure. They are:

1. Automating SQL Azure database backup process

2. Lightweight SQL server agent for SQL Azure

3. Synchronization of databases using SYNC Framework.

To read the article, please visit: http://blog.sqlauthority.com/2011/06/13/sql-server-extending-sql-azure-with-azure-worker-role-guest-post-by-paras-doshi/

Thank you Pinal sir for this wonderful opportunity.

sys.dm_db_partition_stats : A SQL Azure Dynamic management view (DMV) to calculate database size

Standard

I have written a blog post on beyondrelational site about a SQL Azure DMV – sys.dm_db_partition_stats that can be used to extract information about database size and size of each individual database object. To read the article please go to: http://beyondrelational.com/blogs/parasdoshi/archive/2011/05/30/sys-dm-db-partition-stats-a-sql-azure-dynamic-management-view-dmv-to-calculate-database-size.aspx

TSQL code to know SQL Azure DB size

A step by step guide to Install Adventure works LT ( sample database ) on SQL Azure

Standard

I have written a step by step guide on how to install Adventure works LT DB, a sample database available on codeplex, at my beyondrelational site. here is the link to the article: http://beyondrelational.com/blogs/parasdoshi/archive/2011/05/27/let-s-install-an-adventure-works-lt-database-on-sql-azure.aspx