SQL2000数据库安装使用相关教程
Sql2000安装常见问题:
1. XP系统;win7;2003系统,点击安装程序后,没反应。再点击安装程序,提示“另一个程序正在运行”。
解决办法:在开始—运行—输入—regedit,打开注册表编辑器
在XP和Server 2003系统中安装SQL Server 2000过程中,点击安装后,一直不出现安装界面,查看进程中也有,一直无反应。
解决办法:
首先重新启动机器,或者任务管理器里面结束2个sql进程
1. 在 SQLServer 安装向导, 单击 取消 。
2. 启动注册表编辑器。单击 开始-->运行, 键入 regedit , 和然后 "确定"。
3. 打开HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSession Manage中的PendingFileRenameOperations并删除
4. 打开HKEY_LOCAL_MACHINE-SYSTEM-CurrentControl-Control-Session Manager 找SafeDllSearchMode(注意 如果 SafeDllSearchMode注册表项不存在, 创建 DWORD注册表项,命名为SafeDllSearchMode )
5. 在 数值数据 框中, 将值从 1 更改为 0, 然后单击 确定 。
6. 退出注册表编辑器。
7. 重新安装 SQL Server 2000, 并安装**新的 SQL Server 2000
2. win764位系统安装sql2000,需要运行X86-setup-setupsql这个安装程序,才能安装。
3. 清空Sa密码报错。找不到存储过程
需要执行下列语句:
create procedure sp_password
@old sysname = NULL, -- the old (current) password
@new sysname, -- the new password
@loginamesysname = NULL -- user to change password on
as
-- SETUP RUNTIME OPTIONS / DECLARE VARIABLES --
set nocount on
declare @self int
select @self = CASE WHEN @loginame is null THEN 1 ELSE 2 END
-- RESOLVE LOGIN NAME
if @loginame is null
select @loginame = suser_sname()
-- CHECK PERMISSIONS (SecurityAdmin per Richard Waymire) --
IF (not is_srvrolemember('securityadmin') = 1)
AND not @self = 1
begin
dbccauditevent (107, @self, 0, @loginame, NULL, NULL, NULL)
raiserror(15210,-1,-1)
return (1)
end
ELSE
begin
dbccauditevent (107, @self, 1, @loginame, NULL, NULL, NULL)
end
-- DISALLOW USER TRANSACTION --
set implicit_transactions off
IF (@@trancount> 0)
begin
raiserror(15002,-1,-1,'sp_password')
return (1)
end
-- RESOLVE LOGIN NAME (disallows nt names)
if not exists (select * from master.dbo.syslogins where
loginname = @loginame and isntname = 0)
begin
raiserror(15007,-1,-1,@loginame)
return (1)
end
-- IF non-SYSADMIN ATTEMPTING CHANGE TO SYSADMIN, REQUIRE PASSWORD (218078) --
if (@self <> 1 AND is_srvrolemember('sysadmin') = 0 AND exists
(SELECT * FROM master.dbo.syslogins WHERE loginname = @loginame and isntname = 0
AND sysadmin = 1) )
SELECT @self = 1
-- CHECK OLD PASSWORD IF NEEDED --
if (@self = 1 or @old is not null)
if not exists (select * from master.dbo.sysxlogins
where srvid IS NULL and
name = @loginame and
( (@old is null and password is null) or
(pwdcompare(@old, password, (CASE WHEN xstatus&2048 = 2048 THEN 1 ELSE 0 END)) = 1) ) )
begin
raiserror(15211,-1,-1)
return (1)
end
-- CHANGE THE PASSWORD --
update master.dbo.sysxlogins
set password = convert(varbinary(256), pwdencrypt(@new)), xdate2 = getdate(), xstatus = xstatus& (~2048)
where name = @loginame and srvid IS NULL
-- UPDATE PROTECTION TIMESTAMP FOR MASTER DB, TO INDICATE SYSLOGINS CHANGE --
exec('use master grant all to null')
-- FINALIZATION: RETURN SUCCESS/FAILURE --
if @@error <> 0
return (1)
raiserror(15478,-1,-1)
return (0) -- sp_password