随笔分类 - 数据库
摘要:创建 gbase 用户,并更改它的密码useradd gbasepasswd gbase 开始安装 cd /home/gbase/setup/GBaseInstallsh ./Install_lin.sh 配置文件位置./config/gbase_8a_gbase8a.cnf 启动服务:gbase.
阅读全文
摘要:在安装MongoDB之后,先关闭auth认证,启动服务端,创建一个帐号,该账号需要有grant权限,即:账号管理的授权权限。注意一点,帐号是跟着库走的,所以在指定库里授权,必须也在指定库里验证(auth)。 添加管理用户: use admin db.createUser( {user: "admin
阅读全文
摘要:以最小模式启动sql cd C:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\Binn\ 运行 sqlservr.exe -f -sMSSQLSERVER 马上修改内存设置,重启后服务正常。 EXEC sp_configure 'show advanced options', '1' RECONFIGURE WITH O
阅读全文
摘要:Use [数据库名称] Go DECLARE @DBCCString NVARCHAR(1000) DECLARE @TableName VARCHAR(100) DECLARE Cur_Index CURSOR FOR SELECT Name AS TblName FROM sysobjects WHERE xType='U' ORDER BY TblName FOR READ ONLY OPE
阅读全文
摘要:SELECT * FROM sys.[dm_db_missing_index_details] SELECT * FROM sys.[dm_db_missing_index_groups] SELECT * FROM sys.[dm_db_missing_index_group_stats] SELECT * FROM sys.[dm_db_missing_index_columns](1) --
阅读全文
摘要:public class DBHelper:IDisposable { /// /// 连接字符串 /// private string connString { get; set; } public DBHelper() { this.connString...
阅读全文
摘要:1.sqlserver 日期转时间戳,取到秒,十位 select DATEDIFF(s,'1970-01-01 00:00:00',getdate()) 2.sqlserver 时间戳转日期 select DATEADD(S,1528380035,'1970-01-01 00:00:00') 3.mysql日期转时间戳,取到秒,十位 select UNIX_TIMESTAMP(now()) 4.m
阅读全文
摘要:Truncate Table sbank show status like 'qcache%'; show variables like '%query_cache%'; set @@global.query_cache_size=1024*1024*64; mongodb.find 常用的条件设置语句: 1.简单查询: db.user.find({name:'11111',age;20}...
阅读全文

浙公网安备 33010602011771号