SQL Server is a
collection of Services, Applications and libraries
Services
·
Database Engine
·
Integration services
·
Reporting services
·
Analysis services
·
SQL Server Compact
Applications
To talk to SQL Server
these r the ways,
·
SSMS
·
SQLCmd
·
PowerShell
·
SQLServer Profiler
·
Tuning Advisor
Libraries
·
SMO(SQLServer Management Objects )
·
LINQ to SQL
·
ADO.NET
SMO contains all the database objects , table objects…etc
everything is in object format.SSMSis a GUI editor to
work on SQLServer.SQLCmd is command line editor to work on SQLServer.Toget the details of the sqlserver need to
use SQLcmd /?as
shown in below fig,
Fig-SQL Cmd
Working
with SQLCmd
All sqlcmd commands,
except GO, must be prefixed by a colon (:).For more info on SQLCmd visit
SQLServer Books online from SSMS.
Fig-Working Wth Sql Cmd(Connect to the sqlserver database and
write T-SQL queries as shown above)
Working
with SQL Powershell
Fig-SQL PowerShell
Fig-SQL PowerShell(• In the above screens SQL PS is used to
access the sqlserver databases , tables and to get the info of that tables)
LINQ
to SQL
LINQ is a new feature in c# to get data or to do manipulation in
sqlserver database.LINQ syntax is similar to T-sql query
syntax bit differs.We can u LINQPad editor work on with LINQ
to SQL.
The above LINQ query gives the similar data from two different
tables, just like joins in t-SQL.Its in LINQPad editor, the same syntax v
can use in VS editor also using C#
No comments:
Post a Comment