数据库
赱向远方
这个作者很懒,什么都没留下…
展开
-
Host ‘xxx.xx.xxx.xxx‘ is not allowed to connect to this MySQL server
Host ‘xxx.xx.xxx.xxx’ is not allowed to connect to this MySQL server原创 2022-09-05 15:45:46 · 570 阅读 · 0 评论 -
Oracle select scheduler job and drop job
查询任务删除任务原创 2022-07-12 17:30:56 · 381 阅读 · 0 评论 -
Oracle drop all queue and queue table
删除用户下的队列名称及其队列表原创 2022-07-12 17:02:59 · 257 阅读 · 0 评论 -
unable to rollback aborted in-doubt branch on resource
unable to rollback aborted in-doubt branch on resource -error=XAER_RMFAIL, extra error=ORA-1031.Caused by: java.sql.SQLSyntaxErrorException: ORA-01031: insufficient privileges at oracle.jdbc.driver.原创 2016-06-17 18:39:41 · 1375 阅读 · 0 评论 -
SQL Server delete all tables
/* Drop all non-system stored procs */DECLARE @name VARCHAR(128)DECLARE @SQL VARCHAR(254)SELECT @name = (SELECT TOP 1 [name] FROM sysobjects WHERE [type] = 'P' AND category = 0 ORDER BY [name])WHILE原创 2016-07-04 14:27:01 · 1131 阅读 · 0 评论 -
Oracle data types and Microsoft SQL Server data types
https://msdn.microsoft.com/en-us/library/ms151817(v=sql.105).aspx原创 2016-07-05 16:12:19 · 372 阅读 · 0 评论 -
ORA-00054: resource busy and acquire with NOWAIT specified
1.select object_name, s.sid, s.serial#, p.spid from v$locked_object l, dba_objects o, v$session s, v$process pwhere l.object_id = o.object_id and l.session_id = s.sid and s.paddr = p.addr;2.alter s原创 2016-07-05 19:56:42 · 341 阅读 · 0 评论 -
ORA-30649: missing DIRECTORY keyword
alter table TABLENAME add FIELDNAME char(1) not null default '0' ;it was throwing an error:'ORA-30649:missing directory keyword'solution: put NOT NULL after the default '0'http://stackoverflow.com/q原创 2016-08-16 14:48:12 · 2300 阅读 · 0 评论 -
PLSQL中在COMMAND WINDOW下输出語句
set serveroutput on begin dbms_output.put_line('hello_world'); end; /运行过程中出现 ORA-20000: ORU-10027: buffer overflow, limit of 2000 bytes set serveroutput on size 1000000http://www.dba-oracle.com/原创 2016-09-30 13:48:41 · 2852 阅读 · 0 评论 -
Oracle get the Primary and foreign Key Column
获取单个表主键SELECT cols.table_name, cols.column_name, cols.position, cons.status, cons.ownerFROM all_constraints cons, all_cons_columns colsWHERE cols.table_name = 'TABLE_NAME'AND cons.constraint_type =原创 2016-09-30 13:54:53 · 436 阅读 · 0 评论 -
Oracle Create Sequence
CREATE SEQUENCE customers_seq START WITH 1000 INCREMENT BY 1 NOCACHE NOCYCLE;CREATE OR REPLACE TRIGGER JOB_INSTANCE_BRIBEFORE INSERT ON JOB_INSTANCEFOR EACH ROW BEGIN SELECT JOB_INSTA原创 2016-07-05 16:20:36 · 986 阅读 · 0 评论 -
ORA-28001: the password has expired
admin登陆 查看被锁住的表信息1.SELECT username, account_status FROM dba_users WHERE ACCOUNT_STATUS LIKE '%EXPIRED%';2. ALTER USER username IDENTIFIED BY password;3. ALTER USER username ACCOUNT UNLOCK;http://sta原创 2016-11-12 19:38:39 · 396 阅读 · 0 评论 -
MongoDB
MongoDB is an open-source, document database designed for ease of development and scaling.mongod --dbpath=E:\MongoDB\datamongoimport.exe --db test --collection restaurants --drop --file primer-dataset.原创 2016-12-06 19:26:02 · 361 阅读 · 0 评论 -
Oracle 地址
https://docs.oracle.com/cd/A57673_01/DOC/products.htm原创 2017-08-02 20:34:16 · 429 阅读 · 0 评论 -
ORA-02049: timeout: distributed transaction waiting for lock
select 'alter system kill session ''' || sid || ',' || serial# || ''';' from v$session where username = 'XXX';原创 2016-07-13 10:05:05 · 3458 阅读 · 0 评论 -
deferrable initially deferred
DEFERRABLE Clause The DEFERRABLE and NOT DEFERRABLE parameters indicate whether or not, in subsequent transactions, constraint checking can be deferred until the end of the transaction using the SET C原创 2016-05-09 14:40:56 · 1762 阅读 · 0 评论 -
MySQL Data source rejected establishment of connection, message from server: "Too many connections"
原因: 因为你的mysql安装目录下的my.ini中设定的并发连接数太少或者系统繁忙导致连接数被占满解决方式: 打开MYSQL安装目录打开MY.INI找到max_connections 默认是100 一般设置到500~1000比较合适,重启mysql,这样错误就解决啦。 max_connections=1000原创 2016-05-03 14:31:50 · 3704 阅读 · 0 评论 -
pl/sql存储过程中游标嵌套的实现方法
游标2用游标1每条记录中的条件查找 游标2用参数实现,其中MyString VARCHAR2(20);是测试用的变量 如下 create or replace procedure cursor_example as MyString VARCHAR2(20);CURSOR SelectContent IS select A1,A2 from A;CURSOR SelectContent2转载 2015-08-05 16:11:41 · 1717 阅读 · 0 评论 -
oracle rownum
先看以下两条语句的执行结果: 语句一:select rownum,empno,sal from emp order by empno; ROWNUM EMPNO SAL 1 7369 800 2 7499 1600 3 7521 1250 4转载 2015-08-05 15:56:14 · 537 阅读 · 0 评论 -
table or view does not exist
数据库有表,却报table or view does not exist查了下,说是可能权限没给,权限加上后问题解决原文地址原创 2015-10-16 16:55:52 · 2141 阅读 · 0 评论 -
Oralce drop all tables
BEGIN FOR cur_rec IN (SELECT object_name, object_type FROM user_objects WHERE object_type IN ('TABLE',原创 2015-11-05 16:36:50 · 660 阅读 · 0 评论 -
Mybatis environment set up
Mybatis 3 Document 1. add mybatis and mysql dependencies in pom.xml<dependencies> <dependency> <groupId>org.mybatis</groupId> <artifactId>mybatis</artifactId>原创 2015-12-01 19:53:31 · 469 阅读 · 0 评论 -
Oracle常用命令
Oracle常用命令CREATE TABLE STATEMENTCREATE TABLE TableName ( column1 datatype [ NULL | NOT NULL ], ... column_n datatype [ NULL | NOT NULL ]);CREATE TABLE new_table AS (SELECT * FROM old_table)原创 2015-07-22 11:48:48 · 369 阅读 · 0 评论 -
database export import
exp username/password@oracle file=c:\XXX.dmp log=c:\XXX.log compress=y direct=yIMP username/password@oracle file=E:\xxx.dmp ignore=n commit=y grants=y full=y原创 2016-02-22 19:04:48 · 347 阅读 · 0 评论 -
Oracle Using Flashback Drop and Managing the Recycle Bin
sqlplus sys/pwd@ip:1521/testdrop table xxxTableshow recyclebinflashback table xxxTable to before drop;Database Administrator’s Guide原创 2016-03-10 17:40:27 · 377 阅读 · 0 评论 -
Converting Index-Organized Tables to Regular Tables
http://dba.stackexchange.com/questions/120525/how-can-i-alter-the-primary-key-of-an-index-organized-tablehttp://www.toadworld.com/platforms/oracle/w/wiki/4494.index-organized-tables-iothttps://docs.ora原创 2016-04-14 17:19:17 · 364 阅读 · 0 评论 -
SQL Error: ORA-01427: single-row subquery returns more than one row
http://stackoverflow.com/questions/9970480/updateerror-receiving-error-ora-01427-single-row-subquery-returns-more-than-o原创 2016-04-15 15:40:11 · 3703 阅读 · 0 评论 -
Oracle Database Reserved Words
ACCESS ADD * ALL * ALTER * AND * ANY * AS * ASC * AUDIT BETWEEN * BY * CHAR * CHECK * CLUSTER COLUMN COMMENT COMPRESS CONNECT * CREATE * CURRENT * DATE * DECIMAL * DEFAULT * DELE原创 2016-04-15 18:29:39 · 367 阅读 · 0 评论 -
数据迁移 flyway
MyFlyWaypublic class MyFlyWay { public static void main(String[] args) { Flyway flyway = new Flyway(); flyway.setDataSource("jdbc:mysql://localhost:3306/xxx","root","root");原创 2016-04-28 16:56:26 · 1032 阅读 · 1 评论 -
PLS-00103: Encountered the symbol "CREATE"
http://stackoverflow.com/questions/7233210/is-there-a-way-to-create-multiple-triggers-in-one-script http://stackoverflow.com/questions/20334067/pls-00103-encountered-the-symbol-create http://原创 2016-04-18 12:56:25 · 2291 阅读 · 0 评论 -
MySQL java.sql.SQLException: Incorrect string value: '\xF0\x9F\xA4\x97' for column
修改那列定义varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci http://stackoverflow.com/questions/23670754/exception-java-sql-sqlexception-incorrect-string-value-xf0-x9f-x92-xbc-for原创 2016-05-03 12:49:01 · 6592 阅读 · 0 评论 -
忘记Mysql密码
原文地址:http://www.cnblogs.com/andy_tigger/archive/2012/04/12/2443652.htmlMysql版本:5.1 1、 首先检查mysql服务是否启动,若已启动则先将其停止服务,可在开始菜单的运行,使用命令:net stop mysql 打开第一个cmd窗口,切转载 2015-05-10 10:32:08 · 286 阅读 · 0 评论