database-administration

grant to multiple db using one command

微笑、不失礼 提交于 2019-12-24 13:28:37
问题 I have many mariaDB databases that has same prefix. Such as apple1 apple2 apple3 .... apple5000 apple5001 banana1 banana2 ... banana100 And I want create new user USER who can SELECT databases has apple prefix. So I grant SELECT to new user USER using multiple command below to. GRANT SELECT ON `apple1` TO 'USER'@'%'; GRANT SELECT ON `apple2` TO 'USER'@'%'; GRANT SELECT ON `apple3` TO 'USER'@'%'; ... GRANT SELECT ON `apple5001` TO 'USER'@'%'; Is there any solution grant to multiple databases

Oracle updates/inserts stuck, DB CPU at 100%, concurrency high, SQL*Net wait message from client

旧城冷巷雨未停 提交于 2019-12-24 02:09:34
问题 We have a JavaEE app running on Weblogic against Oracle 11g DB, using thin JDBC driver. Recently we had a series of incidents in production where updates and inserts into a certain table got stuck or took much longer than normal, with no apparent reason. This caused the application to use more and more DB connections (normally idle in the connection pool), the DB CPU and concurrency shot up (as seen in OEM) and the whole DB ground to a halt. During these incidents the DBAs could not find any

sufficient page size does not exist - DB2 insert

坚强是说给别人听的谎言 提交于 2019-12-23 09:31:32
问题 I am having a DB2 query(simple insert statement) which is trying to insert some 27 columns. Out of those columns 1 is Clob and the issue is there. For my Clob column, sometimes the value might even contain 28K characters. And in such extreme cases, I am getting the below error, A system temporary table space with sufficient page size does not exist .. SQLCODE=-1585, SQLSTATE=54048, DRIVER=3.64.82 As I googled and gone through some pages, there is an entity called System Temporary Table Space

Error Code 13 in Mysql on UNIX. Can anyone Help me?

我们两清 提交于 2019-12-23 07:02:59
问题 I'm Using MySQL Server on UNIX System, when i'm execute the below query SELECT * INTO '/home/krunal/backupData/myBackup1.txt' FROM tbl_Property; it shows the error ERROR 1 (HY000): Can't Create /Write to file >'/home/krunal/backupData/myBackup1.txt' (Errorcode : 13) Can anyone tell me that how can i solve this error **Note** : I have all the permission on dir backupData , Read , Write , Execute 回答1: You messed up with /home/krunal/backupData/ permissions. To fix: chown root:root /home/krunal

Delete tables from database Oracle 10g

孤人 提交于 2019-12-22 09:40:03
问题 I have deleted some tables from an Oracle 10g database using the drop command. When I list the tables using select * from cat; I get the following : Are the tables deleted or not? Why do I have these BIN$... things? How can I remove them or the tables once and for all? Thanks! 回答1: They are entries in the Recycle Bin, created by the deletion of a table. They can be purged if required. http://docs.oracle.com/cd/B28359_01/server.111/b28310/tables011.htm 回答2: The tables prefixed with BIN$ are

Oracle SQL Developer copy database step by step

一笑奈何 提交于 2019-12-22 06:50:58
问题 I'm having big trouble in copying an Oracle DB to the same server but with another name, to use as a development DB. I'm used to SQL Server, I'm new to Oracle (11g). I wanted to use the 'Database copy' from SQL Developer, but I'm getting errors all the way. First it was about missing tablespaces. Then when I manually created them in my new empty DB the errors were about missing users. I wanted to create the users manually, but then I first needed to create missing roles. When all that was

Oracle - Zombie Table

蹲街弑〆低调 提交于 2019-12-22 06:45:40
问题 I'm having this odd problem since yesterday. I've tried several options and I actually reinstalled ORACLE and the DB itself. Here's the problem: I have this table that is somekind of zombie. Here are the symptoms: SELECT TABLE_NAME FROM USER_TABLES WHERE TABLE_NAME='MYTABLE' Returns a record, meaning that the table exists. SELECT COLUMN_NAME FROM USER_TAB_COLUMNS WHERE TABLE_NAME = 'MYTABLE' Returns all the columns of MYTABLE. So far so good, the table exists. SELECT * FROM MYTABLE Returns

SQL Server - Execute Stored Procedure Only Role

岁酱吖の 提交于 2019-12-21 20:48:46
问题 How do I create a custom SQL Server database server role that can only run SELECT queries and stored procedures? Meaning, users of this role won't be allowed to do custom queries, but can run stored procedures that has CRUD and SysAdmin statements -- UPDATES, DELETES, ALTERS, DROPS. I tried creating this custom role, but failed when I ran an SP that alters a table. CREATE ROLE SupportStaff GRANT SELECT TO SupportStaff GRANT EXECUTE TO SupportStaff Any ideas? Update Okay, so I found that the

How can I list all tables in a database with Squirrel SQL?

☆樱花仙子☆ 提交于 2019-12-20 17:34:26
问题 I use Squirrel SQL to connect to a JavaDB/Derby database on my desktop. I can run SQL queries. But how can I list all tables in the database? And preferably all column and column types. 回答1: You can do it easily from the GUI. After you open your session, click the Objects tab, then expand the tree. Expand the db, schema, and then table nodes, and you'll see all of your tables. If you click on a particular table node, a table will open to the right. By clicking the Columns tab, you can get the

Are there any good PostgreSQL clients for linux? [closed]

笑着哭i 提交于 2019-12-20 09:29:09
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 years ago . I am frustrated of not having a good Linux GUI administration and development tool for PostgreSQL. pgAdmin III is buggy and unusable piece of... hmm, software, compared to Windows-only PostgreSQL Maestro and EMS PostgreSQL manager. phpPgaAmin does not looks promising. EMS PostgreSQL manager can work under Wine,