0
votes
0answers
7 views

Is there a DDL/DML statement auto checking tool?

As a DBA, before applying DDL/DML statement written by developers to an online database I have to analyse and check potential limits or danger in these statements, such as: 1.whether a "create ...
0
votes
1answer
11 views

How to insert values into a junction table?

I add values into my two tables using the code below, but I also have a junction table called book_main_cover and I want to add data into this table to make a connection between book_id and ...
1
vote
2answers
28 views

Is there a more efficient way to set up this table

I'm looking to add a new feature in our production site that will show users 25 items they most recently viewed. I already record every view into various tables based on the item type, but querying ...
0
votes
1answer
8 views

Why Does the Update Statement also updates indexes?

I am currently learning about SQL queries and how indexes work with them, and I ran into a situation that I don't understand. Let's say I have this query for that updates a tables' values with another ...
0
votes
0answers
7 views

Minimizing database size (Many small tables)

Our database is interesting in that we have a large amount of tables that take up a correspondingly large amount of space, but when we do a MySQL dump of said database, it is surprisingly small. ...
0
votes
0answers
4 views

Issues with Upgrading PostgreSQL 8.4 to 9.0

I am trying to upgrade my PostgreSQL 8.4 (with PostGIS 1.5) to PostgreSQL 9.0 (with PostGIS 1.5) on Red Hat Linux 6.5, and have run into issues. I was going to try pg_dump method, but then I read ...
0
votes
0answers
3 views

Mongodb: Possible to enlarge a capped collection?

If a collection is created as capped, is it possible to increase the cap without losing data? Or to increase the cap without recreating the whole collection? Thanks
0
votes
1answer
10 views

Pagination, check number of selected records

I am working on pagination for a complex join query and unfortunately I am not sure what's the best way to go... Right now I am thinking about the following solution. Imagine that SELECT id... is the ...
2
votes
1answer
26 views

Moving data from MS Access to MS SQL Server

I'm trying to migrate data into SQL Server from an existing legacy set of MS Access databases. Currently everything is working except a few core tables that are wide and contain a number of ...
0
votes
0answers
15 views

Data warehousing: data transfer process too slow with larger batches

I have two primary instances of SQL Server, one for OLTP and one for reporting. The data warehouse for reporting is basically a Type 2 SCD: every table has DWDateStart and DWDateEnd columns and the ...
0
votes
0answers
3 views

export data to xml by the use of query to xml then importing it using xpath

i have use QUERY_TO_XML function in order to export data to xml , after that i want to export this data. this data might contain reserved chars in the xml tags like "' & ..." ex electrical ' ...
1
vote
1answer
16 views

Grant permissions on views, deny select on tables

I have a MySQL user and I want it to view ONLY the views I want and not any other table in the database. I've granted this user permissions only on certain views as following: GRANT SHOW VIEW ON ...
0
votes
0answers
13 views

Concurrent SELECT and UPDATE in multiprocessing python

I have to randomly match about 20 million rows in two tables without using the same row twice using PostgreSQL 9.3.5. Both tables have the following structure CREATE TABLE de_sim_points_end ( -- ...
0
votes
1answer
10 views

Mongodb: Does the stats command show me the capped size setting?

I am looking around my mongo instance. One of the collections was created as capped: db.createCollection("userObjects", { capped:true, size:400000000000 }) But when I look at the ...
1
vote
2answers
24 views

Should running number be separated column from primary key in database?

I have questions that blogged my mind on separating member number and member id. Suppose that we have a database with member id primary key of Guid type. Then, normally, when we view the profile (on ...
0
votes
1answer
15 views

How to restart the distributor agent of transactional replication?

After troubleshooting query time out error I would like to restart my distributor agent. So I go to my distributor server, in my distributor DB (called distribution_SA) I run the following query: ...
0
votes
0answers
6 views

Setting up MariaDB Spider HA

I try to setup High Availability using Spider Engine and MariaDB 10.0.14, but I a m not sure what configuration to use to make it work as expected. What I want is: Accessing a remote table using ...
0
votes
1answer
16 views

Postgres Table Ownership

I'm new to PostgreSQL and I'm trying to change the table owner for a bunch of tables. I was able to change the ownership by logging in a the postgres user and executing alter table owner to user1, but ...
0
votes
1answer
15 views

Best way to create materialized view in mysql

I am using mysql 5.6, I am not being able to create materialized view here like oracle. I got one or two solution like flexview and all... Can anybody tell me best way to create materialized view in ...
0
votes
1answer
24 views

How to compare an Oracle database with a Postgresql database?

We are currently migrating an Oracle database 10gR2 to a Postgresql database 9.3. Thanks to Hibernate, all tables can be recreated seamlessly. However, the Oracle database is huge. We are going to ...
0
votes
1answer
11 views

Converting Heap to MyISAM issue

At work we have a problem that has now occurred more then once. Problem is that query is in state of converting HEAP to MyISAM and it paralyzes our server( query in this state is not able to kill ...
0
votes
0answers
2 views

How do I setup description_list properly without having invalid username error

I'm running Toad 12.6.0.53 and I'm working on two databases which contain the same setup - but are not clones as the schemanames vary between the two databases. As in 99% of the time it is NOT ...
0
votes
0answers
13 views

What minimum RAM should the server have for a Django application with Postgresql server?

I have a Django application. The database is Postgresql with 8GB size. We are also using Nginx with gunicorn. Will a 4GB server be enough for good performance ( like on Digital Ocean) ? I was under ...
0
votes
1answer
12 views

Refresh materalized view incrementally in PostgreSQL

Is it possible to refresh a materialized view incrementally in PostgreSQL i.e. only for the data that is new or has changed? Consider this table & materialized view: CREATE TABLE graph ( ...
-3
votes
0answers
40 views

SELECT returning NULL always

I have small MySQL database with table called user_information. The columns in that table are: uid, firstname, lastname,age,gender and mail. I want to get all information about user with ID.So the ...
1
vote
1answer
28 views

What does the Postgres <-> operator do?

I was reading through the Postgres documentation on materialized views and in one example they use the following: SELECT word FROM words ORDER BY word <-> 'caterpiler' LIMIT 10; I tried to ...
1
vote
1answer
42 views

Deleting duplicate rows with condition [duplicate]

I have posted a similar question before, but this one is a little modified. I have a table with 4 columns as shown below. ITEMCHARGE CPT4 EFF_DATE CPT4MOD 326.8 29075 ...
0
votes
0answers
5 views

MongoDB Sharding : What should be the Sharding key if we want to find records with more than one field

I am having collection ("links") with listed fields: collection-name: "links" 1) url 2) title 3) score 4) description 5) ratings (embedded_many) and having index on "url", "title", "score" because ...
0
votes
0answers
16 views

Mysql error code 1452

I'm trying to create a database that will keep information about users. Here is the strucure; I have 3 tables 1. is the users which keeps uid and login info(username and password) 2. is the ...
0
votes
1answer
7 views

Mysql Master-Master Replication Error

Configured Master-Master Replication But both servers slave shows the below error !! Last_IO_Errno: 1236 Last_IO_Error: Got fatal error 1236 from master when reading data from binary log: ...
0
votes
1answer
26 views

How to update a huge MySQL table from a text file

I have a huge MySQL table with 1.3 TB data with InnoDB engine format. Now I have a text file containing updated values of 2.2 GB of records in the 1.3 TB of data. How do I proceed ? I am a newbie ...
0
votes
0answers
13 views

Powershell Restore Azure SQL Database to local with Restore-Database

I have written a powershell script that uses Start-AzureSqlDatabaseExport & Get-AzureStorageBlob to export my azure DB to a bacpac and download it locally, the next step is to restore the bacpac ...
0
votes
0answers
11 views

How to unify three separate tables having same data, same columns but tuples in different languages. Only one key(caption) is common to all

This needs to be done in order to complete the unification of many tables present in different databases with different languages. (Part of Dictionary Management, will have caption and messages where ...
0
votes
0answers
18 views

Unable to connect to sql developer

below is the error Status : Failure -Io exception: The Network Adapter could not establish the connection its connecting from my system but unable to connect from other systems on the ...
3
votes
2answers
215 views

use an Index correctly to optimize queries

I have an SQL database with millions of records and when I'm querying the data like select * from ActCosts where ScenarioID= 456 The tables has 1,323,718 rows and it gives me like 50,000+ rows ...
0
votes
0answers
10 views

JDBC4/SQL or Hibernate/ORM?

I have an upcoming thesis project that may be used by the school itself if the system proves to be good. It is a web application (Struts2) for an Online Teacher's Performance Evaluation System. The ...
0
votes
0answers
20 views

SQL Mirroring Down between Principal / Mirror

Configured MS-SQL Mirroring between two servers Principal and Mirror. Some times the connection goes down and start synchrozie automatically. Need to know which end either Principal or Mirror which ...
-1
votes
1answer
22 views

Is it possible to install SQL Server 2008 R2 on Windows Server 2012 R2?

Is it possible to install SQL Server 2008 R2 on Windows Server 2012 R2? I have the developer edition installation files.
5
votes
1answer
71 views

T-SQL brain teaser: find non-overlapping sets

I would like to ask for help coming up with a query, which can identify groups on non-overlapping records. Here is a sample scenario (admittedly contrived). Let's say I have employees who are ...
0
votes
1answer
22 views

optimizing a select query of 1.5 million entry

I have the following query: SELECT s0_.id, s0_.lowresimageurl FROM app_instagram_shop_picture s0_ FORCE INDEX ( idx_deleted_shopId ) LEFT JOIN app_instagram_shop s1_ ON s0_.shop_id = s1_.id AND ( ...
0
votes
1answer
12 views

Inserting a lot of big numbers into a mysql database

The tutorials online about inserting images and other binary data into a database have you put it in a character buffer and use mysql_real_escape_string() on it. The thing is, characters are 1 byte. ...
0
votes
0answers
7 views

How can I update the amount on parentid

I'm using MySQL database,This is the first time that i handle this kind of project the Multi-Level Marketing.I am having problem in updating the amount of parentid if he gets paired means he has left ...
0
votes
1answer
11 views

Mongodb: Does not seem to respect capped size limit

Running mongodb on win2012 Mongo db version v2.6.4 Our collection is created with this param: capped:true, size:500000000000 // 500 gb But the data dir, that only holds this one collection, has ...
-1
votes
1answer
31 views

How to manage two tables in SQL Server [on hold]

i have two tables offer1 and offer2 The two tables are Offer1 Offer2ID|OfferName|OfferExpiryDate Offer2 Offer2ID|OfferName|OfferExpiryDate now i have third table which keeps record ...
0
votes
1answer
19 views

tables relationships in database

Just a basic question here but it's been bothering me for a while. Do all tables have to be related to another? I'm trying to design a database so far I have 15 tables, 13 of them have relationships ...
1
vote
2answers
32 views

How to create a temporary table using VALUES in PostgreSQL

I am learning PostgreSQL and trying to figure out how to create a temporary table or a WITH declaration that can be used in place of regular table, for debugging purposes. I looked at the ...
0
votes
0answers
8 views

Best mysql database structure for this data

I need to create a MySQL database that can store the following data for many users: General settings (for each user) 10 url's. 10 words of 20 letters for. ...and more fields like these. Sentences ...
-6
votes
0answers
33 views

How to fix error Msg 1801, Level 16, State 3, Line 3 [on hold]

I want execute a script file in SQL Server 2012 but when I do adding script file and I do execute, I get error: Msg 1801, Level 16, State 3, Line 3 Please help me Thanks
1
vote
2answers
43 views

Deleting duplicate rows with condition(Using SQL and LINQ)

I have a table with 5 columnsID,CPT4,CPT4Mod,ItemCharge,Eff_Date. Deletion Condition: When rows exists with duplicate CPT4and CPT4Mod field values but different ItemCharge and Eff_Date values, ...
0
votes
1answer
53 views

Corrupt DB for a noob

Please help me! I am not a DB admin, and I have been thrust into the role after taking a new job. I need as much step by step as you can give me... I've already done the dbcc ...

15 30 50 per page