Feeds:
Posts
Comments

Archive for the ‘MS Sql Server’ Category

How to copy data from one table on another machine to my local machine in sql:

INSERT INTO [mydbname].[dbo].[mytablename] SELECT * FROM [myservername\myserverinstancename].[mydbname2].[dbo].[mytablename]

EXEC sp_addlinkedserver ‘myservername\myserverinstancename’
EXEC sp_addlinkedsrvlogin ‘myservername\myserverinstancename’, ‘false’, NULL, ‘myusername’, ‘mypassword’

You might get error if you have some foreignkeys in the table, but for tables that don’t, this approach works well.

Advertisements

Read Full Post »

Trouble getting your db connection strings right? Create a text file with the ending .udl and double click it. Now, you will get a gui for entering values as well as a button for testing the connection!

Read Full Post »

How do you identify your sql server? It’s simple (but I always forget how :-)), just run the command:

SELECT SERVERPROPERTY(‘productversion’), SERVERPROPERTY (‘productlevel’), SERVERPROPERTY (‘edition’)

Check out http://support.microsoft.com/kb/321185 for more information.

Read Full Post »