Sunday, September 30, 2007

Often I experienced the connection problem while connecting to SQL Server 2005 on Windows Vista with the message "login failed for user" even with an administrator account - sounds strange. 

Lets trace why this happens:

- In order to connect to SQL Server 2005 your account must be added to 'sysadmin' fixed server role.
- Windows Vista has a new feature called User Account Control or UAC in short which allows admins to manage privileges.
- By default accounts on Windows Vista are not part of 'sysadmin' fixed role.

Let's fix the problem

In order to add ordinary user to 'sysadmin' fixed server role - To add a normal user to the 'sysadmin' fixed role execute this system stored procedure

EXEC sp_grantlogin 'domain\user'
EXEC sp_addsrvrolemember 'domain\user', 'sysadmin'

After executing these stored procedure(s) user who has been granted login and added to 'sysadmin' fixed role no longer receive this error.

9/30/2007 1:54:48 AM UTC  #    Disclaimer  |  Comments [0]  | 
 Thursday, September 20, 2007

My passion to work with the developer community leads me to work closer with the developer platform integration of SQL Server and like before this time also I'm delighted to see the new features in action.

The LINQ - Language Integrated Query, which enables developers to query variety of datasources using C# and VB instead of depending on database specific languages like SQL - Structed Query Language, is now supported by Visual Studio Tools.

9/20/2007 11:04:02 AM UTC  #    Disclaimer  |  Comments [0]  | 
 Tuesday, September 18, 2007

The following is a list of future and past speaking engagements and links to related files.

Future Events

Launch Event, SQL Server 2008 in collaboration with Microsoft & PASS (Professional Association of SQL Server)
Announcing soon!!!

Past Events

Integrating SQL Server 2005 Data Warehouse with MOSS 2007 - Dubai College - Dubai, UAE - July, 2008
SQL Server 2005 Data Warehouse is one of the areas on which everyone keep an eye on, integrating SQL Server 2005 Data Warehousing with SharePoint 2007 is the ultimate choice. This integration enables Extration and Loading of SQL Server 2005 Data Warehouse data in SharePoint - needless to say InfoPath Forms play vital role in generating reports.
Presentation: http://dnfug.com/Web/files/folders/sessions/default.aspx

Integrating SQL Server 2005 Reporting Services with MOSS 2007 - AlFattan Plaza - Dubai, UAE - November 26, 2007
SQL Server 2005, enables deep integration between Reporting Services and SharePoint technologies (Windows SharePoint Services 3.0 and Office SharePoint Server 2007). This integration enables an end-user to view and manage reports completely from within a SharePoint environment.
Presentation: http://dnfug.com/Web/files/folders/sessions/default.aspx

SQL Server 2008 : Performance Audit - Microsoft Technology Center - Dubai, UAE - October 28, 2007
To help identifying any performance related problems with SQL Server 2008. SQL Server 2008 performance tuning can be difficult but with this checklist it’s easy to identify all performance problems.
Presentation: 
http://dnfug.com/Web/files/folders/sessions/default.aspx

SharePoint Server 2007, Developer Platform Integration - AlFattan Plaza - Dubai, UAE - July 22-26-31, 2007
The session was delivered to .NetFoundry usergroup, a lot of enthusiasm was seen during this 3 day session - members were passionate to learn SharePoint technology and how to perform Site Branding and Customization.
Presentation: 
http://dnfug.com/Web/files/folders/sessions/default.aspx

Vista and Office 2007 - Higher College - Dubai Women College - Dubai, UAE - Monday, December 18, 2006
This session was presented to a strength of 50+ staff who were passionate in learning Windows Vista, a new platform and more then a operating system, and Microsoft Office 2007. This session was in conjunction with Microsoft. In the end some give aways were given on basis of lucky draw.
Presentation: 
http://dnfug.com/Web/files/folders/sessions/default.aspx

.Net Framework Core - AlFattan Plaza - Dubai, UAE - Wednesday, September 20, 2006
.Net Framework Insights.
Presentation: 
http://dnfug.com/Web/files/folders/sessions/default.aspx

A Flexible Model for Data Integration - Grano Coffee Shop, Rigga Road, Dubai, UAE - Wednesday, July 05, 2006
Orgnizations use XML data described by XML schema and exchange through Web Services to integrate systems. Find out three causes of failure that data-centric integration projects can encounter and their solutions.
Presentation: http://dnfug.com/Web/files/folders/sessions/default.aspx

.Net Framework 3.0 - Grano Coffee Shop, Rigga Road, Dubai, UAE - Thursday, June 22, 2006
“WinFX sounds great, but what happens to .NET?” .NET Framework has becomes the most successful developer platform in the world. Developers know and love .NET.
Presentation: http://dnfug.com/Web/files/folders/sessions/default.aspx

Yukon and Whidbey in a Glance - AlFattan Plaza - Dubai, UAE - Wednesday, February 15, 2006
This session was to related to Yukon and Whidbey and how an organization can take advantage from business and development perspective.
Presentation: http://dnfug.com/Web/files/folders/sessions/default.aspx

9/18/2007 2:31:34 PM UTC  #    Disclaimer  |  Comments [0]  | 
 Sunday, September 16, 2007

Scenario:
While retaining the IDENTITY column, how to merge two tables from different databases with same schema

Solution:
All you have to do is run the below mention query

SET IDENTITY_INSERT target_database.owner.target_table ON

INSERT INTO target_table (col1, col2, ..., colN)
SELECT FROM source_table(col1, col2, ..., colN)

SET IDENTITY_INSERT target_database.owner.target_table OFF


Have fun ;-)

9/16/2007 9:47:21 AM UTC  #    Disclaimer  |  Comments [0]  | 
 Wednesday, September 12, 2007

Complete or Full Backup/Restore

  • Creating Backup

BACKUP DATABASE [database_name]
TO DISK = 'path\backup_filename_full.bkp'
WITH INIT

  • Restoring Backup

RESTORE DATABASE [existing_database_name]
FROM DISK = 'path\backup_filename_full.bkp'

RESTORE DATABASE [new_database_name]
FROM DISK ='path\backup_filename_full.bkp'
WITH MOVE 'database_name TO 'path\new_database_name.mdf'
         MOVE 'database_name_log' TO 'path\new_datanase_name.ldf'

 


Differential Backup/Restore

  • Creating Backup

BACKUP DATABASE [database_name]
TO DISK ='path\backup_filename_diff.bkp'
WITH INIT, DIFFERENTIAL

  • Restoring Backup

As we know the Differential contains only the modified since last full backup, so we have to RESTORE the full backup first with NORECOVERY and then differential with RECOVERY statement.

RESTORE DATABASE [database_name]
FROM DISK 'path\backup_filename.bkp'
WITH NORECOVERY

RESTORE DATABASE [database_name]
FROM DISK 'path\backup_filename_diff.bkp'
WITH RECOVERY

9/12/2007 7:47:33 AM UTC  #    Disclaimer  |  Comments [0]  |