1
vote
0answers
14 views

Oracle 12c upgrade - from Oracle 11g [on hold]

One of my product database backend, we are using Oracle 11g. Now, we would like to give support Oracle 12c. But while installing our product Oracle 12C, I'm facing issue by executing command (Create ...
0
votes
0answers
11 views

Is there a way to set the data source in Report Manager for whole folder rather than each report?

I have few reports under different folders in Report Manager. Is there a way to set the data source for the whole folder rather than each report individually? There is also a folder where reports ...
-2
votes
1answer
30 views

Difference between exp and expdp [on hold]

I am a newcomer to database administration. Can someone briefly explain to me the difference between commands exp and expdp?
0
votes
0answers
9 views

Create Trigger to increase the latest duplicate number [on hold]

I'm using SQL DB I need to create a trigger that if find duplicate in a specific filed 'driver.encoding' the latest duplicate value should be updated by increasing the value of the record 7th digits. ...
3
votes
1answer
27 views

Wide clustered index vs multiple narrow nonclustered indexes?

Say I have a contrived Student table like so: CREATE TABLE Student ( Id IDENTITY INT, SchoolId INT NOT NULL, FirstName VARCHAR(20) NOT NULL, LastName VARCHAR(20) NOT NULL ) ...
0
votes
0answers
28 views

MySQL - Optimizing Multiple WHERE Conditions

I have to run the following 2 condition query against a table: SELECT * FROM serial_numbers WHERE type = 'book' AND serial NOT REGEXP 'ISBN(?:-13)?:?\x20*(?=.{17}$)97(?:8|9)([ ...
0
votes
1answer
47 views

How to copy tablespace from one database to another database in Oracle 11g

How to copy tablespace and datafiles from one database to another database in Oracle 11g in same server ?
0
votes
0answers
28 views

Switching from MySQL to MariaDB resulted in a high number of transactions

I switched from MySQL 5.5.44 to MariaDB 10.0 on a server and the number of transactions went through the roof without any increase in website traffic(the website traffic is the only thing that uses ...
0
votes
1answer
18 views

MariaDB: Querying a timestamp partition

I'm having difficulties getting my queries to make use of the partitions when I'm selecting. They need to be able to do > sometime > sometime and between sometime and anothertime. However, if I ...
0
votes
0answers
29 views

Error: File '' couldn't be removed (error 2: No such file or directory)

I get the following pgAdmin III error every time I restore a database, using pgAdmin III: Error: File '' couldn't be removed (error 2: No such file or directory) See the pgadmin log. My ...
-1
votes
3answers
24 views

Selecting multiple rows as one row with “AS” [on hold]

If I have a table of users, for example, and I want to include the users in a query like so: SELECT gameId, player1id, player2id, users.username as player1, users.username as player2 FROM players, ...
0
votes
1answer
17 views

Mongo DB Site to Site Migration

I am somewhat new to MongoDB but I do have some experience with MySQL and PostgreSQL. Currently, I need to migrate Mongo DB from one site to another. The sites should be identical (development and ...
0
votes
0answers
10 views

Modeling the living place of a Person [migrated]

I have a dwelling class which is a generalization of house and building. Those classes have their own properties, and the class floor is a composite of building. I would like to associate a person ...
0
votes
1answer
38 views

PostgreSQL failed on Select

I am trying to use a result from a select for another select: DECLARE _port int; BEGIN select alter_port into _port from database where ....; select data inot data_list from database where ...
0
votes
0answers
21 views

Postgres New trigger being blocked.

Running Postgresql 9.3 We have a trigger that was being blocked by select for update statements, so it couldn't be added. We took the DB down and kicked everyone off (changed network port). When we ...
-5
votes
0answers
43 views

Running Oracle left outer join using (+) syntax on H2 database? [on hold]

Running JUnit test cases with an H2 database. The query I am testing uses Oracle 81 left outer join (+) sign. I have created all the tables in H2 database, but cannot run the query in H2 since it does ...
4
votes
2answers
14 views

Improve performance for order by with columns from many tables

Using PostgreSQL 8.4, I'm trying to consult two tables with 1 million records using order by with indexed columns of the two tables, and I'm losing performance (with 1 column takes 30 ms and with two ...
0
votes
0answers
34 views

SQL SERVER 2014 windows administrator locked and sa password lost [duplicate]

I am missing the sa password for a SQL Server 2014 instance. Unfortunately the Windows Administrator user is also locked. How can I reset my sa password?
2
votes
1answer
29 views

SQL Server 2012 Mirror in a Disconnected state - how do I fix it?

We had a hardware failure last night and we got our servers up and running. After logging into SSMS I find all the mirrored databases in a disconnected state. I've done some searching with ...
1
vote
1answer
70 views

Speed up MariaDB?

I have a Wordpress Woocommerce store using WP All Import Pro to run automatic imports on a 15 minute cronjob schedule. It's usually trying to update 400 to 500 items from our supplier every 15 ...
-3
votes
1answer
47 views

How does Oracle handle types in this UNION query? [on hold]

SELECT 1 FROM DUAL UNION SELECT '2' FROM DUAL; what does this give? knowing dual is default table and is a single row table.
1
vote
1answer
68 views

Is adding the join columns to a table a good practice to improve performance?

Say we have 3 tables, A, B and C. Assume all table relationships I refer to below are 1 to many. Suppose A joins B in a1 = b1 and B joins C in b2 = c1. Is it a good practice to add b2 and a1 to ...
0
votes
2answers
17 views

How to preseve Execute permissions for MySQL procedure with alter procedure (Drop/Create)

In MySQL you can not alter procedure rather you have to perform drop/create procedure to alter the body of the procedure. The problem is doing drop/create also removes the execute permissions given on ...
0
votes
1answer
46 views

Identifying root cause of high cpu load

I need to research what caused a high load in our Oracle database some days ago. I wish to see a list of of high-load SQL statements. We don't use any Oracle tools like ADDM or AWR. I tried to ...
1
vote
0answers
14 views

How to trace an SSIS package using Extended Events?

I'm trying to figure out how to trace only SSIS packages accessing a database. I think one way (albeit probably not perfect) to find these queries using SQL are using sys.dm_exec_sessions and checking ...
1
vote
1answer
14 views

MySQL get previous record and compare

Need to make a Comparable between the records of this table and take the total times the value calledstationid 42 preceded the value 34 (this is a system log table and calledstationid is not an ...
1
vote
0answers
30 views

SQL server on VMWare restart loses five days of data

I am just now in the midst of a strange issue. A client moved their SQL database server from Hyper-V to VMWare on Saturday. Yesterday they called me complaining about performance. In the brief time ...
1
vote
1answer
16 views

MySQL - include a default value in LOAD XML INFILE statement

I have the follwing table: CREATE TABLE `tab1` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `DEFAULT` VARCHAR(25) DEFAULT NULL, `ITEM` varchar(25) DEFAULT NULL, `TIMESTAMP` TIMESTAMP ...
0
votes
1answer
26 views

Record scan speed, column orientated databases and SSDs

I'm learning about column orientated databases. I have just watched a YouTube video on column orientated databases by Arnaldo from MIT, who suggests an interesting motivation for column orientated ...
0
votes
1answer
13 views

How to use a value from insert in conditional insert in postgres

insert into addresses(street, city, user_id) select 'street1','LA', 2 where exists (select * from users where users.id = $$$$$ AND users.storeaddress='true')) I want to insert address for a ...
1
vote
0answers
8 views

MySQL/Percona Audit Log Plugin Not Working

I've been looking to implemement the Percona Audit Log plugin. So far I have installed it and configured it, and it seems to be working ok. Except, I have installed it on a slave Database as I don't ...
1
vote
0answers
69 views

Routing data from one SqlServer to another

Is there a way in SqlServer 2012 to have data being written to one table routed to another SqlServer on another host ? To clarify, we are using Hibernate Envars to write audit logs. Hibernate Envars ...
0
votes
1answer
30 views

selecting same column twice for different value

I have a table like this; event_id pair versus score 1 1 11 100 1 1 12 0 ... 1 11 1 0 1 12 1 50 Now I want to ...
2
votes
1answer
62 views

Scramble the data output of a stored procedure

I have a stored procedure that produces data for a call center system every morning. However, the data is sent in the same order daily. Is there a way to send the day in a different order every day ...
0
votes
0answers
17 views

Line terminators \r and \n

As i am working on this project i have couple of questions about line terminators and how to know which one to use when. 1) when i load data into two tables using just "\r", all desired data is ...
0
votes
0answers
24 views

How to install SQL Server Agent in existing SSMS [on hold]

I have been working on SSMS for Data mining, Now I would like to schedule a job. Where I am unable to find SQL Server Agent to schedule a job. Can any one help me how to get SQL server Agent into ...
0
votes
3answers
35 views

How to design a Table in which its fields varies on its categories?

I am trying to design a database to post free ads. Eg http://www.gumtree.com.au/p-post-ad.html Scenario: Every ad will have different categories and some categories will have further sub categories. ...
0
votes
1answer
31 views

Fastest way to do bulk import in MYSQL

I have got a question about the fastest way to copy a large number of records (around 10 million) from 1 table to another in MySQL. The target table has 1 primary key, 4 indexes and 3 foreign key ...
1
vote
2answers
52 views

Join with comma separated values in SQL Server

I have a table [CourseMaster] LIKE CourseId CourseName ----------------------- 01 ABC 02 DEF 03 GHI 04 JKL 05 MNO 06 PQR 07 ...
0
votes
1answer
8 views

Do I need to create tablepspace and also add all datafiles before import schema using datapump

Do I need to create tablespace and also add all data files before import schema using data pump or impdp add all data files itself first and then unload data into it..?
1
vote
1answer
24 views

Monitor disk usage with MongoDB Ops Manager

We use MongoDB Ops Manager 1.6.2.251. I searched Activity -> Alert Settings. Is there a way to monitor disk usage? To get an alert if this changes to 90%: # df -h /data/ Filesystem ...
0
votes
1answer
14 views

Select last record from my table [closed]

I am new to SQL and PHP. I'm having a problem with selecting the last record from my table. I run the following query: SELECT * FROM 2521118 ORDER BY id DESC LIMIT 1 My table name is 2521118 and ...
2
votes
2answers
26 views

Error 4108: Windowed functions can only appear in the SELECT or ORDER BY clauses

The error in the title is produced when add the second condition in my where clause. I understand the error, have tried using subqueries as seen in other posts to fix this but no luck. Does anyone ...
-3
votes
0answers
25 views

database is not getting restored second time with this query [closed]

USE master GO ALTER DATABASE Tfs_CoeTest SET SINGLE_USER WITH ROLLBACK IMMEDIATE; GO RESTORE DATABASE Tfs_CoeTest FROM DISK = 'D:\Backup123\Tfs_CoeTest' WITH MOVE 'Tfs_CoeTest' TO ...
2
votes
1answer
40 views

Oracle and execution plans

I have used the following procedure to view the last execution plan create or replace procedure display_plan as begin for c in (select plan_table_output t from table(dbms_xplan.display_cursor('', ...
-4
votes
0answers
26 views

when I am executing this sql query it is taking 3 min time so i want to reduce that [closed]

SELECT p.NAME AS Commodity ,COALESCE(allocation.alloted_qty, 0.000) AS Allocated ,COALESCE(inward.inward_quantity, 0.000) AS Issued ,sales.quantity AS Sold ...
0
votes
0answers
1 view

Waiting for table level lock on wordpress site

We are experiencing issues with mySQL loading 100% of the server's CPU. While checking the running processes we found many of the following: Waiting for table level lock | SELECT option_name, ...
2
votes
2answers
143 views

How to backup the current code of a stored procedure and its permissions as well?

I often get requests to alter stored procedures, in both test, development and production environments. I would like a simple way to save the current code of the stored procedure, before the changes, ...
2
votes
1answer
29 views

pg_dump - schema not found

I am trying to dump a schema from Postgresql 9.4, running on Cents 6.5, but am getting an error "pg_dump: No matching schemas were found" Here is the command I am running: pg_dump -U postgres -n ...
2
votes
2answers
35 views

Calculating the percentage change from the previous row

I just entered the world of window functions. I have a similar problem to solve as in this question. I have this table: The last column (%Grown) is given by: -(1 - price of row 2 / price of row ...

15 30 50 per page