0
votes
1answer
7 views

What's the difference between xp_fixeddrives and this query

when i run xp_fixeddrives command to the drive that contains my tempdb, I obtain 10mb of free space, but the following query return other thing (45000 mb free). other query : USE tempdb; GO SELECT ...
1
vote
0answers
7 views

In SQL Server would misc pages be pushed out when an object grows within a mixed extent?

In SQL Server 2008-2012, objects (including tables) are first put in a mixed extent. An extent can accommodate up to 8 pages and accommodates more than one type of page (meaning: pages from more than ...
1
vote
1answer
16 views

Wrong data type while using linked tables in MS Access

I have a SQL server database which needs to be linked to MS Access forms. I have a table with one column as both Identity and is a also a primary key and is big int But after linking the table , if ...
0
votes
0answers
13 views

Best way to run a formula (segment) a large number of users with custom attributes

Here is my question. I have a table that stores a large number of people (80 mil). Each person has a GUID id. Then I have another table (or set of tables) that stores information about people. e.g. ...
0
votes
0answers
28 views

Improve Query Performance

I have the following sqlite3-Tables: db.execute("""CREATE TABLE IF NOT EXISTS STATIONS (StationUID INTEGER PRIMARY KEY AUTOINCREMENT, StationNumber TEXT NOT NULL, ...
0
votes
0answers
13 views

MySQL: Capture every 5 values from column a in Table A to create one row in Table B

I have submissions of a form from a web page records in a database. the table has the following schema submit_time form_name field_name field_value field_order file the form has 5 fields, ...
1
vote
0answers
7 views

Cassandra- Data modelling for UserProfilie

I've a user model, having attributes as follow:- class User(Model): user_id = columns.Integer(primary_key=True) username = columns.Text() email = columns.Text() fname = columns.Text() ...
-2
votes
0answers
7 views

How to Generate Replication Reports from SQL Server

I have number of databases being replicated over night. I need to know if there is a way to generate report or Query their Start Time and End Time for each one. Secondly, is there a way to get / Query ...
0
votes
0answers
12 views

SQL Server - How to set multiple variables from excel spreadsheet?

I have a spreadsheet of 4 columns as shown. What I want to achieve is this: update apodetail set status = 'O', cur_amount = 'VAR1', rev_price = 'VAR1' where order_id = 'VAR2' AND line_no = 'VAR3' ...
2
votes
0answers
9 views

Security implications of running SSRS and an OLTP database on the same server

I am in the process of building a new environment for my company's Customer Relationship Management (CRM) system. This system is a commercially available product which uses SQL Server as its back end ...
0
votes
0answers
3 views

MS Access 2007 DB, maintenance, compact and repair many DB's at once

I have a simple inventory DB I work with, only about 8,500 records. I have been using it a few years and recently realized I had not compacted and repaired in a long time, the DB was 35 MB and after ...
0
votes
0answers
10 views

Avoid slow query from slowing down the site [on hold]

I have a slow select query which I optimized and still takes 3 minutes. It does not lock any tables it uses. But at the same time the tables are been used by other queries which slows down the ...
0
votes
0answers
15 views

Passing Table Values into a TVF

I have a TVF that takes a userID parameter. I have another table that contains a list of these userIDs. I want to pass all these userID values into the TVF. I have tried this code... FROM ...
1
vote
1answer
7 views

Should I use VACUUM on a SQLite db with a log-structured filesystem?

I'm runnig a SQLite database on nilfs (which is a log-structured filesystem). Every now and then I delete old records, so that the size of the database never surpass a certain amount. But since the ...
-2
votes
0answers
16 views

sp send dbmail mail queued but not sent sent_status failed [on hold]

I'm trying to send mail by creating my own account using system defined stored procedures. My account has been created. I've made profile account, used sysmail_add_principalprofile_sp to assign role, ...
0
votes
0answers
16 views

Oracle database as a single synchronization point for two separate web applications

I am considering using an Oracle database to synchronize concurrent operations from two or more web applications on separate servers. The database is the single infrastructure element in common for ...
0
votes
0answers
4 views

Restoring a DB on an RDS instance from a local file

On one of my AWS instances, I have a .sql file that's a dump from an RDS DB. I would like to use that file to restore the DB on the RDS instance. I tried looking for info on AWS but could not locate ...
2
votes
1answer
10 views

Geo localized database RTREE

I'm using MYSQL V5.6.24 GPL I have a database with 200K rows and growing and I'm trying to get the nearest, based on points. I have all the database in InooDB, and to use Spatial data, I create one ...
0
votes
0answers
12 views

How to do updates on all rows at every button click [migrated]

I have a python app that has an admin dashboard. There I have a button called "Update DB". (The app uses MySQL and SQLAlchemy) Once it's clicked it makes an API call and gets a list of data and ...
0
votes
1answer
20 views

Sumed all which has been summed [duplicate]

Is it possible to sum all row which has been summed? For instance I have this query: SELECT SUM(registered) AS `totalOftheDay` FROM table WHERE DATE(ds.register_time) BETWEEN '2015-03-01 ...
2
votes
2answers
165 views

MySQL - How to check whether all values of a given SELECTed row are equals?

Using MySQL, how can i SELECT all rows whose values are equals ? For instance, suppose a SELECT of a given table as follows COLUMN_A COLUMN_B COLUMN_C ... COLUMN_N 1 2 4 ...
-2
votes
1answer
19 views

Design database for tournaments

I'm looking around since few days on how should I build my database to support full flexible tournaments. Let me explain my specs. As a user I want to : Create a tournament Let other users register ...
2
votes
1answer
28 views

Help understanding discrepency between sys.dm_exec_cached_plans and dm_os_memory_clerks

We've got a strange discrepancy on one of our SQL Server 2014 instances between the amount of memory being used for cached plans as per sys.dm_exec_cached_plans and the amount of memory used as per ...
0
votes
1answer
17 views

how can I see the arguments passed to a stored proc on Azure?

The query that I'm using: SELECT deqs.execution_count, deqs.last_execution_time, dest.objectid, SUBSTRING(dest.[text], (deqs.statement_start_offset/2)+1, ...
0
votes
1answer
14 views

Student Attendance, null not returning

My question is based on the answer given here Attendance: id | student_id | date | ------------------------------ 1 | 2 | 2013-10-24 | Students: student_id | student_name | ...
0
votes
0answers
5 views

Will SSRS User rights be over-ridden by Windows account?

If a Reporting Services user group has all rights on SRS Report Server folder, and one of the group member's Windows Account has been added to the folder with Browse only, will SQL server cause that ...
0
votes
0answers
24 views

Oracle: built in SQL pretty-print?

Oracle has some packages that will dump objects in SQL format, such as dbms_metadata.set_transform_param. One option that can be set is to "pretty print" the SQL. Is there anything in Oracle that ...
0
votes
1answer
12 views

sub and sub-sub item organization system [duplicate]

So I am looking to find the best database design for the following situation. I will refer to my entities as 'articles' as that would best/most-easily describe them. So the articles have already ...
0
votes
2answers
74 views

Storing IP addresses - varchar(45) vs varbinary(16)

I am going to create a table with two fields - ID as BIGINT and IPAddress as either varchar(45) or varbinary(16). The idea is to store all unique IP addresses and use a reference ID instead the actual ...
2
votes
2answers
57 views

How to interpret correlated subqueries?

EDIT: Both answers are great but I think I must clarify my question. NOTE: I must indicate that in the following, by executed, I mean logically. I understand that the actual execution made by the ...
0
votes
1answer
22 views

How to grant insert in a table that is in another database on SQL Server 2008 R2?

On SQLServer 2008 R2 I have 2 schemas: DatabaseA and DatabaseB. On DatabaseB I have a table named TableB. Whenever tableB is updated, a trigger will insert a value in the tableA (that is on ...
1
vote
0answers
23 views

postgresql bdr - adding another downstream server only partially works

I have the following postgresql 9.4 bdr setup: upstream server with db called "bdrdemo" running on 10.1.1.1 downstream server(1) with db called bdrdemo running on 10.2.2.2 (replicates with ...
-2
votes
0answers
29 views

Whats is the maximum size a relational database can handle before considering switching to a NoSQL database [on hold]

Whats is the maximum size a relational database can handle before considering switching to a NoSQL database? How much oracle with partition can store? What should I consider in my analysis?
0
votes
1answer
11 views

Gotchas converting latin1_swedish_ci to utf8mb4_unicode_ci

I have a MySQL 5.5.31 database which has approx 220 tables - of these 220 tables, around half of them are already using utf8mb4_unicode_ci but the "older" tables are still using latin1_swedish_ci. The ...
0
votes
0answers
15 views

Exporting MySql database using jdbc code

I've created a GUI application in java. Where I've created a database name StudentDb and table student_db. I want to export this database in such a file format using java code that when I'll take this ...
0
votes
1answer
23 views

XACT_ABORT ON not working as expected on SQL Server 2012?

It looks like XACT_ABORT ON is not working as expected. Here are a table and a procedure that inserts into it: CREATE TABLE rain ( rain_time DATETIME , location VARCHAR(100) ); GO ...
1
vote
0answers
42 views

SQL Server inserted/deleted tables

I have the following logic flow Start transaction insert record 1 into table1 insert record 2 into table1 insert record 3 into table1 commit transaction I have a trigger on table1 that is using ...
-4
votes
0answers
15 views

stored procedure not working

i am running this one on mysql phpmyadmin. DROP PROCEDURE `gettree`// CREATE DEFINER=`root`@`localhost` PROCEDURE `gettree`(in team_id bigint) BEGIN declare count bigint; declare tmp_team_id ...
2
votes
2answers
26 views

Random Sampling with replacement in PostgreSQL

I am looking for possible ways of random sampling in PostgreSQL. I found a couple of methods to do that with different advantages and disadvantages. The naive way to do that is: select * from ...
-1
votes
0answers
15 views

Warm Standby Using Point-In-Time Recovery (PITR) - Was it sucessful?

I've set up a warm standby for a postgres 8.3 production server. I've followed the procedure here: http://www.postgresql.org/docs/8.3/static/warm-standby.html Installed the standby with the same ...
0
votes
1answer
11 views

SQL Server Full txt Search - Thesaurus Entries

I'm thinking of adding a full text search to our product (currently using SQL 2005 Enterprise), so just doing some preliminary research. I read that you can add thesaurus entries, so "Internet ...
1
vote
1answer
32 views

updating same column as in the select query

When I try to do this, I get an error saying I cannot use the same table in where select as the column that I am updating. UPDATE table_name SET quantity = 19 WHERE productID = 148357 ...
1
vote
1answer
39 views

Can't connect to new instance of SQL Server

I was trying to upgrade to SQL Server 2014 from SQL Server 2012, but I kept getting a failure on one of the pre-installation checks saying that I needed to have SP1 or later installed for SQL Server ...
0
votes
1answer
42 views

Subtract next row's datetime with current row's datetime based on condition

It might sound complex - I think it is. I have an output like this: | EmployeeID| DateAndTime | Type | AbsenceID | DateEntered | LastModifiedDate | minutes | DN | | ...
-2
votes
0answers
27 views

How to check state of oracle databse [on hold]

I have error during starting database - corrupted file. I want to chcek state of database if its mount or nomount. V$database open_mode is not avaiable because db is not open. My db is 11.2.
2
votes
0answers
39 views

How is the B-Tree created for a composite PK?

This is a theoretical question in regards to how SQL Server stores the data for a table that has a clustered index over two columns (both columns form a PK). Consider a table with columns PersonID, ...
0
votes
1answer
35 views

Oracle 11.2 restore DB to a specific point

I should execute following tasks: 1. test system and during test change Oracle data and Create New/Remove Old datafiles and tablespace. 2. at the end of test rollback to behviour before of point 1. ...
-1
votes
0answers
30 views

Why connection in sqldeveloper to machine in the same network fails? [on hold]

I have windows machine with Oracle DB XE 11.2. When I start sqldeveloper on the other windows machine, use the same credentials and put as hostname ip of machine with DB, sqldeveloper cannot ...
0
votes
0answers
32 views

Slow running Oracle query caused by unnecessary full table scan

I'm by no means an expert with Oracle, but I know enough in terms of how to analyze explain plans and perform basic optimizations. However, this time, Oracle has stumped me with it's explain plan. ...
0
votes
0answers
32 views

Kerberos and Linked Server

I have been reading through past posts but I am still getting issues with 2 SQL servers connecting using a linked server when querying from a 3rd SQL server. I constantly get the error "Login failed ...

15 30 50 per page