0
votes
0answers
7 views

no such column name

I am doing this query:SELECT univ._id, univ.firstName, univ.lastName, univ.status, univ.veikla, univ.cellPhone, univ.homePhone FROM universitetas univ" in order to select the information like id, ...
0
votes
0answers
3 views

Can MySQL Index Merge an Composite index with a single column index?

I am tuning a query and currently have an index as following : Index 1 : (col1, col2) An example query would be : SELECT * FROM t1 WHERE col1 = '1' AND col3 = '2'; I have created an index on ...
0
votes
0answers
2 views

Get products of category plus all child categories till leave nodes

We have a hierarchy which looks this: Now the problem is that most products are only connected with 1 category, which is most of the time the lowest level. I am trying to get ALL products below a ...
0
votes
1answer
7 views

Update Trigger in MYSQL

Here is my requirement :- I have a table called "users" and field called "Admin". Field "id" is primary key. Wants to update "Admin" field to "1" if id=1000; Tried this ,but not working.I tried ...
2
votes
3answers
97 views

Is it advisable to use a temp table when the stored procedure could be run simultaneously by different users?

I am working on a stored procedure that retrieves the objectGUID from active directory. I am storing the result in a temp table and then returning the value in an output parameter for use with other ...
-3
votes
2answers
32 views

Microsoft recommends using Rowversion over timestamp , but i can not find “rowversion” data type inside my sql server 2008 R2

MS on this link http://msdn.microsoft.com/en-us/library/ms182776.aspx mentioned that we should use rowversion data type over Timestamps. Now inside my sql server 2008 R2 I want to create a column with ...
0
votes
1answer
20 views

How to filter out deleted records in a trigger on a table with composite primary key

I am trying to optimize a trigger on a table in a database from a 3rd party. I am not allowed to change or add any columns to the schema. The table has a composite primary key, one column is an ...
0
votes
0answers
13 views

Cannot add “rowversion” data type in sql server 2008 r2 management studio, or even to modify existing column data type [duplicate]

I want to create a column with Rowversion data type, but inside my SQL Server 2008 R2 Management Studio, I cannot find such a data type: Also when I tried altering existing column named timestamp ...
0
votes
0answers
19 views

Remove dupes from joins

I am trying to get all accounts with duplicate end dates. I need info from four tables that only have the FK LDC_ACCT_ID in common. When i join the tables i get tons of dupes. I understand why but I ...
0
votes
0answers
7 views

MySQL Stored Procedure Cursor Loop Stops After 1 Iteration

Moving this question from Stack Overflow to DBA. I created a stored procedure to update missing data in a table, using the MySQL documentation as a guide. It works, however it seems to stop after ...
0
votes
1answer
26 views

Breaking a big insert query into smaller ones

I have the below INSERT query. It tries to insert over 50,000 rows and it fails because of logging. Is there a good way of splitting a query like this into batches of about 1000 or so with COMMIT ...
2
votes
0answers
13 views

Can I convert SQL Server 2008 full db to SQL Server 2005?

Recently I converted my SQL Server 2005 database to SQL Server 2008. Now I can't attach that db to SQL Server 2005. I do not have any backup of that db file as well. I have tried to generate scripts ...
0
votes
0answers
14 views

Is it possible to use SSMS to connect to SQL Server hosted in a server that has a specific port?

We have a customer who has a Windows Server hosted in a IP such as 10.1.1.100:3200. We can use Remote Desktop Connection (mstsc.exe) to get into this server: Inside this remote connection we can ...
0
votes
0answers
18 views

Equivalent data types in Oracle database for Sql server 2008’s uniqueidentifier and timestamp

I am working on an Sql server 2008 R2, and I have data types which is specific for Sql server including:- - UniqueIdentifier - Timestamp. Now I want to deploy my asp.net mvc-5 web application on ...
0
votes
1answer
10 views

The process is running and is waiting for a response from the server - transactional replication

I could not yet figure it out why one of my transaction replication subscription is constantly coming out with the following annoying message: The process is running and is waiting for a response ...
0
votes
0answers
3 views

Mysql Master - Master Replication

i have established a master A and master B replication between two servers.Both are getting replicated.But it is limited with only one database. My questions 1.How to create a new database in ...
1
vote
1answer
31 views

Computed column 'IsWeekend' in table <table_name> cannot be persisted because the column is non-deterministic

I'm in the process of tuning a query in SQL Server 2012 that is spilling to tempdb due to an incorrect cardinality estimation when using the DATENAME() function on a column to check if the data is ...
0
votes
1answer
8 views

Need help in putting the single quote and constant timestamp in plsql

Please help me in appending the Single quotes and constant timestamp to my query output. Given below is the expected output from my param file. Note: Query is executed through sqlplus Expected ...
0
votes
0answers
11 views

what is the difference between data migration and ETL?

What is the basic difference between ETL and data migration? Are not both terms are used for the same purpose ? Data migration includes extractions, transformations of data and Loading to target ...
1
vote
0answers
39 views

ORA-01406 while building a Sphinx index

We are getting ORA-01406 error while trying to build an index over Oracle DB using Sphinx: root@bdt:~# ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe/ NLS_LANG=AMERICAN_AMERICA.UTF8 indexer bsrpIndex ...
0
votes
0answers
16 views

Cursor brings back Null when run

I'm trying to create a proc which assists in creating an XMLSitepath. I am trying to use a cursor but its not behaving as it should. Please could someone take a look and tell me where I am going ...
0
votes
0answers
27 views

Questions about the SET DATEFORMAT command [on hold]

How do I set the dateformat for a column, where dates exist as '2014-12-28' and '2014-23-12' in the same column? I want it set as yyyy/mm/dd format.
2
votes
0answers
12 views

How to store a 64-digit key of alpha numerical values into MySQL Database

I am student studying in Database Administration (first year), one of our task requires a to design a login form for corporate and regular users. Below are the requirements for the username and ...
0
votes
0answers
11 views

Processlist show most of the queries are sending data for select query

I have faced some problem like sending data state in processlist. In my application I used parallel processing which send 50 count at a time, and that will do some MySQL database operation (select and ...
1
vote
0answers
19 views

Need Help in building database

I am developing an app that send messages (email and sms) to users. The db must also maintains the list of messages send to users. And also the status of messages send to user like send or failed. I ...
0
votes
0answers
22 views

How do I get the count for time periods?

I have a table with the following columns. [ComputerGroupid], [Computerid], [Userid], [loginTime], [logoffTime] And my requirement is to get the table with the below information ...
0
votes
1answer
20 views

join on just the next closest date?

I want to get a table of [file], [folder], [DateAdded], [DateRemoved] I have a log table of changes that has [file], [ChangeDate], [OldFolder], [NewFolder] Files have moved in and out of ...
2
votes
1answer
37 views

Results for every hour of the day even data if not present

I am trying to write a query to show the count of users for each hour of the day. If there is no data for that hour, I want to record the hour with a count of zero. Source data ...
0
votes
0answers
12 views

Slow Query Performance - Can't Debug

I have a MySQL query that I am trying to debug the performance issue but cannot. I know that the majority of the query is reading/processing rows (Sending Data state). However, in the explain output, ...
1
vote
0answers
20 views

Phantom vs. Non-repeatable read

In Martin Fowler's book 'Patterns of Enterprise Application Architecture' on page 74, the authors say It's easier for databases to spot unrepeatable reads than phantoms, so the repeatable read ...
2
votes
1answer
31 views

How do I create a partition using a bit field in SQL Server 2014

I have a table where data is archived. I need to keep this data as it is rarely viewed. Instead of moving archived data to a separate table, I wanted to create a partition on the Archived field. When ...
1
vote
3answers
22 views

Can I install SQL server 2012 on a same machine with SQL server 2005?

I have been using SQL Server 2005 standard for quite a while, and it is working great. Now I need to use SQL Server 2012. Will this effect my existing databases? How much risk is involved in ...
0
votes
1answer
17 views

Is it possible: MySQL semisync and async replication on same master-slave pair?

I want to use master-slave MySQL (or MariaDB) replication to remote server as data protection from hardware failures. I have two goals: to keep low response time and don't lose important data. Good ...
0
votes
1answer
17 views

Relationship issue

I'm working on a ERD with mysql workbench, and i have a little question. I have a Database with this tables: company_address country state city I want to store the address of the company with all ...
1
vote
0answers
10 views

DB2 Express User ID Authority Error

I'm trying to create a sample database in first steps after installing db2 Express V10.5 I've looked at the answers provided below, but I'm not able to resolve my issue. How to grant rights for a user ...
1
vote
0answers
15 views

SQL Native backup MIRROR TO performance

We are moving to SQL 2014 Expensive Edition Q1 next year. Right now we are on 2005 Standard Edition, so we don't have access to the oh-so-wonderful MIRROR TO option for our backups (We use Ola ...
0
votes
0answers
7 views

JDBC pooling Oracle driver Socket read timed out

I run Java EE application on Glassfish server v3 together with Oracle 12 DB on the same machine under Windows Server 2012 64bit. I use latest ojdbc7 driver. Connection pool config: ...
1
vote
1answer
17 views

DB Design storing products sold in bulk, priced by vastly different units

I am trying to design a database that stores products that are sold in varying different units. Some are priced by product, some by volume, some by length, some by surface area. Possibly some by ...
3
votes
3answers
60 views

Help with SQL Query to XML output

I have the following query: SELECT [ID] AS [NewID] , ( CASE WHEN LEN([MiddleName]) > 0 THEN [LastName] + ', ' + [FirstName] + ' ' + LEFT([MiddleName],1) + '.' ...
0
votes
1answer
13 views

DELETE from OPENQUERY alias not working

I'm trying to use the following code to execute a DELETE statement on a linked server. I'm trying to delete all records from the remote server where there is a match on a certain ID field in both the ...
0
votes
0answers
13 views

Are A or D series VMs better for deploying PostgreSQL on Azure?

In Azure there are VMs that have local storage either as spinning disk (A-series) or SSD (D-series). Considering this space is wiped on reboot... Is there a benefit to choosing the SSD option for ...
0
votes
0answers
10 views

SSMA mysql double to sqlserver decimal, decimals getting cut off

I have a field that is a (signed) double in mysql, and I want it to be a decimal(18,4) in sqlserver. I have changed the Type Mapping for Source Types double and double precision to decimal[18][4] in ...
0
votes
1answer
16 views

Merging 2 queries together

I have 2 query results that need merged together where periods are alike, adding a the column 'seats', using a '0' the period doesn't exist. Before: tdate period staff ...
0
votes
0answers
5 views

Oddness with MySQL with InnoDB - CPU capped at 50%

I have MySQL 5.5.22 with InnoDB, running on multiple c3.8xlarge EC2 instances. Which is to say, the VMs are set up with 32 CPUs & 59 GB RAM There are no CPU controls in MySQL, right? Then why ...
0
votes
1answer
22 views

Suspended query causing high CPU usage

Environment detail: SQL Server 2008 R2. I have applications running on JBoss that access the DB using JDBC driver. Issue: My online DB server was experiencing high CPU usage. Using the ...
-3
votes
0answers
28 views

What could be resons for slow performing application [on hold]

We have an application and the performance of the application is really bad. What are some of the factors that should be checked to decide if it a database problem or not?
0
votes
1answer
8 views

xenforo vulnerability, limit max open connections by ip address

Trying to get some emergency help because my website is being attacked. It isn't as much as an actual attack, as it is a small bot to exploit xenforo vulnerability. ...
0
votes
0answers
15 views

Best data type to store Active Directory Nullable GUID

I have a table name Employees,inside Sql Server 2008 r2. the table contain the following columns:- UserID. it is the Primary key, and it is auto generated by the DB. GUID. which will store the ...
0
votes
1answer
29 views

transaction log restore

we have an external production database (maintained by another company) and we are trying to build an internal database that replicates the production database for reporting purposes (both ...
0
votes
0answers
18 views

SQL Transaction Logs Overwrite

Server Detail: SQL Server 2008 R2 Production Set Up: In a production environment, I have a DBMR job scheduled to take transaction log backups for all the databases present in a DB server. This job ...

15 30 50 per page