All Questions

1
vote
1answer
8 views

Checkpoints and Logging

I'm working on getting full grasp of logging architecture. Please correct me if I'm wrong here: I understand that a checkpoint occurs (also lazywriter) to write the dirty pages in the memory to the ...
-3
votes
0answers
13 views

help with views

I have to create a view in SqlServer 2012 I have 4 tables connected to each other via ID and parent Id I need to fire a query like if the record of a table is not present in another table it shows a ...
0
votes
0answers
9 views

Backup table having large size than original table

I am cleaning up my database by deleting unwanted tables such as temp tables, backup tables. While doing clean up I came to know that, I have some backup table and original table. The size of backup ...
0
votes
0answers
2 views

Sqlserver: Get Meta-Info about TRN file

Is there any way to get the timespan of the data contained in a TRN-File? What I have: A backup of a transaction-log What I need: The timestamp of the first and the last entry inside the log ...
0
votes
0answers
8 views

How to update Large table in MYSQL

I want to update a large number of rows (more than 80k) from an external data source (from file) into an existing mysql table. This database is InnoDB. Database structure: CREATE TABLE IF NOT EXISTS ...
0
votes
1answer
11 views

create user from MYSQL database

when I use the root to create a new user, like this and I have no more operation on it, then I use this user log in I try to do some operations like this: the test is a database which I created ...
0
votes
2answers
28 views

What is my database name?

I'm trying to connect to a microsoft SQL database but I dont know its name. I suspect it will be something of the form servername\databasename It would be good if I could just use SELECT ...
0
votes
0answers
8 views

ORA-01830 Error for 11.2.0 client but not for 10.2 client

I have this piece of code: BEGIN DBMS_SCHEDULER.DROP_JOB ( job_name => 'LOANSBUILD.LOANSNEWYORKCLOSE'); END; / BEGIN DBMS_SCHEDULER.CREATE_JOB ( job_name => ...
1
vote
0answers
16 views

Clustered Column store table Delete error

I am getting the below error when we tried to delete records on clustered column store table using OPENDATASOURCE. DELETE TOP (1) OPENDATASOURCE('SQLNCLI','Data Source=Server Name;Integrated ...
1
vote
2answers
22 views

How long to learn PostgreSQL?

I want to learn PostgreSQL and How to make the learning process efficient, but really don't know how long it would take even after googling my question. I used MySQL before and knew relational ...
0
votes
2answers
30 views

SQL Query: Selecting a person who is a member of all existing groups

I'm tinkering around with my very first SQL queries and am completely baffled by a problem I encountered. Let's say I have the following database: PERSON(PID, Name) MEMBER(PID, GroupID) How would ...
0
votes
1answer
24 views

TSQL vs SSIS Lookup

I was trying to find some well performing Tsql equivalents for the SSIS Lookup component. Especially for Fact table loading. After few different query patterns the most obv performed the best: ...
0
votes
1answer
18 views

Import CSV file - dynamic path

I am trying to import a csv file dynamically. This works: BULK INSERT #CSV FROM 'C:\Users\MyName\Desktop\Players.csv' WITH ( FIELDTERMINATOR = ',', ROWTERMINATOR = '\n' ) I would like to ...
0
votes
0answers
38 views

How to recursively find gaps where 90 days passed, between rows

This is a kind of trivial task in my C# homeworld, but I don't yet make it in SQL and would prefer to solve it set-based (without cursors). A resultset should come from a query like this. SELECT ...
0
votes
0answers
10 views

Unexpected slow queries at random times

I have a moderate service, serving at most 100~ users at the same time. Mariadb slow log is open, and I occasionally see reports of slow running queries such as: # Time: 141123 19:48:38 # User@Host: ...
0
votes
1answer
15 views

XMLDB - Nodes to Rows

I have an application that stores XML as XMLType in a table. This is the first time I'm using XMLDB and XMLType features, and was wondering if I could use the results from an XQuery FLWOR expression ...
0
votes
0answers
16 views

Fast select = slow update, slow select = fast update

A query is super-fast when executed as a SELECT (#1), but when I try to UPDATE using the retrieved data, the performance starts to be unpredictable for me. For example, an UPDATE is faster with much ...
0
votes
1answer
14 views

MySQL rapid Data Replication from multiple Databases

I am a Freelance Web Developer but not a Database Administrator at all except basic Database Operations like DML etc. Today I got a client asking me to develop a Web based application but there is a ...
-1
votes
0answers
11 views

Transferring full database to another machine oracle 10.2 xe

We are having oracle 10.2 xe working on windows xp sp3(32bit). We need cloning/copying full database to windows server2008r2 machine(64bit). Any help.
1
vote
2answers
22 views

Granting permission on a particular job to execute on SQL Server 2005

An user is requesting permission on a particular job. How can I give him access on job activity monitor which shows only that requested job?
1
vote
1answer
16 views

MongoDB Insert Performance

I have some data which are aggregated in chunks and later pushed into another collection. The problem is that aggregated data pushing to another collection is very slow and takes from few hours and i ...
0
votes
1answer
29 views

Unknown column in 'where clause'

I've a query in my php script $result = mysql_query("SELECT State_Id FROM state_master WHERE State_Name='$statename'") or die(mysql_error()); $row=mysql_fetch_assoc($result); return $row['State_Id']; ...
0
votes
0answers
18 views

Continuously copying an SQLite table

I have a SQLite database associated with an online application (Skype) on my computer, which is often changed by that application when I am using Internet. These are the columns of the database: ...
0
votes
1answer
26 views

Is a query inside mysql IF clause allowed?

DELIMITER $$ CREATE PROCEDURE `InsertUser`(IN passwd VARCHAR(100), IN userType VARCHAR(20), IN mobileNo VARCHAR(20), IN refId BIGINT(20), IN companyName VARCHAR(100), IN companyMail VARCHAR(200), IN ...
5
votes
7answers
1k views

Professor told us to store Serialized java objects as blobs instead of defining relational tables

The title pretty much says it all, but my professor told us we could map objects to ids like this : id (int) | Serialized Object (blob) 1 10010110110 instead of actually ...
0
votes
3answers
35 views

SQL MAX function

Suppose I have a table with attributes Name, Age as follows: MyTable (Name, Age) Now, to get the oldest age I can write the following query: SELECT MAX(Age) AS "Oldest Age" FROM MyTable; ...
2
votes
1answer
28 views

How much space is needed to reclaim space from a table in INNODB

I inherited a MySQL InnoDB table that has approximately 200 GB worth of data, as well as several unneeded indices that amount to approximately 500 GB. I've archived approximately 75 percent of the ...
0
votes
1answer
16 views

11gR2 didn't ask me to set username or any password

I have installed Oracle 11gR2 (latest version 11.2.0.1.0) on my system. During the installation it didn't ask me to set username or any password. I'm unable to start sql plus because i don't have the ...
0
votes
0answers
10 views

reports on history table

Assume Trucks which travel between Cityies. I store the Cityies that a Truck has traveled to in TruckLocationHistory table, if the Truck is passing the City, State = Passed and if it gonna stays for ...
0
votes
1answer
11 views

check numeric column for empty cells

How can I check for a numeric column for empty values I want something like this: select * from table where column_numeric = '' This does not works obviously, but what can be the equivalent of ...
0
votes
0answers
10 views

db2_install do not have write permission on the directory or file

This is the error I encountered (I ran the db2_install and everything else as root,): DBI1288E The execution of the program /home/DB_SERVER/ibm/db2/v10.5 failed. This program failed because ...
1
vote
1answer
46 views

Can I trigger events based on timestamp data or should I use polling?

I'm asking this question for SQL Server 2008+ but this could really be for any DBMS. Imagine you have scheduled data, something like: ID Data Timestamp 0 NULL 2014-11-22 1 ... ...
-1
votes
1answer
32 views

how to select from two tables [on hold]

how to select data from two table like this table 1 ---------------------------------------------------------------- proid | uid | problem | prostatus ...
0
votes
1answer
15 views

How to retire a physical standby in Oracle 11.2

I have a production Oracle 11gR2 RAC database with a single node physical standby. Now it has become the time to retire the old standby and pass that role to a RAC on fresher hardware. We don't use ...
0
votes
0answers
17 views

self referencing tables with SQL and entity framework

I have many tables in a database and the tables are nearly identical. There are limitations currently on what objects reference other objects. For example I have company,contact and project. Contact ...
0
votes
0answers
7 views

SQLAnywhere: Real time databases replication, to prevent downtime by crash of machine server

I'm looking for options to prevent downtime of SQL Anywhere server, in case of failure of machine server. Is there solution, that will allow us in real time, to switch to different server? I mean, ...
0
votes
1answer
23 views

how are passwords encoded in pg_shadow

How are passwords encoded in column passwd of pg_shadow? Doing a: select passwd from pg_shadow; I see values like the following: md52c92c858aa1fa12144f1dcbd4ca9c3a0 ... which, doesn't seem to ...
0
votes
0answers
7 views

What does FTS_ file mean after converting from MyISAM to InnoDB?

I have convert some tables in database from MyISAM to InnoDB. After that, I see some modification on file system. The size of database is grown up, from 2.8GB to 4.8GB and there are many file with ...
0
votes
1answer
20 views

Prevent Primary Key increment when an INSERT statement fail in PostgreSQL

I have a simple table in my PostgreSQL database like this: CREATE TABLE person_type ( id serial NOT NULL, name character(55) NOT NULL, CONSTRAINT person_type_pkey PRIMARY KEY (id), CONSTRAINT ...
-3
votes
0answers
37 views

How do I show all records related to a user? [on hold]

I have a table in which a few records are stored, among others CSR and user. What would be the correct way to get all records where user's value = test? My SQL file: -- phpMyAdmin SQL Dump -- ...
-2
votes
2answers
50 views

What's wrong with my SQL statement? [on hold]

I'm trying to execute: create table `certificates`( `id` INT NOT NULL AUTO_INCREMENT, `common_name` VARCHAR(100) NOT NULL, `csr` LONGTEXT NOT NULL, `type` VARCHAR(100) NOT NULL, `certificate` ...
0
votes
0answers
46 views

Query execute slowly when changed compatibility Level of my database

I use SQL Server 2014 and have a database with compatibility level 110 (SQL Server 2012). also I have a stored procedure on it that execute about 10 second. When I change compatibility level of my ...
0
votes
1answer
27 views

PostgreSQL Role Configuration

I am using PostgreSQL 9.3. I am working with a friend of mine on a project on which both of us would need access to the same database and all of the permissions on every table. So I created a Role ...
2
votes
2answers
73 views

Error on DDL statement never invokes CATCH

When I try to close the SS Management Studio window below is the error I understand that DDL statements are implicit COMMIT and the below WARNING message is because BEGIN TRAN never COMMIT or ...
1
vote
1answer
5 views

SQL - Update table for a unique ID with multiple entries if one entry has variable in question

I'm trying to update a table to fill in a variable to each row in the table if one row for the unique ID shows that variable. I was trying to do the following, but it's giving me an error. ...
0
votes
2answers
40 views

Summarizing Pay Checks Based on Employee's Job Code

What I'm trying to do is summarize an employee's earnings for each job code they worked in for the year. Employees are assigned a job code based on an effective date. I'm trying to line up the job ...
0
votes
1answer
33 views

Database Normal Form (financial statement)

I would like some advice on how to design the database for financial statement data which objectively addresses the tradeoffs between usability, performance, maintenance and adherence to normal form. ...
0
votes
0answers
21 views

problem in connecting SQL Server for internet access

I'm having a problem connecting SQL Server for internet access. I have built a test server so that I can play at home and not kill the works server. I've been trying for days and so far I have: My ...
1
vote
1answer
19 views

Does a database update force index rebuild regardless of updated field?

With MySQL (InnoDB), I understand that having indexes slow down UPDATE queries. I would like to know if this happens regardless of what fields are updated. For example, if I have a table with 20 ...
0
votes
1answer
19 views

ORA-01033: ORACLE initialization or shutdown in progress using Oracle Express

I am using Oracle Database 11g Express Edition. I'm on Windows 7-64Bit I get this error when trying to access the database: ORA-01033: ORACLE initialization or shutdown in progress I set up the ...

15 30 50 per page