1
vote
0answers
11 views

How to create a view with added rows for missing dates?

I'm not sure how to accurately phrase this question. Essentially, say I have a bunch of salespeople on different sales teams. Like, the Blue Region, the Orange Region, the Red Region, whatever. Now, ...
0
votes
0answers
7 views

Restrict connection to SQL Server By IP [duplicate]

On a QA server I need to give access to specific login from just one IP to log to this server. I wrote This login trigger Create TRIGGER tr_CheckIP ON ALL SERVER FOR LOGON AS BEGIN ...
0
votes
0answers
4 views

Relationship between data independence and database schema

What is the relationship between data independence and database schema? I know both of them separately. But I don't know how to explain the relationship of these two.
0
votes
0answers
17 views

MariaDB: inner join searching for 1 in TINYINT column not working

Since yesterday I've been trying to make a query work. I have two tables: image where I store information about images and imagehit where I store information about how many times those images are ...
0
votes
0answers
14 views

Get data type by ID

I was looking at this answer for checking the data type of a value. It's quite handy and spits out something that looks kind of like this: Typ=1 Len=12: 48,48,48,48,48,48,49,49,49,49,49,49 The part ...
2
votes
1answer
35 views

Explaining the problem with a column of values from a non-mutually exclusive domain

I'm trying to convince the powers-that-be that their current database design is risky and inefficient. I'd like to verify whether my assumptions are correct, and I'd like help in finding technical ...
0
votes
0answers
10 views

Design - duplicating properties vs not allowing delete

I'm designing a database for a mobile app CMS that contains user data. These objects are Address and Job (a job can have 1 address and an address can have many jobs). The first version of a similar ...
0
votes
0answers
15 views

SQL Server service automatically stops after starting I cant lo in to sql database engine [on hold]

It worked fine until now. I can't get it working because SQL Server service automatically stops immediately after I start it. I'm trying to start it from Sql Server Configuration Manager. When I open ...
0
votes
0answers
8 views

Question on comparing two fields in Access

I'm not sure if the title is fitting as I am not 100% sure if what I am doing is correct but here goes. Here is my enrolment table, I have added a field called pass/fail as you can see which is ...
0
votes
0answers
7 views

How can I make microsoft Access update fields that are linked in several tables?

I am working on a database for clinical observations in cancer mouse models. Usually, the animal care staff reports an observation that the vet checks. Sometimes, we have false positives that I need ...
0
votes
0answers
13 views

SQL-Server Full-Text Index Auto-Population Stops Working

From time to time auto population stops working (SQL Server 2014 11.0.6518). I have to use ALTER FULLTEXT INDEX ON [table] RESUME POPULATION to make it work again. In the SQLFT*.LOG there is no ...
0
votes
0answers
7 views

SQL Job No Longer Executes According to Schedule After an Error

I have many SQL jobs scheduled to run at various times. I've noticed that sometimes, not always, if the job aborts on an error, it will not execute its next scheduled execution. In fact, it won't ...
0
votes
0answers
12 views

Better configuration for a In-Memory MySQL database?

I have a local MySQL database for the only purpose of execute some PHP tests. To improve the speed of the execution, I created the database in memory using the ENGINE=InnoDB statement in every table ...
0
votes
0answers
6 views

pg_dump FATAL error - PostgreSQL 9.2

Running a pg_dump command from a TEST server. Copying from a Slave server. DB size is 1.7 TB. Command: ssh postgres@slaveserver "/usr/pgsql-9.2/bin/pg_dump --exclude-table-data='junk.*' ...
0
votes
2answers
21 views

Selecting data from another table using a foregin key

I have two tables A & B. Table A: id | name | num Table B: id | date | roll id in table B is a foreign key which relates to the id in table A. I want to get the contents of table B where id ...
0
votes
1answer
29 views

Query that compares dates

I'm trying to create a query that shows if students are mature or not, based on their date of birth. However when the query is executed it returns all students as not mature. Any students that are ...
0
votes
1answer
8 views

Incremental column depening on column value

I would like to have a column which has an incremental integer depending on the column value after sorting the table. E.g. after sorting by state: Nr | State | Counter ...
2
votes
0answers
27 views

Debugging a query that is sometimes slow

I have a web API that is backed by a Postgres database, and the performance is generally very good. I monitor the performance of both the database and the application as a whole. Most of my queries ...
0
votes
0answers
4 views

Changing global variables in MySQL RDS instance

I have a MySQL RDS instance that I created. I need to set the net_write_timeout variable in the instance so it is available globally. Can this be done ?
0
votes
0answers
11 views

How to pass parameters to a cmd.exe using Servcice Broker External Activator

I am trying to use SQL Server Broker External Activator to launch C:\Windows\System32\cmd.exe application and pass commands to it. For example: echo Hello World x 2 >C:\Test\cmd1executed.txt To do ...
0
votes
0answers
21 views

simple math with SELECT - no resulting row

Simple math with SQL don't give a result. There is written 1 row in set, but I don't see the result/row. MariaDB [(none)]> select 5242880 / 1024 / 1024 as current; 1 row in set (0.01 sec) ...
1
vote
1answer
32 views

How can I create a role to create,update,delete stored procedures and views

what permissions do I need to give in order to achieve the above task to get users the capacity to create,update,delete stored procedures and views to a database role.
0
votes
1answer
16 views

SQL Server 2012 - Powershell Agent Job Hangs

I have a SQL Server Agent Job on one of my 2012 SQL Servers which runs a powershell script inside the job step, where the 'Type' is set to powershell, and is running under the SQL Server Agent Service ...
0
votes
1answer
21 views

Unique identifiers for the same type of object in the same request

This question is about your opinion and common approach for relational databases. So please, do not vote me down. I really need to solve this problem.. I remove this question once I meet the answer. ...
1
vote
1answer
14 views

Can we create Fail over clustering for sql server 2012 standard edition on amazon EC2?

We are planing to move on amazon's EC2 services. So my question is that can we create fail over clustering on amazon EC2 using sql server 2012 standard edition ?
1
vote
0answers
17 views

SSIS: Trying to configure branching logic in Foreach loop

Full disclosure: I posted this on SQL Server Central yesterday but got no answers. I hope someone here can assist me. I'm working on importing flat files into a database. I have used a Foreach loop ...
0
votes
0answers
13 views

Why does OpenQuery hang for hours before raising Query timeout expired when query timeout on Linked Server is set much shorter?

In production have two SQL 2012 instances on separate servers, with a Linked Server set up between them. No problems there. In development, I have the databases for both in one 2012 instance, and have ...
0
votes
0answers
19 views

Issues with the @query parameter in sp_send_dbmail

When I use the following: select * from table A where repID in ( select repID from table B where id = 5 ) as the string I'm assigning to the @Query parameter. ...
0
votes
0answers
14 views

How can I optimize my SQL Query

I try to optimize a Sybase SQL Anywhere Query for Performance but with no luck. LetzterPreis & LetzterBeleg slow it down. Any suggestions how I can optimize it? :( Here is the query: SELECT ...
0
votes
0answers
12 views

Is it safe to sync MySQL binlogs?

I am working on a strategy to replicate my MySQL binlogs to Amazon s3. I have looked into mysqlbinlog --remote-server but it seems like adding a file watcher on /var/log/mysql which triggers an aws ...
0
votes
0answers
23 views

Resource Governor - user in classifier function using NULL pool rather than stated pool

I have a problem with transaction log backups for an AlwaysOn HA database causing latch contention. It's not a problem when we run backups on the replica but we're not licensed for that, so I'd like ...
0
votes
0answers
10 views

Retrieve data from corrupted hard drive [migrated]

I've installed Fedora on Vmware. Recently my hard drive is corrupted and can't be read. Could someone please help me out, how to extract the data I've in that virtual machine. The host OS: Windows ...
1
vote
0answers
10 views

How to implement sql replication when subsciber cannot acces the publisher

I have 2 servers Server A (Publisher) and Server B (Subscriber) However server A can access Server B but Server B cannot access Server A. There are no VPN between these servers Server A can access ...
1
vote
0answers
20 views

Changing IP address from existing Mariadb10.1 Galera Cluster

I have a multimaster cluster with MariaDB Galera working properly, it is set to perform the replica through its WAN interface. This configuration was a result of a previous migration from another ...
2
votes
1answer
26 views

How to use a CASE expression in the WHERE clause?

I am using a CASE expression in my WHERE clause like this: SELECT * FROM ASPECT.WR_AM_ADT_SUMM INNER JOIN ASPECT.WR_AM_DLR_DTL ON AS_CNTRY_CD = DD_CNTRY_CD AND AS_DLR_CD = ...
2
votes
2answers
250 views

MS SQL Included Columns in an Index: is there something like “too many”?

We have a table in one of our databases with approximately following structure: Field1 int primary key Field2 int foreign key A Field3 int foreign key B Field4 int foreign key C Field5 ... Field70 ...
-5
votes
0answers
31 views

I want to write query as per business requirement [on hold]

Universe Addition for Historic Data: Expired Contact Company Associations with companies as defined in universe, provided the record has either Committee or Compensation info, and belongs to Company ...
-2
votes
0answers
13 views

how to startup guest system after reboot host system without quit guest system? [on hold]

I forgot quit the guest system and close virtualbox and reboot the host system,now I can't open guest system again [calling] 5e7c.46d8: supR3HardenedMonitor_LdrLoadDll: returns rcNt=0x0 ...
0
votes
2answers
20 views

Can this be further normalized?

I have to define a system where we will be storing Image data and which can have an arbitrary number of attributes for the Image added per client. I have designed the following table Image ImageID ...
0
votes
0answers
10 views

Changing MaximumErrorCount when executing maintenance plan

I have defined a Maintenance Plan in Microsoft SQL Server 2012. It doesn't execute and it says DTS_W_MAXIMUMERRORCOUNTREACHED. The Execution method succeeded, but the number of errors raised (2) ...
0
votes
1answer
22 views

Import large DB 300 GB from ubuntu command line [on hold]

My DB Size is 300 GB , I have 2 SQL Dump file , one is 100 GB and Other one 200 GB , When I import the database it is disconnected due to some problem. almost 90 GB data’s are imported from both the ...
0
votes
0answers
11 views

move a postgres cluster to another machine

I have a postgreSQL 8.3 cluster I should move onto a new machine which runs postgres 9.3 (Ubuntu 14.04) . First of all I copied my whole cluster and I pasted into ...
0
votes
1answer
20 views

Splitting the table to get more clusterization options - will it help? [on hold]

Complete theory. Let's assume we have a table with a few millions rows. The table has clustered index over PK, and it is important for quick fetching of particular rows. However, the table also has a ...
2
votes
1answer
56 views

Datetime as date only

I understand SQL 2005 doesn't support DATE and so casting a datetime as a date is not possible. What I want to do is list all records with a datetime within an entire day of the current week. So I ...
0
votes
0answers
11 views

Identify MySQL Connection timeout

I am just trying to identify when MySQL drops a connection . For this I initiated a connection to MySQL Port using nc with a timeout value of 7200. $ time nc -w 2 car-005 3306 N ...
1
vote
0answers
4 views

PSQL's \i vs psql -f

In the days when I used MySQL I was OK with using the mysql -u myuser mydb < file.sql to execute SQL script. For a while now I use PostgreSQL and there people (and docs) advice to use: psql ...
0
votes
1answer
19 views

MySQL: SELECT and JOIN with not exists values?

How can i SELECT data from two tables using 'JOIN' operator, if some values with cat_idx and tar_id from categories (tar_id = 87) does not exists in time_discounts table. (I need to print '0' in this ...
-4
votes
1answer
37 views

SQL db deadlocks [on hold]

could any one please tell me how to monitor SQL db deadlocks How to prevent deadlocks How to cancel deadlocks without restarting the service. really highly appreciate your information
1
vote
3answers
43 views

Get Column Value from Subquery in Stored Procedure

In my stored procedure I got code like @Select = '... (Select ...) AS NAME ... AS AGE ... AS CLASS ' @Where = 'CLASS = ...' I can make validation ...
0
votes
0answers
9 views

Full text search error: Invalid locale ID was specified

Query involving full text search is generating the following error message after restoring the database to a new server: Invalid locale ID was specified. Please verify that the locale ID is ...

15 30 50 per page