0
votes
0answers
25 views

How to take backup of rows which are going to be deleted and restore it? (Mysql) [on hold]

I want to backup the rows which are going to be deleted for that I want to use a trigger that stores those rows somewhere in another temporary table.. For that following things I am going to need ...
0
votes
1answer
22 views

How to Store text of 15 to 20 KB file data in blob or as text? [duplicate]

How to Store text of 15 to 20 KB file data in blob or as varchar in sql Server?
-5
votes
0answers
18 views

sql server query [on hold]

In front end I am selected one number from dropdownlist if database table contains this number then gridview shows the number and some message else grid view shows the number and other message what is ...
0
votes
2answers
40 views

How to minimize log operations in SQL Server to avoid “log full” error

I have a database in production which constantly get log file filled, its a data warehouse and have many jobs/queries running for obvious. Below is the error which I am getting Msg 9002, Level 17, ...
-2
votes
2answers
24 views

how to join one select statement to another pivot select statement [on hold]

SELECT emp.UserId ,emp.EmployeeId ,emp.FirstName ,emp.MiddleName ,emp.LastName ,emp.MobileNumber ,emp.HomeNumber ,emp.OfficeNumber ,convert(VARCHAR(10), emp.USJoindate, ...
-1
votes
1answer
26 views

Set up MySQL server database [on hold]

I want to set up MySQL server database for my office on my windows 8 pc, but i dont know exactly which products to use. Can anybody help me with it. I want to set the database such as my pc would be ...
2
votes
1answer
16 views

SQL Server Active Directory login groups with limitation

I'm DBA in my organization and use SQL Server 2012 and 2014. I requestd to define multiple group in active directory such as Developer, DBA, supporter and ets... and add my users to this groups. after ...
0
votes
1answer
49 views

Get data faster from databasse

My site having a more than 1.5 million records and my question is the how may i fetch record fast. i am spending so much time to find the way for it finally find out the one way which is to apply the ...
2
votes
1answer
37 views

Create a grouping based on chains of pairs

Say I have two tables: CREATE TABLE datum ( datum_id SERIAL PRIMARY KEY, datum_text TEXT NOT NULL ); CREATE TABLE datum_pair ( datum_id1 INTEGER NOT NULL REFERENCES datum (datum_id), ...
0
votes
2answers
19 views

MariaDB 10 replication strange behaviour

I have following MariaDB 10 replication setup. Server A MariaDB 10 (master), Server B MariaDB 10 (master), Server C MariaDB 10 (slave/master), Server D MariaDB 10 (slave). A and B are getting new ...
0
votes
1answer
23 views

Filling not applicable fields with N/A rather than leaving them empty or Null [duplicate]

I have a database of few million records, many of the fields (call them Ec1 to EcN) have either Null or empty string in them. When I looked at them more closely, I found that for many records, several ...
2
votes
0answers
23 views

Improving performance of a weighted search query in SQLite3

For an intra-site search I have this table in an SQLite3 database, that relates ids to search terms with a certain weight: CREATE TABLE search_index ( id INTEGER(7) REFERENCES other_table, ...
0
votes
2answers
103 views

Calculating values from three related tables, without using join or union

I have a simple basic three tables on SQL Server database: What is needed is to get the quantity available, without using joins or unions which is calculated: Quantity Available = Items Opening ...
0
votes
1answer
40 views

unable to add index to column, duplicate entry

I have a table that collects virtual machines usage metrics, I'm trying to add an index to timestamp column, to speed up queries, when selecting time, this is a sample of the table I have, it has ...
0
votes
1answer
24 views

Tracking Table Structure Changes [on hold]

I'm by no means a full DBA, so I'm kind of shooting in the dark right now, but we'll see how this goes. This is with Microsoft SQL Server 2014 with our applications written in ASP.NET. What we want ...
-3
votes
0answers
16 views

DBF error.The database cannot be open [on hold]

I have a software call Kodak Trophy(database program).This program stores patient data with x-rays. Now it is giving an error saying that the database cannot be open. When I try to reindex a ...
4
votes
1answer
70 views

Move live SQL Server database to a new server

I have a production server running SQL Server 2008 Web Edition, and it has to keep running 24x7 with almost no down time, and it's the time for us to move to a more advanced server hardware, also it's ...
-7
votes
0answers
38 views

Vendor query yields poor performance [on hold]

I have a query that the vendor will not change. The query takes 4 hours and of course slows down the entire application. Has anyone run into this? Query Code Here
1
vote
1answer
28 views

Couldn't restore database and couldn't change Single user mode to Multi user mode

I am unable to restore a database. The database is stuck in single user mode. I cannot change to multi-user mode. I was restoring the SQL Server database from Prod to Dev as I have done many times ...
0
votes
0answers
15 views

How to identify a client application whose host_process_id points to sqlserver.exe

I am in the process of trying to identify a client application which uses one of the SQL Servers I support (2008 R2). Periodic queries against sys.dm_exec_sessions regularly return sessions whose ...
1
vote
0answers
32 views

Overwhelmed with Sensor Data - Excel to SQL fails

I'm managing a lot of sensor data and need to do charting, smoothing, stats over time on the data. Currently I import the data from flat files using VBA to do ETL into Excel. The format of the data ...
0
votes
1answer
23 views

InnoDB Index Doesn't Fit in Memory

I am using InnoDB tables in my database and total index_size is 250 GB and my data size is 500 GB. Server has 128 GB RAM, and innodb_buffer_pool_size is set to 64 GB. Data size is increasing every day ...
0
votes
0answers
16 views

Log Shipping Fails to create backup after Server reboot

We made a change last week to point our log shipping backup jobs to a new Windows File Share. For three days everything was running successfully. On Saturday night we performed our monthly ...
0
votes
0answers
25 views

ASP.NET Session Database - what user to create?

I am migrating a .Net 3.5 website with SQL Server 2005 Enterprise databases to SQL Server 2012 Enterprise (website still .Net 3.5). It uses ASP.NET session state database of type "t" Temporary. ...
2
votes
0answers
52 views

bug in sp_rename

I've searched high and low, but I cannot find anyone mentioning that when you run sp_rename, then you should mark the objects for recompilation too. As in EXECUTE sp_rename 'fct.MyTable', ...
2
votes
3answers
108 views

Unknown returned type in PostgreSQL query

The following query works: SELECT a, b FROM unnest(ARRAY[(1,2), (3,4)]) AS t(a integer, b integer); a b _ _ 1 2 3 2 However, I wasn't able to use a different column type such as varchar(255): ...
3
votes
1answer
31 views

Circular dependency in schema or boolean with CHECK?

Let's say I have the following tables: create table repositories ( id serial primary key, name varchar(255) not null ); create table remotes ( id serial primary key, url varchar(255) ...
1
vote
1answer
39 views

Tune Performance by putting large tables into the KEEP Pool

We currently have a database with 20GB SGA space. SQL has been optimized but has to statisfy its use cases as well and some queries are very, very slow, specifically when large result sets are ...
0
votes
0answers
30 views

Backup Mirror database

I have database mirroring setup between two SQL 2012 servers in two different datacenters. For testing purposes in the "mirrored" datacenter I would like to create a working copy of the database. ...
0
votes
0answers
11 views

Automatic failover in Mysql 5.6 [on hold]

I have to perform the Master-Slave Replication in Mysql5.6 with automatic failover Option.Please help be to achive this. Coming to my setup i have 4 Mysql Instances running on single server.Now i am ...
0
votes
0answers
20 views

Alternative when IN clause is inputed A LOT of values (postgreSQL) [migrated]

I'm using the IN clause to retrieve places that contains certain tags. For that I simply use select .. FROM table WHERE tags IN (...) For now the number of tags I provide in the IN clause is around ...
0
votes
2answers
20 views

Unable to browse to folder on SSRS 2012 through report url

I have installed SSRS 2012 in native mode on windows server 2012 r2 and deployed reports to the server successfully. I am having difficult browsing to any report folder through the report URL. I can ...
2
votes
3answers
52 views

Track entity updates (by who and when)

I need some advice on how to store information about who created/updated an "entity". I keep going back and forth between Option1, 2 and 3 (see below): Background This is a legacy system and there ...
3
votes
0answers
11 views

Remove a shard in MongoDB

I have a MongoDB cluster, I accidentally hosed a shard, I don't have a backup. It's pretty easy to recover the data, but after issuing the removeShard command, it says it's draining. However, the ...
0
votes
3answers
58 views

Adding order by to a query is slowing down the query even after Indexing

While joining columns with huge data even after indexing the column order by is slowing down the query. Without order by query is executing within 2 secs. But with order by query is taking 145 secs. ...
11
votes
2answers
610 views

Why these characters are all equal in SQL Server?

I just don't get it. See this SQL query: select nchar(65217) -- ﻁ select nchar(65218) -- ﻂ select nchar(65219) -- ﻃ select nchar(65220) -- ﻄ if nchar(65217) = nchar(65218) print 'equal' if ...
1
vote
0answers
23 views

how to get a sum total of each column and row - postgresql [Crosstab or Case]

I have to count the records according to the criterion, they are much more filters but I have summarized. I could use either of two ways. 1# SELECT * FROM crosstab('SELECT dim_espacio.desc_estab, ...
0
votes
0answers
28 views

Deadlock occur during multiple insert on Single database? [on hold]

I have multiple windows services thread that insert values into database. But when parallel insertion happens it gives error After show innodb engine status gives Deadlock issue.
-4
votes
0answers
19 views

Query to update datetime field with yesterday's date [duplicate]

Can you tell me the sql query to convert the datetime field from which current date to be updated to previous date and time part as 21:00:00:000 adjusted to GMT
1
vote
1answer
28 views

How do I reduce SharePoint 2010 SQL server log files? [duplicate]

I have a work place portal built on SharePoint 2010 and the SQL Server drive space is full. I am using SQL Server 2008 R2. Of the 800 GB disk space, the log files have taken approximately 730 GB. ...
1
vote
2answers
24 views

How to define partition according to Date?

I am currently using MySQL 5.6. In my database, I have a log table called paramlog_ems. It has 2M rows I want like to partition this log table according to Date. Here is the table structure: ...
-3
votes
0answers
28 views

I want to update certain rows of datetime field to previous date and time by default 21:00:00:000 [on hold]

For certain rows the current date should be updated as yesterday's date and time to be set as '21:00:00:000"
2
votes
0answers
25 views

Postgres Streaming Replication: How to re-sync data in master (with standby) after failover

I am absolutely new to postgres 9.1 replication mechanisms. I have managed to set up streaming replication between a master and standby postgres (Both have x number of records). At one point when ...
-4
votes
0answers
30 views

Estimated and actual execution plan for a Parallel Query [on hold]

for a parallel query, there is a big difference between estimated and actual execution plan. Does anyone know the reason?
-1
votes
0answers
25 views

Getting error ORA-01034: ORACLE not available [on hold]

I am getting this error while connecting my database in oracle sql developer. ORA-01034: ORACLE not available. ORA-27101:Shared memory Linux Error:2:No such file or directoy
1
vote
1answer
57 views

Why is it that when I drop a field in table it says `#1050 - Table already exist`

I want to drop some fields of a table but it returns an error. the query is.. ALTER TABLE `tbl_incoming_bub` DROP `approved_date`, DROP `approved_by`, DROP `incoming_date`, DROP `incoming_by`, DROP ...
0
votes
1answer
34 views

Database Design For Social Network apps

I'm going to build a social network app. Each user will have photos, videos, details, posts etc. My question is when a new user registers, should I generate many new tables for that user or have one ...
0
votes
0answers
35 views

Moving Database SQL Server 2012 to 2008/R2 [duplicate]

I'm planning to move a Large Database from SQL Server 2012 to 2008/R2. I tried the scripting thing, it works on a small-medium type of database but not on Large database w/c is about a hundred MB. Any ...
4
votes
1answer
41 views

How to tell if a backup file contains CDC?

Using SQL Server 2008 through to 2014, I know how to backup and restore a database with Change Data Capture enabled (CDC), but what I am looking for is a way to query a full backup file to determine ...
1
vote
2answers
21 views

Inconsistencies with ADD CONSTRAINT index_name in MySQL

I created this example table CREATE DATABASE foobar; USE foobar; CREATE TABLE foos ( id INT(11) AUTO_INCREMENT PRIMARY KEY, firstname VARCHAR(30) NOT NULL, lastname VARCHAR(30) NOT NULL, ...

15 30 50 per page