sid

操作表作业day35

徘徊边缘 提交于 2019-12-03 00:08:28
建表 班级表 create table class( cid int auto_increment unique, caption varchar(32) not null default '' )charset utf8; insert into class (caption) values ('三年一班'),('三年二班'),('三年三班'),('三年四班'); mysql> select * from class; +-----+----------+ | cid | caption | +-----+----------+ | 1 | 三年一班 | | 2 | 三年二班 | | 3 | 三年三班 | | 4 | 三年四班 | +-----+----------+ 4 rows in set (0.01 sec) 学生表 create table student( sid int auto_increment unique, sname varchar(32) not null default '', gender enum('女','男'), class_id int not null default 0, constraint stu_cla foreign key (class_id) references class(cid) )charset utf8;

Oracle提示资源正忙, 但指定以 NOWAIT

匿名 (未验证) 提交于 2019-12-02 23:43:01
问题描述 有时候 oracle 数据的某些表由于频繁操作,而且比较大,会导致锁表。 (2)查询锁方法 以DBA角色, 查看当前数据库里锁的情况可以用如下SQL语句: select t2.username,t2.sid,t2.serial#,t2.logon_time from v$locked_object t1,v$session t2 where t1.session_id=t2.sid order by t2.logon_time 如果有长期出现的一列,可能是没有释放的锁。 ― 查锁表 select SESS.sid, SESS.SERIAL#, LO.ORACLE_USERNAME, LO.OS_USER_NAME, AO.OBJECT_NAME, LO.LOCKED_MODE from V$LOCKED_OBJECT LO, DBA_OBJECTs AO, V$SESSION SESS where AO.OBJECT_ID = LO.OBJECT_ID and lo.session_id = sess.sid; 解决方法: (1)释放锁的方法: 我们可以用下面SQL语句杀掉长期没有释放非正常的锁: alter system kill session 'sid,serial#'; //sid,serial#是上面查询出来的 文章来源: https://blog.csdn

Mysql数据库使用:主要针对学生选课系统而设计,其中设计到三张表,分别为学生表,课程表,学生和课程对应的关联表。

匿名 (未验证) 提交于 2019-12-02 22:06:11
练习内容: 主要针对学生选课系统而设计,其中设计到三张表,分别为学生表,课程表,学生和课程对应的关联表。 学生表主要用于存储学生信息,包括姓名,性别,地址,电话等信息 课程表主要用于存储课程的信息,包括课程的名称,课程的描述,学分等信息 关联表,用于关联学生表和课程表,课程的分数等 表创建/数据准备 show databases; drop database if exists SRS; create database SRS default charset utf8; use SRS ; show tables; create table TbStudent ( stuid integer not null , stuname varchar ( 20 ) not null , stusex bit default 1 , stubirth datetime not null , stutel char ( 11 ), stuaddr varchar ( 255 ), stuphoto longblob, primary key (stuid) ); alter table TbStudent drop column stutel; desc TbStudent; drop table if exists TbCourse; create table TbCourse (

How do I get SID for the group using vbscript?

删除回忆录丶 提交于 2019-12-02 14:39:59
问题 I want to get the SID of a group by input the group name and it will return the SID. Is there any way to do this using vbscript ? Any help would be great 回答1: Use WMI for resolving the SID: Set wmi = GetObject("winmgmts://./root/cimv2") groupname = "..." qry = "SELECT * FROM Win32_Group WHERE Name='" & groupname & "'" For Each group In wmi.ExecQuery(qry) sid = group.SID Next If Not IsEmpty(sid) Then WScript.Echo "Group " & groupname & " has SID " & sid & "." Else WScript.Echo "SID For group "

How do I get SID for the group using vbscript?

我与影子孤独终老i 提交于 2019-12-02 12:10:08
I want to get the SID of a group by input the group name and it will return the SID. Is there any way to do this using vbscript ? Any help would be great Use WMI for resolving the SID: Set wmi = GetObject("winmgmts://./root/cimv2") groupname = "..." qry = "SELECT * FROM Win32_Group WHERE Name='" & groupname & "'" For Each group In wmi.ExecQuery(qry) sid = group.SID Next If Not IsEmpty(sid) Then WScript.Echo "Group " & groupname & " has SID " & sid & "." Else WScript.Echo "SID For group " & groupname & " could not be resolved." End If If you need to convert the binary SIDs used in AD I'd

MySQL练习

假装没事ソ 提交于 2019-12-01 19:42:04
一、表关系 二、创建数据库和表 (一)创建数据库 创建数据库test2,用于存放上述表 mysql> create database test2 default charset utf8 collate utf8_general_ci; Query OK, 1 row affected (0.00 sec) (二)创建表 创建上述表以及相应的约束 创建班级表 mysql> create table class ( -> cid int primary key auto_increment comment '主键ID' , -> caption varchar(64) not null comment '班级名称' -> )charset=utf8 collate=utf8_general_ci engine=innodb comment='班级表 Query OK, 0 rows affected (0.02 sec) mysql> show tables; +-----------------+ | Tables_in_test2 | +-----------------+ | class | +-----------------+ 1 row in set (0.00 sec) mysql> desc class; +---------+-------------+------

使用debian sid做为自己的

五迷三道 提交于 2019-12-01 18:13:37
最近闲来无事,从ubuntu 转向debian装了debian不下十遍,最后确定debian sid做为自己的桌面系统。刚开始用ubuntu12.04 老是无缘无辜的崩溃,关机失去响应。装了硬件驱动本地视频不能播放(我的显卡是amdhd6470)。总之ubuntu 12.04bate1问题很多。 装了debian squeeze 6.0 播放网页视频很卡,而且笔记本发热很大,观看flash 的视频较多无奈又该成linux mintdebian 201012 挂debian stable 163源升级到最新版本出现同样的问题。 从debian 官网下载testing 光盘,我下载的是cd然后用163的源升级安装的安装后能用。装了官方的驱动出现本的视频不能播放的问题,和ubuntu 12.04 同样的问题。无奈又重装debian testing 然后安装编译环境,装了non-free的fglrx驱动播放视频一切正常。不过播放flash 还是发热很高。 想想3.3内核加入了电源管理模块,准备升级debian testing 为debian sid,想升级后内核版本会升高,没想到debian testing 和debian sid 的内核版本一样同为 3.2.0.2内核。自己又不会编译内核,看了编译内核很麻烦,就想到ubuntu 内核网站有编译好的内核供下载安装。(ubuntu12.04

Convert SID to Username in C#

风流意气都作罢 提交于 2019-12-01 09:21:27
In .net, I can create a NTAccount using domain and username, and get it's SID. But I cannot convert the SID back to NTAccount using translate function. new SecurityIdentifier(stringSid).Translate(typeof(NTAccount)).ToString(); And this two way conversion code has no problem running on Domain Controller. Maybe some configuration wrong? SecurityIdentifier.Translate() method works only on domain accounts so perhaps your computer not attached to domain. To resolve local SIDs into account name you can use Win32 API function LookupAccountSid() look here for example. Instead of using the

oracle查锁表

不打扰是莪最后的温柔 提交于 2019-12-01 07:41:43
查锁表: SELECT l.inst_id ,s.MACHINE, client_info, s.sid, s.serial# ,object_name, os_user_name,oracle_username , locked_mode, s.program,prev_exec_start,logon_time, wmsys.wm_concat(c.sql_text) sql FROM gv$locked_object l, dba_objects o, gv$session s , gv$open_cursor c WHERE l.object_id = o.object_id AND l.session_id = s.sid and l.inst_id=c.inst_id and s.sid=c.sid and l.inst_id=s.inst_id group by l.inst_id ,s.MACHINE, client_info, s.sid, s.serial# ,object_name, os_user_name,oracle_username , locked_mode, s.program,prev_exec_start,logon_time; select a.SID,b.sid,a.block,a.TYPE,b.request, (select