0
votes
0answers
6 views

Trying to map postal codes to their respective cities, but running into some issues

The Problem I am creating a database of Countries, Regions, Cities and Postal Codes. Here's an example to give an idea of the database structure as it is now: Now, let's take Tuskegee University ...
0
votes
0answers
8 views

MDF/TempDB Growth, SQL Server 2005 Enterprise

Here's my scenario: SQL Server 2005 Enterprise Records from Database A being added to Database B Size of Database A MDF file: 3.15 GB I have separate drives for Data, Logs, and System. I ran a T-SQL ...
0
votes
0answers
15 views

how can I track down the source of “Internal connection fatal error”?

I'm working on a 6-700 line SQL script today. I'm running it from SSMS. Pointing at a SQL 11.0 db. About half the time I run it, I get: An error occurred while executing batch. Error message is: ...
1
vote
0answers
14 views

Sql Server 2008 R2 - Failed to send an environment change notification to a log shipping partner node

Login failed for user '*****'. Reason: Failed to send an environment change notification to a log shipping partner node while revalidating the login. I'm seeing a bunch of these errors on my ...
0
votes
0answers
7 views

Effects of renaming FC and using its original name for AG network name

We have a Failover Cluster, named MainSQL consisting of MainSQL01 and MailSQL02 which are default named instances and we can connect to whichever is the active node with just simply MainSQL. If we ...
-2
votes
0answers
18 views

Hi is there any to check that database table contains MULTIVALUE Columns [on hold]

In my project i want to check that whether the database is in the 1st normal form. TO check that i need to check whether there is any multivalued column in any table.
0
votes
1answer
23 views

Database design: Which will perform better, auto incremented column or a composite key for appointments

The schema of table is : appointment(date,time,patientID,...) pateint(patientID,PName,age,...) PS: two or more patient can came at the same time . The number of appointments per day up to 500 . ...
1
vote
3answers
40 views

Re-writing a sub-select as a condition on a column generated with 'over (partition by …)'

I am wondering if it would be possible to use over (partition by...) clause in order to avoid using a sub-select in the example below: declare @t table ( id int ,code char(2) ...
0
votes
0answers
12 views

script task sssis file extension is missing?

Hi I have problem with script task C# I create I have to prefix log file with date but my problem is not adding file extension log file is log_yyyy_MM_dd without extension I want ti extension log ...
-2
votes
0answers
25 views

What softwares are found in DB systems [on hold]

I am new to database concept and application. I want to know what softwares exist in a whole database system?
-1
votes
0answers
23 views

Getting error creating database in SQL Server 2005 [on hold]

I'm an error message when trying to create a database in SQL Server 2005: An exception occurred while executing a Transact-SQL statement or batch. Service Broker message delivery is not enabled in ...
0
votes
0answers
9 views

Mysql connections not closing

I have a web application running on Tomcat7 that connects to MySQL 5.5. I have two servers running the identical code: Ubuntu Red Hat The Ubuntu one runs fine maintaining a steady 8-16 ...
1
vote
1answer
12 views

MySQL wait_timeout setting ignored

I have a MySQL 5.5 instance running on a RedHat distro. I have edited my.cnf with the following setting: wait_timeout=30 However, client connections are sleeping and never getting killed. The ...
0
votes
1answer
10 views

Array column vs another table when the relationship is quite small

The Data I am creating a table of cities and their zip codes for the United States. Some zip codes have a list of acceptable cities, as designated by the USPS. For example, the zip code 36613 is ...
0
votes
0answers
13 views

Local SQL database settings to better mimic SQL Azure

I am developing a new application and use SQL Server 2012 installed locally for development. Then it is being deployed to Azure and running against their SQL Azure Standard S2 service. When running ...
0
votes
0answers
10 views

MySQL,- changing collation causes big problems

For one of my tables I have changed the collation from latin1_swedish_ci to utf8-unicode_ci. Then one of my queries, run from a synchronization script, ran amok. It cause sessions to lockup and not be ...
0
votes
0answers
17 views

ORA-01410 Error

I am getting ORA-01410 and ORA-06512 for the following block of code in a trigger im firing for deletion of a record in my table. Are the calls correct ? getlong ('xxx', 'YYY', :OLD.ROWID), getlong ...
0
votes
3answers
21 views

Case when not return more than one value

I try this, but the SwitchCase can not return more than one value. WHERE CP.NumIntAut IN ( CASE WHEN @NumIntAut IS NOT NULL THEN (@NumIntAut) ELSE (SELECT NumIntAut FROM ...
1
vote
3answers
25 views

Get seconds of day in Postgres

In Java we use Joda-Time to get the seconds of a day as an int value (despite the date): date: 10-10-2014 00:00:30 -> second 30 of day date: 11-10-2014 00:01:30 -> second 90 of day date: ...
1
vote
0answers
40 views

What are the dangers of non-IT managers using improper database terminology [on hold]

My immediate manager above me is not an IT person. She has obviously read a wiki page or two on SQL Server and/or database theory. Many times during discussions she will use terms like "Normalized" ...
0
votes
1answer
16 views

Postgresql single base on multiple HDD partitions

Imagine a situation: I got a Postgres database working on single server on one of HDD partitions (partition size 100GB) Database grows up to 100GB taking whole free place on the partition Database ...
0
votes
1answer
8 views

Replication Snapshot folder not cleaning up

The job that I thought was supposed to clean up old snapshots isn't removing the old files. The retention is left at default yet there are snapshots months old which remain. The job runs as the ...
0
votes
0answers
4 views

phpMyadmin 's red number, How to know is it good or bad?

I have some red numbers in my phpmyadmin status : Slow_queries | 137.297 Innodb_buffer_pool_pages_dirty | 12 Innodb_buffer_pool_reads | 127025788750 Innodb_buffer_pool_wait_free | 198 ...
1
vote
1answer
45 views

Set bit in Table A if values are present in Table B

I have two tables, Containing up to ~10 million entries. TableA which has 3 columns: IDA (bigint), IDB (int) and CHK (bit). (IDA, IDB) is the primary key. TableB which has 2 columns: IDA (bigint), ...
0
votes
1answer
28 views

T-SQL Parsing XML escaped in format %3E (less than)

First question here so please be gentle :) I am a junior SQL developer. I am try to parse a string in xml format that has been escaped like below: ...
3
votes
2answers
121 views

To make sql server instance back to multi user mode

I have made a change at instance level, ‘Properties/Connections/Maximum number of concurrent users’ to 1, disconnect all other users from the server. Since some of the users were logged in and left ...
0
votes
1answer
6 views

Machine account causing a Token-based server access validation failed with an infrastructure error

As the error suggests the SQL log is filling with the error: Login failed for user 'xxx\xxx$'. Reason: Token-based server access validation failed with an infrastructure error. Check for previous ...
0
votes
1answer
23 views

Transactions within a Transaction

What behaviour would PostgreSQL display if for example the script below were called BEGIN; SELECT * FROM foo; INSERT INTO foo(name) VALUES ('bar'); BEGIN; <- The point of interest END; Would ...
1
vote
1answer
7 views

Warnings while running AutoMysqlBackup

I am using Automysqlbackup.sh file to take MySql backups on Ubuntu.I have only 1 database. But when i run this script then it generates several Warnings (plus a error mail) like below Errors reported ...
0
votes
1answer
18 views

HTML column in a full text index?

Using sql server management studio, I want to create a full text index where a certain field is treated as html, tags should be ignored and umlaut-codes should be taken into account. How can I do ...
0
votes
2answers
18 views

Meaning of 'show variables LIKE '%_database'

Despite being a newbie in db administration, I have been assigned to move our crm from mysql to mssql. I have reached a point where I have met a query I dont understand and it cannot execute in sql ...
0
votes
1answer
17 views

Copy database from one mysql sever to another mysql server

Following are the details of the database and server: Server1: Host Name: abc Port Num: 01 database: test Server2: Host Name: xyz Port Num 02 database: spareparts userid: spts password: abcdefgh@123 ...
0
votes
1answer
24 views

Is there a standard mechanism for moving data to a remote database? [on hold]

I have my application installed in data centers across the world, performing various functions, with each data center having its own local database for the application. Certain reporting data is ...
0
votes
0answers
8 views

Calculate sum of a whole column in IBM Datastage without any grouping

I have a table in oracle with salary as one of the columns. I want to calculate the sum of this salary column. It is pretty simple in SQL sum(salary) but I have made some dimensions and facts using ...
1
vote
1answer
26 views

Why would I not specify ROWLOCK to get rid of page locks?

I have a query that goes something like this: SELECT TOP (1) * FROM MyTable WITH (UPDLOCK, READPAST) ORDER BY SomeColumn ASC; This answer says that it's hard to say for sure but it will probably ...
0
votes
1answer
22 views

How to import large sql file in postgres?

Trying to import sql file around 8GB using these commands sudo -u postgres psql yourdb -f my_file.sql sudo -u postgres psql yourdb < my_file.sql sudo -u postgres cat my_file.sql | psql yourdb ...
1
vote
3answers
64 views

500 databases or 1 database with 500 tables or just 1 table with all the records? [on hold]

I currently have an application that is used by a single end customer. For ease of discussion assume the application only needs a single database table for all records. I now need to support ...
1
vote
1answer
19 views

Slow Query with LIMIT

We have this query: SELECT "messages".* FROM "messages" WHERE "messages"."account_id" = 1 AND "messages"."status" = 'unread' AND (created_at >= '2014-04-24 01:00:00.000000') ORDER BY id DESC It ...
0
votes
3answers
74 views

Why does this query take 32 sec to execute?

I keep my history records in one table and my pertinent data in another. I want to grab only the files from myfiles that currently have a given status recorded in statuses (ie, the latest status is ...
1
vote
1answer
22 views

Transforming a relation to 3NF

I'm trying to transform the following relation to 3NF but can't figure it out. The relation is (a student can only have 1 major): STUDENT (StuID, StuName, Major), Primary Key = {StuID} I tried the ...
0
votes
0answers
17 views

SQL Server Replication Snapshot Agent login fails

I have setup TRANSACTIONAL REPLICATION from ServerA to ServerB ServerA = Primary Server = SQL Server 2008 R2 Enterprise ServerB = Secondary Server = SQL Server 2008 R2 Standard Edition. I ...
0
votes
0answers
18 views

Size of Postgres database growing

Our Postgres database is currently at about 68G of size and growing at a rate of 6G/month. I am investigating ways how to scale the database. Would be nice if someone can give some advices as I am ...
0
votes
0answers
8 views

Trying to connect to AWS RDS from an AWS EC2 instance

I am trying to connect to an AWS RDS instance from an AWS EC2 instance. I ssh into the AWS EC2 instance, and then issue the following command: mysql -h xxxxxx.ciy4oapkpytm.us-east-1.rds.amazonaws.com ...
1
vote
1answer
31 views

Merge Problems SQL Server

I'm trying to create a procedure that will take the values from a temporary table, and load them into another table. The second table has a composite unique constraint across its three columns (Not ...
0
votes
1answer
17 views

Replication not updating XML Schema collection

So the problem I'm facing is that replication from our Main instance to our Data Warehouse instance is failing because it isn't picking up XML schema updates. Thus, when it tries to bulk copy the data ...
0
votes
1answer
26 views

MySQL slave stuck at 'System lock' most of the time, high CPU usage

Let me describe what we are facing now: We have a MySQL Master-Slave, Row Based Replication setup and at the moment, the slave is stuck with a perpetual System Lock. The Master is an active server ...
0
votes
2answers
36 views

Can I permanently lock a MySQL table to prevent inserts

I have a complicated situation where I would like to prevent inserts into a MySQL table, but keep it open for edits/updates to existing data. Can this be done? I've searched around here, but could not ...
0
votes
0answers
11 views

Why would a MySQL 5.6 slave's AUTO_INCREMENT value be different from the 5.1 master's?

I have a MySQL 5.6.21 slave that is replicating from a MySQL 5.1.73 master, and I noticed that for two of the tables, the 5.6.21 has slightly ahead AUTO_INCREMENT values than the 5.1.73. I have ...
1
vote
2answers
31 views

Primary Key choice on table with unique identifier

I'm reconsidering my choice of Primary Key on a table, and would like some input. Some context: We are building a REST API, where clients access "Assets" identified by a GUID. So, the table for ...
1
vote
2answers
92 views

WITH Clause UNION Issue

WITH [ProgressInvoicesPeriodCost] AS ( SELECT ProgressInvoices.ProjectId , ProgressInvoices.PeriodId , SUM(ProgressInvoiceDetails.TotalThisInvoice) AS TotalThisInvoice ...

15 30 50 per page