1
vote
2answers
45 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
7 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
0answers
18 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 [on hold]

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
25 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 [on hold]

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
35 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
24 views

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

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
138 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
34 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 ...
1
vote
1answer
55 views

Determining the specific command type in a DDL trigger

Given strings corresponding to DDL commands, how can I determine which DDL command (column addition, constraint addition etc.) it precisely is? I have a DDL trigger on a database that will be fired ...
2
votes
1answer
44 views

Deleting large amounts of cascading records with minimal locking

I'm looking for a strategy to purge large amounts of logically deleted data from a MySQL database. The deleted records are in a relatively small table, but are referred to with many ON DELETE CASACDE ...
1
vote
1answer
20 views

What's the procedure to set up username/password on mongodb?

I have tried setting up username / password .But none of the methods seems to work. 1. In mongod.conf ----> remove **#auth=true** to **auth =true** 2.Started the mongod server --> sudo ...
0
votes
1answer
29 views

SQL Server 2012 - Can't detach database on mirror server

I'm running SQL Server 2012 in a mirror configuration and I need to move the mirror's transaction files. I deleted the mirror setup on the primary but I can't detach the databases on the mirror, the ...
1
vote
0answers
7 views

Oracle Application Server Integration With APEX

This might not be directly related to DBA, if so kindly advise. I need to integrated some reports created via Oracle Reports Builder with APEX. Reports are in RDF format. Which version of Oracle ...
1
vote
0answers
7 views

Is it possible to cascade delete a column value? [duplicate]

So say I delete catID from table A and table B has the same foreign key value? It's hard to explain so I'll try and show you with the two images below: items table Is it possible to delete the ...
1
vote
1answer
14 views

How to change MSSQL Management Studio theme?

Different from: How to apply a theme to SQL Server Management Studio 2008? What I want is to change the theme not colour scheme of the editor. I want it to look as close as possible as Dark in 2015. ...
0
votes
1answer
37 views

How to recover deleted records by mistake in Mysql

I am using Mysql.And by mistake I deleted very important info.Is there a way to recover or even to see the deleted info over a month ago?
0
votes
1answer
48 views

How to improve this query so it'll run quicker

I've got this query: SELECT m.vlanID, v.vlan_name, m.interfaceName, count(m.macAddress) as mac, n.nd_name, p.interfaceDescription, p.interfacePortType FROM macs m, network_devices n, ...
1
vote
0answers
22 views

Slow inserts in oracle 12c inmemory table

We are running some tests to check the in-memory performance on a 12c (12.1.0.2.4 EE) RAC. Servers have 56GB memory and 20core CPUs. Our plan is to have a few read-performance critical tables in ...
0
votes
0answers
11 views

What are the built-in default configuration values of redis.conf?

If I omit a configuration option in redis.conf, what value will be used upon running redis? The self-documented redis.conf states that just rarely. I have found (but didn't try yet) this command: ...
4
votes
1answer
46 views

Zero Rows return on quering DMV sys.dm_os_performance_counters

I have a user on SQL Server 2014 Standard Edition (RTM) with SYSADMIN role with Server View State Permissions but when I execute DMV sys.dm_os_performance_counters it return no record. Any idea what ...
4
votes
1answer
110 views

SQL Server data folder access rights

I did a fresh SQL Server 2014 install. Next, I wanted to attach some databases from a previous SQL Server 2012 server. I copied all mdf and ldf files to the data directory, but when I tried to attach ...
1
vote
0answers
12 views

fast execution analitycs database with thousand rows to displaying in php [migrated]

i've table with a thousand rows and i want to creating analitycs with chart display my front end php my table structure is and how i display this data : by user_agent column i display operating ...
2
votes
0answers
15 views

How to ignore spatial index?

When i do Schema Compare in Visual Studio i see that spatial index in table was changed and this changes will included in generated script. But i do not want see this changes in my script. It's ...
-2
votes
0answers
67 views

How to find or create database(s) for use in webapp design?

I'm looking to find out where I'd be able to populate a local database of the parts available through all the vendors in the industry. Preferably something that's updated & maintained by others ...
0
votes
1answer
10 views

Query on Container-Pluggable database

My Container database (CDBROOT) is showing as read-write mode and while my pluggable database is showing as mount-state. Does that mean the application is using the container database and not the ...
-1
votes
1answer
27 views

Unable to restore the database with the query [on hold]

USE master GO ALTER DATABASE Tfs_CoE SET SINGLE_USER WITH ROLLBACK IMMEDIATE; GO RESTORE DATABASE Tfs_CoE FROM DISK = 'D:\Backupfolder\Tfs_CoE.bak' WITH MOVE 'Tfs_CoE' TO ...
1
vote
5answers
28 views

Anyway to identify mysql slaves have read upto which binary logs

I have multiple slaves reading from one master.. But few of them are keep disconnecting due to network issue. Is there any way that i can make sure before setting up the bin log purging script on ...
1
vote
2answers
34 views

Disaster recovery solution for MySQL

I have set a Master-master replication with the second Master running as read-only. This master-master setup is on the same location. Now I will have to setup an DR for this production at a different ...
0
votes
2answers
37 views

Setting up MySQL master-slave replication

I am trying to setup master-slave replication on MySQL 5.6. When I update my database in the master, the change is not reflected on the slave. When I show the process list on the slave it shows this ...
0
votes
1answer
21 views

How to return multiple columns (each a composite type) in plpythonu

I have created a plpythonu function that should return a table with multiple columns. At present, it returns a single column with multiple components. I came across this answer which is A) a little ...
1
vote
1answer
67 views

Matching data in two tables

I'm teaching myself SQL and I ran into a question that may be related to joining tables. I'm just a bit unsure. Say, you have two tables, one listing the customer's creditcard_number, and one listing ...
0
votes
1answer
15 views

Looks like a postgres backup/dump structure (A sort of a forensic/data archeology question)

I was given a compressed folder that contains number of subdirectories, and, among others, directories named .pgdir with number of numerically sequenced files in a <9999>.dat.gz format and one in a ...
0
votes
0answers
33 views

Method to economically insert Bill of Materials BOM items into a Stock Table?

I’m new to the wonderful world of database design and I’m currently experimenting with an implementation for my little brother relating to Model Train Sets. [I will be using SQL Server 2012 / Asp.Net ...
1
vote
1answer
34 views

Trigger function using current row and current table name as variables (final part)

Like detailed in my first question I have a Postgres 9.1 database with multiple tables that have the exact same column names, they only vary in their column values: tbl_log_a tbl_log_b tbl_log_c ... ...
0
votes
0answers
24 views

How to view the data from a .mysql file?

I have a .mysql database file. I need to open it and view the data. I've MySQL Server & MySQL Workbench installed into my Ubuntu 14.04. Now how do I open the .mysql file and view the data inside ...
1
vote
2answers
61 views

Select highest id of each type in mysql

I am creating a database that keeps track of backups on our various servers. The query that I am using actually seems to work for the most part. The only issue is that it isn't getting the highest ...
0
votes
1answer
23 views

Slow query - just error count

I deal with slow queries in whole project. I indexed heavily but the results are nowhere. I had a lot of logs (thousands per minute) from SCADA systems and I am trying to count them for each SCADA ...
0
votes
1answer
36 views

Error converting data type nvarchar to float. Oracle Linked Server

Upon executing the following query select value, cast(value as float) float_value from OPENQUERY([ORACLESERVER], 'select 3/5 as value from table') I am getting the following error: Msg 8114, ...
0
votes
0answers
11 views

Microsoft SQL Data Services OR SAP Master Data Governance / SAP NetWeaver

I want to know in which cases should I use Microsoft SQL Data Services OR SAP Master Data Governance / SAP NetWeaver, and what advantages bring each one comparing with the others.
1
vote
2answers
68 views

Slow SQL query with LEFT JOIN

What my query is doing: I have two SQL tables and I want to copy datarows from the one table to the other table. I am doing this for statistics. The source table includes all current ...
0
votes
1answer
13 views

Fulltext Search Doesn't Match a Hashtag

We maintain a table that looks like this to perform search queries on our forums database. I'll draw your attention to the FULLTEXT columns: CREATE TABLE `forums_posts_search` ( `post_id` ...
1
vote
1answer
39 views

Query to remove duplicate calculated values

I have a client running SQL Server 2008 R2 SP1, and I can't seem to write a query that has distinct calculated values. I could change the schema to store the value being calculated, but I was curious ...
4
votes
1answer
32 views

Calculating daily growth using previous row value in new column - SQL Server

I have the following query below that shows size of a database and when this data was collected. I am trying to create a new column that has "average daily growth" which would be determined by the ...
4
votes
1answer
116 views

Finding distinct rows across two tables: Full Outer Join more efficient than Union?

When finding distinct rows across two tables where we can't necessarily ensure are pre-sorted, is it a good idea to use a FULL OUTER JOIN rather than a UNION? Are there any downsides to this ...
0
votes
0answers
19 views

How to update multiple tables in MS Access from multiple excel files? [migrated]

Every month I have to UPDATE my MS Access db from approximately 30 excel files. They have all the same structure and format. I try to modify this code several times to update each tables in my db in ...
7
votes
2answers
63 views

NoSQL : What is unstructured data?

we are currently running at the edge of resources with our mssql server based solution. We have now many traditional options regarding the next move to tackle the load: buy faster CPUs and IO ...

15 30 50 per page