Académique Documents
Professionnel Documents
Culture Documents
Roll no 14
When you launch SQL Server Management Studio, you are shown the
normal “Connect to Server” dialog. First, you need to change the Server
Type to “SQL Server Compact Edition”. Now in the Database File area, click
on the drop down and pick “<New Database…>”.
One of the supported types of analysis by SQL Enlight is the T-SQL script
analysis. It can be used validating the code for syntax errors as well as for
conforming to best practices or your own standards and requirements.
As databases get bigger, the number of database objects increase and the
amount of business logic implemented using T-SQL code becomes quite
substantial, often even more critical than the application code; the
automation of the process of ensuring code quality is becoming more and
more important.
Static code analysis is a popular method for code verification and defect
detection in the .NET, C++ and Java development worlds, but very often left
behind and neglected by the SQL Server development community.SQL
Enlight is a tool for SQL Server that can automate and facilitate the T-SQL
code and database schema analysis. The tool works in a way similar to
the .NET focused tools like FxCop and StyleCop. It provides design-time
code, database schema and query plan analysis. The tool comes with about
70 out of the box analysis rules and also supports custom analysis rules.
Deprecated syntax (old outer joins, IMAGE and TEXT data types, deprecated
stored procedures usage and etc.)
Q2. Create a table showing all the constraints of SQL Server 2005.
How can we set ‘schedule properties’ in SQL Server agent . Justify
your answer with suitable example.
You can add constraints to an existing table by using the ALTER TABLE
statement. The following example adds a pk_employee primary key
constraint on an employee table:
Select abs(-49)
Select ceil(-59.8)
Go
Output
29
49
59
Ans Once a table is created in the database, there are many occasions
where one may wish to change the structure of the table. Yes we add or
remove attributes from a table after its creation In general,we can do
through ALTER TABLE command
Alter specification
Alter specification is dependent on the type of alteration we wish to
perform. We list a number of common changes below:
Data
Name
Type
First_Na
char(50)
me
Last_Nam
char(50)
e
Address char(50)
City char(50)
Country char(25)
Birth_Dat
Date
e
Our goal is to alter the data type of the "Address" column to char(100). To
do this, we key in:
Resulting table structure:
Table customer
Column Data
Name Type
First_Name char(50)
Last_Name char(50)
char(100
Address
)
City char(50)
Country char(25)
1. From the "SQL Server Agent" node, right click on the "Jobs" node, and
select "New Job":
8. If you need to set a recurring schedule, click "Change" (from the previous
screen).
To know under which security context your job step will be run, go ahead
and read the following:
If the job owner is an account that is in the sysadmin fixed server role, than
your step will be executed under the account used by the Sql Server Agent
service.
Otherwise the step will be executed under the security account of the Proxy
Account if enabled and configured (look under Sql Server Agent properties,
Job System tab). If that proxy account is not configured the step will fail.
Be advised that when you schedule a DTS Package the job step that will run
that package is a CmdExec step. So pay attention when you use the
Integrated Authentication in your DTS Packages since when the DTS will be
run from the job, the account used depends from the job owner as stated
above....and so you may find that if run manually your DTS works perfectly
(since uses *your* account credentials), while running it from the job will
bring you a failure.
select*from stuDentTable;