Wednesday, September 26, 2018

Web API - Some basics

Web API - Some basics

What is ASP.Net Web API

API means Application Programming Interface.
This is a framework for building 
HTTP based services on top of .Net Framework

These services can be consumed by mobile devices, tablets, browsers and desktop applications

REST means Representational State Transfer, is an architectural pattern 
for creating services.

A client sends a request to server and server responds

Standard HTTP methods 

GET - To retrieve data from resource

POST - Creates a new entry for data and send to server

PUT - Updates data

DELETE - Delete specific data from server



Sunday, May 27, 2018

Linked Server


What is a Linked Server?

Linked servers are configured to enable the Database Engine to execute a SQL statement
that includes tables in another instance of SQL Server, or another database product such as Oracle or ACCESS.

Many types OLE DB data sources can be configured as linked servers, including Microsoft Access and Excel.

Linked servers offer the following advantages:

The ability to access data from outside of SQL Server.

The ability to issue distributed queries, updates, commands, and transactions on
other data sources .


How to create a Linked Server in SQL

1. Connect to sql server through SSMS
2. Right click Linked Server under Server Objects and Select New Linked Server option
3. Give it a name, choose Server Type as SQL server
4. Give instance name of Linked Server
5. Select Security option and Be made using this security option, add Remote login and Password
6. Select OK
7. Under the Catalog, you can see the databases created


You can also create a linked server definition by running sp_addlinkedserver.

We can get details of linked servers by these procedures
exec sp_linkedservers

or

select * from sys.servers