Monday, May 21, 2012

Saving changes is not permitted in SQL 2008 Management Studio

When you design a table in a database and then try to make a change to a table structure that requires the table to be recreated, the Database Management Studio will not allow you to save the changes.
This is caused by a configuration setting that default results in the following dialog:


Error Screen



Solutions:

This is by design and can be quickly fixed in Management Studio by unchecking a property.
To fix this in Management Studio, go to Tools -> Options then go to the Designer Page and uncheck "Prevent saving changes that require table re-creation


                                                                     

Friday, May 18, 2012

SharePoint webparts AJAX enabled?

The web parts in SharePoint 2007 are NOT Ajax enabled.  AJAX support didn't come along for 2007 until SP1.  The web parts weren't re-written to add AJAX to them.  Some of the SharePoint 2010 web parts are AJAX enabled, but not in 2007.



Sunday, May 6, 2012

Add Linked server using Command


A linked server configuration allows Microsoft® SQL Server™ to execute commands against OLE DB data sources on different servers. Linked servers offer these advantages:

  • Remote server access.
  • The ability to issue distributed queries, updates, commands, and transactions on heterogeneous data sources across the enterprise.
  • The ability to address diverse data sources similarly

sp_addlinkedserver
Creates a linked server. A linked server allows for access to distributed, heterogeneous queries against OLE DB data sources. After a linked server is created by using sp_addlinkedserver, distributed queries can be run against this server. If the linked server is defined as an instance of SQL Server, remote stored procedures can be executed.

Command:
EXEC sp_addlinkedserver @server= SERVER NAME

eg, your server name is myDBserver then 
EXEC sp_addlinkedserver @server = 'myDBserver'


sp_addlinkedsrvlogin
Creates or updates a mapping between a login on the local instance of SQL Server and a security account on a remote server.

Command:
EXEC sp_addlinkedsrvlogin  @rmtsrvname , 'TRUE' | 'FALSE' | NULL@locallogin@rmtuser
@rmtpassword 

eg,
EXEC sp_addlinkedsrvlogin 'myDBserver, 'false', NULL, 'sa', 'password'