# All Questions

403 views

### SQL Server 2008: NULL SID for WINDOWS_USER in sys.database_principals

Has anyone ever seen anything like this before? I have a WINDOWS_LOGIN AD user that has a record in sys.server_principals with a SID and can login fine. But in a few databases, they have a record in ...
4k views

### SQL Server 2008: The database [dbName] is not accessible

I got this error from another person and I've run out of ideas. I can access this database without any problems, the database is in MULTI_USER mode, the person receiving the error is a user, etc. The ...
63 views

### What does this code do?

I found one of my queries was over written with following code: SELECT cp.objtype AS ObjectType, OBJECT_NAME(st.objectid,st.dbid) AS ObjectName, cp.usecounts AS ExecutionCount, ...
355 views

### Can I reorganise index on a sql server 2005 database without performance hit on production server

I would have preferred to run online index rebuild instead but our production sql server (2005) is standard edition. Hence I think I am left with reorganising index and update statistics after that. ...
59 views

### Should I put followers_no & following_no & product_no & last_login and etc in the user table? Won't updates cause fragmentation on the table?

I have a table for users in a social networking site. I want it to be efficient from ground up. If I put mentioned fields on the table then I have to update user's table on each changes. Should I have ...
4k views

### How do I find out the “redo log file max size” in Oracle 11R2

I'm working with Oracle 11R2 and I want to see the max size of my redo log files (I didn't install Oracle so I'm not aware of the configuration). I have searched the Internet but all I have found ...
231 views

### How do I allow remote connection in SQL Server 2008 Express

I've just installed SQL Server 2008 Express. But when I try to connect to database engine via SQL Server Management Studio I get "A network-related or instance-specific error occurred while ...
68 views

### Log Shipping Monitor Stored Procedure returning Null

I have log shipping setup. When I EXEC sp_log_shipping _monitor it returns all null values even though log shipping appears to be working fine. last_restored_file NULL last_copied_file NULL
373 views

### SQL Server 2008 DB size grown huge

I am a .net developer and not a expert in database. I have a application running with SQL server 2008. Yesterday there was issue with a certain query getting executed in infinite loop and which caused ...
185 views

### SQL Server 2008 Database growth issue.

I am a .net developer and not an expert database administrator. I have an application running on SQL server 2008. Yesterday there was an issue with a certain query getting executed in an infinite ...
2k views

### PostgreSQL 9.1 vs MySQL 5.6 with InnoDB ? Which is better for scaling?

PostgreSQL 9.1 vs MySQL 5.6 with InnoDB. I do know that PostgreSQL offers better SQL features. I am currently using MySQL 5.6 lab release (the one with InnoDb full text search feature)(not in ...
410 views

### How to break out of error loop in transactional replication?

I was running some simple tests on a publisher and subscriber on the same instance: I inserted 50,000 rows into a published article and the data was correctly pushed to the subscriber. I ...
360 views

### Are these MySQL queries efficient?

It took me quite a while to learn how to deal with timestamps in MySQL and I think I accomplished my goals, but I want to double-check two things: 1) Are these doing what I expect 2) Are there ...
241 views

### Oracle hint failure

When I run the PL/SQL block after the CREATE statement, I receive the duplicate key error I would expect if I did not add the hint. Any ideas to why the hint does not work? CREATE TABLE Sandbox.Clue ...
5k views

### Questions about handling NULLs and empty strings in nvarchar and numeric fields

I understand that questions similar to these pop up often around here. I have searched before posting these but I didn't find any QA threads that completely answer my questions. In a table, I ...
330 views

### Copy database fails while trying to copy login

I'm trying to copy a database from a server that lives in a unique domain, call it AMCO. The destination server, which is on domain BCO, is running sql server agent, and as far as I can tell ...
1k views

### SQL Server 2012 is putting [brackets] around Table and Column Names

Is there anyway to turn that off? I'm unable to find anything in options, and they're really a distraction.
2k views

### How to detect compatibility errors - SQL Server 2012

I am changing a database's compatibility mode from 90 (SQL Server 2005) to 110 (SQL 2012) and I am wondering at what point would I see errors from breaking changes if there are any. I ran Upgrade ...
1k views

### Atypical problem with ORA-01445

I have problem with following query Q1: SELECT ADDRESS.STREET FROM MYSALES.MYADDRESS ADDRESS INNER JOIN MYSALES.MYCOUNTRY MCOUNTRY ON MCOUNTRY.MYCOUNTRY_ID = ADDRESS.MYCOUNTRY_ID INNER JOIN ...
430 views

### Partition Key questions in SQL Server 2008

We are planning to use table partitioning for our database based on an integer column. I have read about it on MSDN at http://msdn.microsoft.com/en-us/library/ms190787.aspx and have few queries. a) ...
356 views

### compare/sync databases from different computers

I have a server online and I have installed MySQL and database A server on it. I also have mysql installed on my local computer and have a copy of database A on it. I want to compare the contents ...
599 views

### Why are there Victimless Entries on the Deadlock Graph?

I am trying to learn how to analyze SQL Server 2008's deadlock graph, and I'm finding alot of entries with an empty <victim-list> node. I don't understand what these entries represent: if there ...
1k views

### SQL Server 'Create Database' statement. How to inherit autogrowth settings?

I am using SQL Server 2008 R2 and creating databases through continuous deployment. In our system, the default 1Mb/10% autogrowth settings in SQL Server work badly with our data. Particularly as we ...
1k views

### Why I cannot let EXPLAIN update statements?

I can imagine that it's actually more important to explain SELECT statements, but I wonder why there's no possibility to use EXPLAIN on UPDATEs/INSERTs. I may use a WHERE-statement in an UPDATE where ...
65 views

### Should Crystal Report be allowed for certain employees for production database?

I am talking about production database. There are couple of people who use crystal on daily basis for various types of reports. Some use it to just peak at the data, other generate reports of it. ...
223 views

### PostgreSQL : Is this because of locks(row level)?

I have a table with approximately 2.1 million tuples. Which has latitude and longitude columns. I am trying to convert this into a geographic type (point with SRID). The function(procedure) I have ...
128 views

### CREATE ASSEMBLY - EXCEPTION_ACCESS_VIOLATION

I am trying to create an assembly on my SQL Server 2005 server. Here is what I am using: CREATE ASSEMBLY [SQLCLRTest] AUTHORIZATION [dbo] FROM 'path\to\my\file.dll' WITH PERMISSION_SET = ...
1k views

### sp_execute expects parameter '@handle' of type 'int'

I'm trying to check in a stored procedure if a table exists in my destination database. If it does not then I will create the table useing the information_schema tables from the source database. ...
485 views

### COUNT with set DIFFERENCE and UNION

Fairly simple question that I can't seem to find an answer to - I'm working with unions and differences, and I would like to perform a COUNT on the results. Currently I'm having to pipe out to a file ...
482 views

### Merge replication - can't create snapshot – timeout

I have a SQL Server 2008 database, and I need a merge replication because I want to sync with mobile devices afterwards. So I created a replication but when it comes to start the snapshot agent, the ...
66 views

### Verify if I can use a given directory

Admin creates an Oracle directory: CREATE OR REPLACE DIRECTORY EXAMPLE AS '\\server\share\test'; GRANT READ, WRITE ON DIRECTORY EXAMPLE TO JOHN; Admin can test whether the directory exists: SELECT ...
1k views

### DB2 LOAD data into table - Interpreting the error messages

I encountered some constraint issues when loading data from file into table ** SQL3109N The utility is beginning to load data from file "xag". SQL3500W The utility is beginning the "LOAD" phase at ...
408 views

### single select vs multiple selects using limit and offset

Working on a fairly high volume site. There are some tables example - the customers table which gets hit a lot. The problem We are writing a piece of code that selects a bunch of customers and ...
4k views

### How to manage millions of users?

I am about to launch something really big. I need to prepare my server and database. I would like to group each set of 100,000 users in separate user tables but I do not know how to associate one ...
5k views

### SQL Server 2012 installation failure An error occurred for a dependency of the feature causing the setup process for the feature to fail

I am installing SQL Server 2012 Developer (from ISO image written on DVD), my machine has Windows 7 (Edit: Windows 7 with service pack 1) and it already has SQL Express and SQL 2008 R2 Express ...
443 views

### How can we uninstall multiple instances of SQL Server 2008 without restarting the O/S?

How can we uninstall multiple instances of SQL Server 2008 without restarting the O/S? SQL Server installer is failing with error: Server needs to restart after one instance uninstalled. It is ...
116 views

### Which option do I have to modify to see more records without press q

I'm connected remotly to my database server with cygwin in full screen. When I query my database with select id, name from table limit 27; I get 27 records and I can do a new query seeing the ...
747 views

### Is there any way to speed up a query with 3x UNION on the same large table?

Assuming that the following query is legitimate and executes successfully, is there any way to speed it up? SELECT foo from T1 --T1 is a huge (>5e6 rows) table with no indexes UNION SELECT bar ...
171 views

### sql server down bad things happens

Following Situation: You have a Database with very high transactions, the Database is about 4100 GBs The Recovery Modell from your Database is full Every week you make a full backup from your ...
226 views

### Access 2000 database rapid growth

We have an Access 2000 format database running in Office Access 2003. We have a problem with the size when I merge the database; the size is about 250 MB. Two days later, the size has ballooned to ...
183 views

### Oracle function based index is not used in query

I cannot figure out why the following is not working as I expect it : CREATE TABLE table1(table1_id INT NOT NULL PRIMARY KEY, col1 INT NOT NULL, val1 VARCHAR(50)); CREATE INDEX ...
243 views

### Oracle Streams Setup Error

I am running Oracle 11g on a Linux box. I am trying to run the following command to set my streams user grants and other authorizations: BEGIN DBMS_STREAMS_AUTH.GRANT_ADMIN_PRIVILEGE( grantee ...
207 views

### Msg 14027, Level 11, State 1, Procedure sp_MSrepl_addarticle [table] does not exist in the current database [closed]

Before setting up SQL Server snapshot replication, I backed up the database from ServerA and restored it to ServerB. Both servers are running SQL Server 2008 R2 SP1. In trying to setup snapshot ...
695 views

### Allow user to do anything within his own schema but not create or drop the schema itself

I have created a schema in SQL Azure and granted the following permissions to a database role: CREATE ROLE myrole AUTHORIZATION dbo; EXEC sp_addrolemember 'myrole', 'myuser'; CREATE SCHEMA myschema ...
283 views

### simulate sequence on mysql in preparation for move to oracle

I've been developing an application against MySQL while a new development server has been slowly being set up. The new dev server will use oracle, and since we're getting close to it being ready, I ...
193 views

### How unsafe is it to change the data source of repl_distributor on a publisher

I have a long story that I will condense to a few bullet points that leads up to my question Reporting Server (SQL 2008) is distributor/subscriber cluster for a SQL 2000 Transactional Publication ...
404 views

### Mysql: Tell InnoDB to keep a specific table or database out of pool/cache?

I have some tables that are used primarily to keep historical data, or that are only used once a day. I do not want any operations on these tables to disrupt the more important tables present in ...
489 views

### SQL Server 2008 R2 Service Broker Troubleshooting

I set up Service Broker between two databases on separate instances, one on a 2008 R2 Cluster the other on a separate box also 2008 R2. I have gone through the process of setting up all the objects ...