0
votes
0answers
2 views

Can look up tables used to store primary keys?

I am in the designing phase of the database which deals with online shopping. That is primarily stores, categories, products etc. The business consultant for the project has suggested to use Look up ...
0
votes
0answers
8 views

Database model(newbie question)

I would like to know if this is a good database for a blog. 1. Data model for a blog system that has the following characteristic:  Users can register  Users can have different roles, eg. author, ...
1
vote
1answer
10 views

Unique key constraint in mysql

I have a table in mysql which has a many columns,one of them being time.I want HOUR(time) as unique key for the table,that is there should only be one record for every hour.How can i do it?
3
votes
2answers
19 views

Why SQL Server recognize the view column as nullable if the underlying column is in without any aggregates?

I have a table CREATE TABLE [dbo].[Realty]( [Id] [int] IDENTITY(1,1) NOT NULL, [RankingBonus] [int] NOT NULL, [Ranking] AS ([Id]+[RankingBonus]) PERSISTED NOT NULL .... ) And a ...
1
vote
1answer
12 views

How to create and populate a PostgreSQL table from CSV automatically?

I am new to database management and we are using PostgreSQL. All I need to do is to migrate CSV files (corresponding to around 200 tables) to our database. Manually creating tables for every CSVfile ...
3
votes
0answers
34 views

why “select” work in mariadb but doesn't work in mysql

set @row_number = 0; SELECT * FROM (SELECT (@row_number:=@row_number + 1) AS num, id, tbl_user_id, title, description, length lengths, ...
1
vote
0answers
5 views

The service name is invalid while starting EM on oracle 11g on windows

I am trying to start EM on oracle 11g on Windows. When I performed emctl start dbconsole It shows The service name is invalid more help is available on net helpmsg 2185 and when I wrote net ...
0
votes
1answer
10 views

Oracle: How do I set a context variable?

Here's a user context, and a package that sets a value in it. create or replace context t1_ctx using t1_pkg accessed globally; create or replace package t1_pkg as procedure setx; end t1_pkg; ...
0
votes
0answers
7 views

Oracle Client trace not generating

I'm using Oracle Client 12.1.0.2 and I need to generate client trace because im unable to connect my sql developer to the database server. However, i'm unable to generate the trace. Here is my ...
0
votes
0answers
15 views

Postgres search and replace

What is the difference between the search in search and replace, (the replace function) and full text search (tsvector) in Postgres? Or, put another way, can tsvector be used in search and replace ...
1
vote
0answers
10 views

sql server on big machine falls over inexplicably

We've been doing some throughput testing with our web application. The production application resides on a couple of machines in the amazon cloud, consisting of a web server and a database server. ...
-2
votes
0answers
24 views

Store items with statistic data with ability to select daterange and sorting [on hold]

So I have DB with items tables. Let say it is domains and pages. It grows over time like 5000 objects a day now for each table. Each item has some stats numbers: a1, a2, a3. I need to aggregate stats ...
0
votes
2answers
12 views

PostgreSQL user only drop some tables

Is there a way to have a PostgreSQL user that can drop all but specified tables? We need the user to be able to drop some tables but not all. It would be preferred to be able to use something like ...
-1
votes
0answers
22 views

GIS Databases: What should I expect?

I'm a DBA who has inherited a series of databases backing a GIS platform. The databases are on SQL 2008 R2 and the mapping platform is ESRI ArcGIS. The previous "DBA" was a GIS person who took a few ...
1
vote
0answers
8 views

SSMS Client Errors

I am running SSMS 11.0.5646.0 on a Windows 7.0Pro desktop connected by UTP directly to same network switch as my development server (Windows 2008R2 Standard, SQL 2008R2 SE with SP3). All with in the ...
3
votes
1answer
58 views

missing indexes on distributor database

Looking for missing indexes on my distributor databases, I surprisingly find too many. the tables that need to be indexed are generally 3: MSrepl_commands MSlogreader_history ...
-1
votes
0answers
29 views

Validating a format [on hold]

I am trying to create a procedure that would validate the format of the file and give me errors if the format is wrong. i have a data dictionary that has al the parameters in one schema and the data ...
0
votes
0answers
28 views

testing script to update the database

When I run the following code in psql the following error appears: Code CREATE OR REPLACE FUNCTION fct_isslave ()   RETURNS SETOF character varying AS $ BODY $ BEGIN     RETURN QUERY SELECT CASE ...
0
votes
0answers
13 views

Amazon RDS CPU is about 55-65% after optimizing some tables (Mysql)

I was having high RAM consumption and, looking for a solution, I executed the script mysqltunner to monitor possible optimizations in the Mysql database. Its first advice was I had to run OPTIMIZE ...
0
votes
0answers
19 views

Different ways to log the DML operations being performed, along with the hostname (or some type of unique ID) performing the said operations?

What are the different ways to log the different DML operations that are being performed, along with the host performing them. I do not wish to use triggers as they are costly. I considered SQL Audit ...
0
votes
1answer
22 views

Error on simple Select Statment: Subquery returned more than 1 value

When I query a table select * from tableName it return error msg Msg 512, Level 16, State 1, Line 2 Subquery returned more than 1 value. This is not permitted when the subquery follows =, ...
0
votes
0answers
3 views

mongodb sharding by id, based on the first 8 characters

we have a database full of grams,and they're organised in a tree fashion, with parent references, like so: _id: gram:a;p1:as;p2;astr;p3;astrot;p4:astrotur;word:astroturf we would like to chunk the ...
0
votes
0answers
17 views

How to drop invalid Java classes from Oracle?

I tried to load some jars into my database, but I think I messed up something, because I tried as DBA and then with some oracle user... This was my first command: call dbms_java.loadjava('-genmissing ...
1
vote
0answers
23 views

Queries running slower on production (failover cluster) than on homologation env [duplicate]

I have a Windows Server 2012 cluster with two nodes running SQL Server 2012 for production and a Windows 2012 single server with SQL Server 2012 for homologation. I just restored the production ...
-1
votes
0answers
13 views

How can i limit .ldf file size when database is configured in always on availability group [duplicate]

How can i limit ldf file size when database is configured in always on availability group.
0
votes
0answers
11 views

PostgreSQL WAL recovery not working due to missing WAL

I am using pgBarman for PITR recovery. Now it's a bit of a crisis, because the Barman backup and the WAL archive seems like it cannot be recovered. We're running PostgreSQL 9.3.6 and latest stable ...
1
vote
2answers
46 views

Copy values to another column - ORA-01481: invalid number format model

I want to copy values of col1 NUMBER(13,4) column to another newly added col1_temp VARCHAR2(50). To perform this action I build the following update query: update table1 set col1_temp = to_char(col1, ...
0
votes
0answers
5 views

MobiLink: How to execute custom SQL via Sybase Central's MobiLink-Plugin during creation of consolidated database

When migrating a normal database to an consolidated database, Sybase Central's MobiLink plugin is offering to direct apply changes to database and/or write it to a set of scripts which can be fired ...
-2
votes
1answer
20 views

Selecting different variables depending on another variable [on hold]

I must make a new table with filling up fields depending on a variable. If type = holder, then I should take the enterprise field, if type = requester, I should take the name. How do i write this in ...
5
votes
2answers
67 views

Copy data from multiple databases to a central database for reporting and analysis

I have more than 8 databases and all are in a SQL Server environment. I need to extract data from specific tables (more than 50 tables) of each database and dump into a central database for reporting ...
0
votes
0answers
11 views

sql replication across domain [on hold]

i am replicating a database from one domain to another.I was thinking of creating a local windows account at publisher and subscriber and have permissions on the snap shot folder.
1
vote
1answer
17 views

Records not getting replicate in Mysql 5.5 to MySQL 5.6

1. I have a MySQL 5.5 server (community edition) on one Linux server which is master. 2. I have a MySQL 5.6 server (community edition ) on another Linux server which is slave. ...
2
votes
2answers
35 views

MariaDB server with 80K-100K DataBases

BACKGROUND : We have an environment where there is a new DB created almost every minute and it will be Dropped after few days or weeks (maximum 1 month) such that the space used is about 300GB~400GB ...
0
votes
2answers
44 views

Mysqldump treats some table as View

When doing a mysqldump, some tables are being skipped because mysqldump treats them as View rather than Table although they're 100% tables. So for some tables it looks like -- Retrieving table ...
0
votes
1answer
13 views

Of the multiple cnf files in /etc/mysql/conf.d/ dir, which would be the last one to be read (and will enventually take precedence)?

For some reasons (and only for some days to come) we are going to have 2 cnf files in /etc/mysql/conf.d directory, apart from the default one /etc/mysql/my.cnf. Now I know this can be disastrous, and ...
0
votes
0answers
14 views

SQL Express SA user has disabled [duplicate]

Hi we have an issue where our SQL Express has randomly disabled the SA account can I am able to connect to SQL as the local admin but it does not have sufficient access to re enable the SA account. ...
1
vote
1answer
28 views

Migrating from PostgreSQL to SQL Server

I have been tasked to migrate a database from PostgreSQL 9 to SQL Server 2008 R2, and I have found some issues I need to address. I have quite limited experiences with PostgreSQL I'm afraid. Most ...
0
votes
1answer
24 views

ms sql email function invalid syntax

sp_send_dbmail script. The error log shows "invalid syntax error". EXEC msdb.dbo.sp_send_dbmail @profile_name = 'PROFILE_NAME', @recipients = 'oops@wrongagain.com', @subject = ' Search for empty ID ...
0
votes
0answers
11 views

preparation for MongoDB Certified DBA Associate (study guide) [on hold]

I have a few years experience with SQL and passed Oracle Database SQL Certified Expert. Since two months I am in a DBA position for MongoDB. I worked mainly with Ops Manager. Almost no resources ...
0
votes
0answers
3 views

MobiLink: How to use a template for (table) scripts generated with MobiLink-Project-Plugin in Sybase Central

Is there a way to use templates for generating (table) scripts while using Sybase Central's MobiLink plugin? Let's have this scenario. The database consists of maybe 500 tables and inside ...
4
votes
1answer
39 views

Time dimension or timestamp in fact table?

Which would you use, and why? A separate time dimension or putting a timestamp in a fact table? Or perhaps both? I am building a data warehouse, and need to represent the time of day that events ...
0
votes
2answers
14 views

Optimization of variables in my.cnf (mysql) for Drupal

I just get a Dedicated Server running UBUNTU and I need to optimize the variables in my.cnf for Drupal 7. I understand that this is tailed job. Then Is there any tool to help me to do this? I am a ...
-4
votes
0answers
17 views

nested set model with multiple trees in multiple tables [on hold]

I have develop a MLM (multi-level marketing) system and so use nested set model in hierarchy users. A tree in MLM may have over 1,000,000 rows. It also should have multiple tables where each table is ...
2
votes
0answers
24 views

PAGEIOLATCH_SH and WRITELOG waits

We have a slow overnight process which I was asked to look at with the top waits being PAGEIOLATCH_SH and WRITELOG I have been collecting information from sys.dm_io_virtual_file_stats and can see ...
1
vote
2answers
30 views

DB select query performance when queried by partial key of primary key [on hold]

My primary key is composite - {a,b}. Will there be any performance gain if I query only {a} or DB is going to scan the whole table as there is no index only on {a}. How much storage overhead would be, ...
0
votes
0answers
6 views

What will happen if the primary shard for a mongodb database is down?

Well as I understand each database has it's primary shard, which is mostly the first shard added to mongodb cluster. And we know that spliter will not split chunks until the chanksize is less then max ...
0
votes
0answers
23 views

Error: At least one parameter contained a type that was not supported

In my case, there are two SQL stored procedures EnqueueMessage and ReadMessage. EnqueueMessage will save details and ReadMessage is for getting the messageData using Id. I have enqueued the message ...
0
votes
0answers
12 views

How to split delimited text in a column, fetch respective ID from another table and store in a new column [on hold]

I have a column i.e. p_author in sql server table named as sub_aminer_paper containing values of single or multiple authors having data type text separated by semi-colons i.e. ; Now I have to assign ...
3
votes
1answer
45 views

Best database design for website ranking

I am working on a project in which I need to rank websites in two way - Global rank and their rank in a particular country. There are various factors based on which both are calculated. There are ~200 ...
1
vote
1answer
36 views

Enforce a single NULL end date per foreign key value using an index

I want to implement a Check Constraint across a date range and foreign key. I have a table created as: Primary Key Foreign Key DateStart DateEnd The ForeignKey can appear many times in the table ...

15 30 50 per page