SQL DBA Interview question and answer
<!--
/* Font Definitions */
@font-face
{font-family:SimSun;
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-alt:宋体;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:3 135135232 16 0 262145 0;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;
mso-font-charset:0;
mso-generic-font-family:roman;
mso-font-pitch:variable;
mso-font-signature:-1610611985 1107304683 0 0 159 0;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;
mso-font-charset:0;
mso-generic-font-family:swiss;
mso-font-pitch:variable;
mso-font-signature:-1610611985 1073750139 0 0 159 0;}
@font-face
{font-family:"\@SimSun";
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:3 135135232 16 0 262145 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-unhide:no;
mso-style-qformat:yes;
mso-style-parent:"";
margin-top:0cm;
margin-right:0cm;
margin-bottom:10.0pt;
margin-left:0cm;
line-height:115%;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:SimSun;
mso-fareast-theme-font:minor-fareast;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
.MsoChpDefault
{mso-style-type:export-only;
mso-default-props:yes;
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:SimSun;
mso-fareast-theme-font:minor-fareast;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
.MsoPapDefault
{mso-style-type:export-only;
margin-bottom:10.0pt;
相关文档:
方案一:SQL自带的数据库备份计划
一:基本思路
1:要实现异地备份,必须使用域用户帐号来启动SQL Server服务以及SQL Server Agent服务,因为本地系统帐户无法访问网络。
2:在异地机器中建立一个与SQL Server服务器中启动SQL Server服务的域用户帐号同名帐号,且密码保持相同。在异地机器中建立一个共享文件夹,并设置合 ......
例1 传入一个参数@username,判断用户是否存在
-------------------------------------------------------------------------------
CREATE PROC IsExistUser
(
@username varchar(20),
@IsExistTheUser varchar(25) OUTPUT--输出参数
)
as
SELECT @IsExistTheUser = count(username)
from users
WHERE username ......
Update Channel set Unit ='mg' ,
RunUpThreshold='10' ,
RunDownThreshold='10' ,
SafetyUpThreshold='10' ,
SafetyDownThreshold='10'
where Bridge='001' and DeviceCode='AS'
and SensorCode='001' and Supplement='N'
set : ','
where: and ......
今天抽出一点时间解释几个关于SQL日志的概念,他们也经常使初学者望而止步,反正计算机的术语都是很抽象的,所以第一感觉就是头疼,然后然后几次后就没感觉了.以下有些是从书上摘抄的,有的是从网上找的算是借花献佛吧!!
物理日志文件:
这个比较好理解,实实在在的东西,数据库目录下面的.ldf文件 ......
1.使用Management Studio Express,用“Windows身份验证”登录,选中SQL服务器名,右击鼠标选择属性,在服务器属性选项页面,选择“安全性”,将服务器身份验证由“Windows身份验证”改为“SQL Server和Windows身份验证”,单击确定。
2.使用SQL Server 2005外围应用 ......