2
votes
1answer
98 views

Can I grant multiple remote LocalService accounts access to a SQL Server database?

I am designing a multi-environment Windows-based software product that will extensively employ Windows services running as LocalService to perform data access operations. All of the data access ...
1
vote
1answer
44 views

How to determine efficacy of index on child side of foreign key

Given a parent-child relationship between two tables, such as: table ORDER order_id PK (already indexed) order_name table ITEM item_id PK (already indexed) order_id (FK to ...
0
votes
1answer
839 views

MySQL is inserting “” as 0 in decimal fields. How to stop that?

The fields are nullable, so they do allow nulls. Why would MySQL convert "" to 0 instead of NULL? Is there a way to force it to be NULL instead?
1
vote
0answers
21 views

AlwaysOn SQL Agent Jobs [duplicate]

We are running AlwaysOn on three replicas. The primary and first secondary are synchronous for failover purposes. The second secondary is a read-only asynchronous server for reporting. The only thing ...
1
vote
0answers
105 views

Why database replication fails when database mirroring is broken?

I'm trying to understand what effect database mirroring can have on replication in SQL Server 2008. Here is current environment: (don't ask me why it was done this way or to change it) Server A: SQL ...
12
votes
1answer
521 views

What is the cause of this problem with CONVERT()?

Consider the following two statements: PRINT CONVERT(NUMERIC(38, 0), 0x0100000001, 0); PRINT CONVERT(NUMERIC(38, 0), 0x0100010001, 0); Both statements return -1; isn't that incorrect since the ...
1
vote
1answer
3k views

How do I set up a Derived Column Transformation to get row number in SSIS 2014?

I am trying to import a ragged right flat file. I am wanting to import the file as one column and used Derive Column Transform to add a row number to each row. I would like to end up with a column ...
0
votes
0answers
9 views

Secondary Clustered DTC will not work when Primary goes offline - SQL Server Issues [duplicate]

I've been working on setting up clustered environment with a two new DTC roles, DTC1 and DTC2. I set up DTC1 which allows both clustered VM's and SQL Server Instances to function correctly. However, ...
0
votes
0answers
276 views

PostgreSQL replace primary key and converting non-serial to serial type [duplicate]

I'm basically building my own version of phpPgAdmin (if I get good enough to make it good enough I'll post it on a repository hosting service) and currently I'm revising my primary key tool to replace ...
3
votes
0answers
81 views

Are there any outstanding critical security issues for Sql Server 2000?

Are there any outstanding (unpatched) security issues for Sql Server 2000? This isn't really for me: I moved on from Sql Server 2000 long ago. However, when answering questions here and (more likely) ...
1
vote
0answers
53 views

How to use the value from record like as varchar?

I'm trying update a old table with result of selec for another tables but get a error using this sintaxe (e.g.): DO $$ DECLARE _roles refcursor; _onerole varchar; _record RECORD; ...
2
votes
1answer
348 views

Sql Server 2008r2 Replication Snapshot Agent Hang

I am setting up a new merge publication, but I can not get the snapshot agent to run successfully. In fact, I can not run any snapshot agents for any of the other publications on this server now. ...
1
vote
3answers
1k views

How to see percentage of existing values for all columns in mysql table?

I have three large-ish tables (~20 columns each) and I want to know what percentage of rows have a value for each column. For instance, this table: ID | TITLE | SERVING | NOTE ...
3
votes
1answer
414 views

Secondary Clustered DTC will not work when Primary goes offline - SQL Server Issues

I've been working on setting up clustered environment with a two new DTC roles, DTC1 and DTC2. I set up DTC1 which allows both clustered VM's and SQL Server Instances to function correctly. However, ...
2
votes
2answers
152 views

Does changing a Postgresql table's tablespace compact it like “vacuum full” or “cluster”?

I need to reclaim disk space in a table in a Postgresql 9.3.2 database to be used for other tables. The standard suggestions to accomplish this are: "VACUUM FULL" or "CLUSTER" or copy the contents ...
1
vote
1answer
61 views

Mysql replication problem after export/import on already working replication

I have 2 databases in master - slave replication. I had some errors in the replication due to inserts in the slave, so I corrected it and executed: stop slave; set global sql_slave_skip_counter=2; ...
0
votes
1answer
173 views

Orig DB = No Corruption, Backup/restore = Corruption?

We are setting up offline DBCC checkdbs on an offline server so we can still do our checks, but not interfere with production. When we backup the Master DB and restore it (even directly on a local ...
1
vote
0answers
277 views

Please help me resolve this SQL mirroring error which comes when I ‘Start’ the mirror. The network address can not be reached or does not exist

Here are all the steps I took to build the mirror for the db MIRRORDATABASEI am using separate physical servers for mirroring. I ran: ALTER DATABASE MIRRORDATABASE SET TRUSTWORTHY ON to ensure ...
1
vote
2answers
1k views

How to set the sequence to the last used id for all tables in Oracle?

I'm working on an open source elearning system called Moodle which usually uses MySql or Postgresql, but can also use MSSQL and Oracle. A client wishes to use Oracle, which I have limited experience ...
1
vote
2answers
520 views

How to calculate a total by comparing current and next row

I have a table with some rows: I have a few questions to accomplish the task altogether. Is it possible to calculate total of transmitted and received based on checked_date and ip and connect_time ...
-2
votes
2answers
35 views

creating tablespace failed!

I've restored a db and its failed with many errors. When I look into the log file, I found that the tablespace does not exist. So when I try to create a tablespace in plsql am getting the following ...
-2
votes
1answer
39 views

Allow me to transpose rows into columns [duplicate]

I have a table data as shown below. +---------+----------+-------+--+ | Name | Semester | Score | | +---------+----------+-------+--+ | John | Sem 1 | 80 | | | Michael | Sem 1 | ...
3
votes
2answers
2k views

Getting the number of Saturdays and Sundays in a month

I am trying to get the number of Saturdays and Sundays for a given month represented by an end_date and a start date. I have been trying to understand the algorithm in the SO question here . I have ...
10
votes
2answers
410 views

How to measure or find cost of creating a query plan?

I have a typical case where parameter sniffing causes a "bad" execution plan to land in the plan cache, causing subsequent executions of my stored procedure to be very slow. I can "solve" this problem ...
0
votes
1answer
439 views

Remove duplicate terms from column

This the tags column where all terms should be listed only once. Would like to remove all additional words from this column. For example the below contant: Lakshmi Bar & Restaurant, Dining ...
1
vote
2answers
175 views

Unable to describe table in oracle

I'm trying to get the description of a table in oracle because I need to know what foreign keys does it have and which tables they refer to. I'm using desc but all I get is "ORA-00900: invalid SQL ...
3
votes
2answers
2k views

Multiple named Instances with Always On

We have a two-node multi-subnet Windows Server 2012 R2 cluster in two regions. We have three named SQL Server 2012 standalone instances on each node and are in the process of setting up Always On ...
1
vote
1answer
445 views

Stop never ending backup in SQL Server 2012 Express

Our production database log file has grown to consume all disk space on our server. I know it's bad practice but I want to be able to shrink it in order to restore the service as soon as possible. ...
0
votes
1answer
248 views

mysql ERROR 1248: Every derived table must have its own alias

-- -------------------------------------------------------------------------------- -- Routine DDL -- Note: comments before and after the routine body will not be stored by the server -- ...
1
vote
1answer
209 views

SQL Server 2008 R2 memory on 64 bit OS

My application server is running SQL Server 2008 R2. OS is Windows 2008 R2 with SP1. Total physical memory is 16 GB. When I looked into the Task Manager, the sqlservr.exe was using "6,734,588 K". ...
1
vote
1answer
1k views

Postgresql memory usage [closed]

I'm trying to optimize my database (its quite heavy), I have external server only for it with 6GB RAM. I was looking for settings and saw that WORK_MEM is setted to 36MB. I thought it is possible just ...
1
vote
2answers
131 views

Application testing: using multiple users in Oracle instead of mem H2. How to make it as fast as possible?

I decided to stop using H2 for obvious reasons (I have Oracle on production, compatibility mode is a fake). So, I wrote simple test framework which for each test in my application does the following: ...
0
votes
1answer
35 views

Update different oracle database from different oracle database

I want to update a CLOB column in B Oracle 11g database using a CLOB column in A Oracle 11g database located in a different server. What are the different ways to do that? and which is the best and ...
1
vote
0answers
214 views

To configure MySQL Enterprise Workbench for Incremental Backup with Online Backup option

Could not acquire management access for administration RuntimeError:Could not initialize WMI interface: Workbench.wmiOpenSession():Could not connect to target machine. When i am trying to configure ...
3
votes
0answers
77 views

Can CTE sub-statements be prevented from executing at all?

Through this strategy, time consumed by queries for my application have dropped to extreme lows; however, some queries consume more milliseconds than necessary. The reason why is that upon ...
10
votes
3answers
1k views

Email address unique or primary key?

I am a newbie in databases. I read around and found out that it's probably not a great idea to use email address as primary key because string comparisons are slower which effects performance in ...
0
votes
1answer
111 views

Why MySQL imports only one record for each table?

Code shows some info: $ cat /etc/*-release | grep VERSION 6:VERSION="12.04.5 LTS, Precise Pangolin" $ mysql --version mysql Ver 14.14 Distrib 5.5.40, for debian-linux-gnu (x86_64) using readline ...
0
votes
2answers
69 views

DBO execute returns true but doesn't execute

I am having a bit of trouble with some of my code. This is the code: $STMT3 = $PDO->prepare(' INSERT INTO `lotteries_entries` (steamID, lottery_id) VALUES (:STEAMID, :ID); UPDATE ...
0
votes
1answer
240 views

ORA-08102 while creating a view

I am learning PL/SQL programming. I'm trying to create a view with the following statement: create or replace view viewName as select ID from employees; The view creation throws the following ...
0
votes
1answer
112 views

MongoDB replica index filled hard drive stuck in fatal

I have a 3 server replica set deployed by Googles 1 Click Deploy functionality, the problem is I created an index on a particularly large collection (100,000,000 documents) and it consumed the whole ...
2
votes
1answer
119 views

Sql Server 2014 IO Resource Governor

I've have configured the resource governor for cpu, memory, and IO. I have my dbcc db checks running under a pool and workload that only allows 10% of memory and cpu, and only 100 IOPS. I have also ...
-3
votes
0answers
42 views

The SQL server Log folder is expanding because of the SQL Dump files (what to do with it ?) [duplicate]

The "Log" folder SIZE in the SQL server root directory (X:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Log) becomes too big , ~80 GB. When I checked it, I see that there are a lot of ...
-1
votes
1answer
2k views

The SQL server Log folder is expanding because of the SQL Dump files (what to do with it ?)

The "Log" folder SIZE in the SQL server root directory (X:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Log) becomes too big , ~80 GB. When I checked it, I see that there are a lot of ...
1
vote
1answer
2k views

What are the optimal mysqldump settings?

After some search I ended up with the following settings: mysqldump\ --host=localhost\ --port=3306\ --databases ****\ --user=****\ --password=****\ ...
1
vote
1answer
150 views

Best way to document Dwh views [closed]

I works in a company that provide Dwh views as an API for external Customers (We use MS-SQL 2008 & 2012). every once in a while we release new views and updates the existing views. We have ...
1
vote
2answers
275 views

Shrink logs in between user transaction in SQL Server

I have a database where there are like billions of rows and I need to delete the data based on some condition. Initially I was trying to delete the code in one transaction and log starts growing to ...
7
votes
3answers
1k views

Full text search results in a large amount of time spent in 'FULLTEXT initialization'

I'm currently trying to run some queries against a data dump of Stack Overflow's comments. Here's what the schema looks like: CREATE TABLE `socomments` ( `Id` int(11) NOT NULL, `PostId` int(11) ...
1
vote
2answers
299 views

call mysql function by string name

Can i call a mysql stored function from another mysql stored function or stored procedure, passing a string to the first function which is the name of the second function to call. I.e choosing the the ...
0
votes
1answer
220 views

Difference between alert log and archive log in oracle databases

I don't know anything about oracle databases. Actually I'm asking this question for my friend (He currently doesn't have access to internet!). He wanted to know that what's the difference between ...
0
votes
1answer
38 views

How to know the problem when i make this Full Backup Scenario?

i'm working new on database administrator and i have some questions if i want to make SQL full backup database every Saturday at 6:00 AM and for some reasons the device was shutdown the questions are ...

15 30 50 per page