SQL Questions


Why does SQL server use no more than 500MB in RAM?
Why does sql server use no more than 500mb in ram? We have sql server 2005 running on server 2003 32bit with 32GB of ram and in the task manager under processes, Mem Usage sqlservr.exe is only using 430, 268 K. SQL Server min memory is set to use 25GB and max is set to use [...]

Answer Question   |  October 15, 2010  5:50 PM
CPU, RAM, SQL, SQL Server, SQL Server 2005, SQL Server memory, Windows Server 2003 32-bit
asked by:
585 pts.

Copy a SQL Binary Large Object (BLOB) from one database to another
Is there  a way to find out the name of a Blob stored in a database. I am trying the code below and apparently the name is not correct. SQL> Declare   2   tpsr Blob;   3   spsr blob;   4  Begin   5   Select ’8502′ into tpsr from ca90joetmp.spec_form_psr where spec_form_id = ’90710′;   [...]

Answer Question   |  October 14, 2010  7:01 PM
Binary Large Object, BLOB, SQL, SQL Database Transfer
asked by:
15 pts.

NTVDM encountered a hard error installing SQL 2000 onto Windows Server 2003
Trying to install SQL server 2000 on windows 2003 Server SP2 I got ntvdm encountered a hard error. Please help

Answer Question   |  October 14, 2010  2:07 PM
NTVDM, NTVDM HARD ERROR, ntvdm.exe error, SQL, SQL Server 2000, WEBPASS, Windows Server 2003 SP2
asked by:
5 pts.

SQL Server date format
Hello, I have a problem when i am inserting a string date ie 19/9/2010, which is stored in table as 9/19/2010.  i want to insert dd-mon-yyyy format. can i insert dd-mon-yy format,please replay. 

Answer Question   |  April 19, 2011  11:28 AM
SQL, SQL Server, SQL Server DateTime, String manipulation
asked by:
75 pts.

openquery no records returned SQL Express 2008
I run theis procedure against a link server (Quickbooks) It runs with no errors but will not return records. SELECT   *   FROM QODBC …Customer

Answer Question   |  October 10, 2010  10:33 PM
openquery, SQL, SQL Express 2008, SQL Query
asked by:
5 pts.

Help needed for connect statement using sqlrpg
Hi All, I need to do some checking in 2 different AS400 servers. I will read the data from one server(say local) then using connect type 2, connect to the other server(say remote), check the data and then returns back to my local server. I’m using sqlrpg for this and created 2 pgms for this. One will [...]

Answer Question   |  October 21, 2010  9:39 AM
AS/400, AS/400 Server, RPG, SQL, SQLRPG
asked by:
80 pts.

SQL Server Profiler
What numbers are considered high when using sql server profiler for reads, writes, and duration

Answer Question   |  October 8, 2010  10:00 PM
SQL, SQL 2005, sql 2005 Performance Issues, SQL Profiler, SQL Server, SQL Server 2005
asked by:
585 pts.

Upgrading from SQL Server 2000 to SQL Server 2005
We want to upgrade our SQL Server 2000 to SQL 2005. What should we watch out for and what is the actual procedure for the upgrade? Will it require another server or can the upgrade be done in place?

Answer Question   |  October 4, 2010  2:29 PM
SQL, SQL Server, SQL Server 2000, SQL Server 2005, SQL Server 2005 upgrade, SQL Upgrades
asked by:
1,110 pts.

Row by Row Stored Procedure in SQL Server 2008 R2
Hi All, hopefully someone will be able to help me here – i am nearly there but can’t get it right, i am trying to create a stored procedure that when runs will do a query and then send send an email out for each of the rows that it returns. e.g. if i have [...]

Answer Question   |  October 4, 2010  1:36 PM
SQL, SQL Server 2008, SQL Server 2008 R2, SQL stored procedures, Stored Procedures
asked by:
65 pts.

How to count the common column rows in the table for each column and row…..
I have a table and that table have columns like d1,d2,d3,d4……. d1      d2    d3    d4 ————————— 200   300   100  300 100   200   101  101 300   —    300  200 how can i display the output like below…  for each row…. ColumnD1 Count 200    3 100     3 300     4 Please help me on this,…………….i am new to the [...]

Answer Question   |  October 1, 2010  5:51 PM
SQL, SQL 2008, SQL Column Headings, SQL Server 2008
asked by:
15 pts.

Embedded SQL in RPGLE
I am trying to get some counts and totals from one file and put them in another. My SQL statement works fine with STRSQL, not in the RPGLE. Do I have to declare/set a cursor, exec sql and close the cursor just to put the total in another file? C/EXEC SQL C+ INSERT INTO outputfile [...]

Answer Question   |  September 29, 2010  2:02 PM
Embedded SQL, MySQL, RPGLE, SQL, SQL statements
asked by:
165 pts.

MSQL Auditing
Hello. I’m dot.net developer, and i’m working a lot with MSQL. My current task is when some user executes select query on database, i should ”catch” the query data. What do i mean is if select query is “select * from UsersTbl where UserID = 5″, i have to get  ’5′. Does somebody have any idea where to start??? Thanks [...]

Answer Question   |  April 9, 2011  8:25 AM
Auditing, dot.net, MySQL, MySQL query, SQL, SQL audit, SQL Query
asked by:
5 pts.

Production SQL Database has been restored with Old database backup
Dear Expert, I need your Advice, today in morning i run Symantec backup restore on SQL 2008 server where i overwrite the production Database with Old backup. Is there any way i can retreive the old Database until yesterday. i dnt have any backup of New database which i accidentally overwritten.   Please help me

Answer Question   |  September 27, 2010  4:33 PM
Exchange, SQL, SQL 2008, SQL Database, SQL Server 2008, Symantec, Symantec Backup Exec
asked by:
5 pts.

SQL Server I/O
Hello, we have a database that contains three tables. Each table has more than 25,000,000 rows in them. All three tables are in the same file group, array, and drive. Our daily Avg physical I/O is 1,000,000. Our users are complaining that the system is slow daily. Everytime a user writes to any of thos [...]

Answer Question   |  September 24, 2010  8:36 PM
Average Disk Queue Length, SQL, SQL Server, SQL Server 2005
asked by:
585 pts.

SQL RPGLE – How to override data set data structure at run time
I currently have an SQL RPGLE routine that receives a SELECT statement as a parameter and then fetches the data set into a data structure based on the file. This only works over a single file as the datastructure is created at compile time and has to be based on filea. I would like to [...]

Answer Question   |  September 23, 2010  1:43 PM
iSeries, RPGLE, SELECT statement, SQL, SQL Select statement problem, SQLRPGLE
asked by:
20 pts.

Migrate MYSql database to SQL 2005
We are looking to migrate from MySql to a full blown iteration of SQL 2005. Are there tools in place that will allow us to migrate our data and tables or are we on our own for getting our data into the MS database?

Answer Question   |  September 21, 2010  3:14 PM
MySQL, MySQL Database, MySQL functions, SQL, SQL 2005, SQL Server 2005, SQL Server migration, Windows
asked by:
9,815 pts.

Testing RPGSQL for the number of records.
I need to update file A if I can match a record in file B using an SQL statement. (IE: is Work Order # 5 in file B.) Im looking for something similar to a SETLL. When I OPEN the cursor, will the SQLCA give me some specific answer? Or do I have to actually FETCH [...]

Answer Question   |  September 20, 2010  5:03 PM
RPGSQL, SQL, SQL statement, V5R4M0
asked by:
940 pts.

Log of stored procedures run on my SQL 2005 box.
How can I tell who ran which stored procedure on our SQL 2005 server and at what time? Can we see if one stored procedure called other stored procedures there as well? Can we enable verbose logging somehow as well for more data?

Answer Question   |  September 15, 2010  5:22 PM
SQL, SQL 2005, SQL Log Files, SQL Server 2005, SQL Server stored procedures, Stored Procedures
asked by:
9,815 pts.

How was my Windows Server 2000 terminal server hacked?
1. We are running a terminal server on a Windows 2000 server. It has IIS on it. Someone was able to connect to the system, install some sort of SQL exploit tool as well as a mail blaster. How did this happen and how can we prevent it from happening again?

Answer Question   |  September 17, 2010  3:42 PM
Dell PowerEdge, Hack, Hackers, IIS, Security in 2010, SQL, Terminal Server, Windows, Windows Server 2000, Windows Terminal Server
asked by:
9,815 pts.

passing variable in CL Program using QMQRY and SQL
Hi, I’m setting up a process where I can add or delete a record in a physical file. I’m using a simple CL program that runs a couple QM Queries. QMQRY - REVEALADD INSERT INTO mylib/myfile (myfile) VALUES(user) QMQRY – REVEALDLT DELETE FROM mylib/myfile WHERE myfile = ‘&USER’ CL code IF         COND(&OPTION *EQ ‘DLT’) THEN(GOTO CMDLBL(DLT)) [...]

Answer Question   |  September 14, 2010  2:15 PM
CL Program, Physical Files, QMQRY, SQL
asked by:
160 pts.