User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the MS SQL section within the Web Development category of DaniWeb, a massive community of 391,549 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,544 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MS SQL advertiser:
Views: 4014 | Replies: 9
Reply
Join Date: Mar 2006
Posts: 6
Reputation: JohnC is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
JohnC JohnC is offline Offline
Newbie Poster

Help Unable to delete SQL records

  #1  
Mar 27th, 2006
Hello,

I'm pretty much a newbie with SQL. I have a database that is growing out of control and I'm unable to delete any records (data) from it. I've tried numerous open source applications but nothing has worked. The database is with a hosting and they provide ASP.NET Enterprise Manager. I also have Table Editor 0.81 Beta loaded on the host. I can get any program/app to connect to the database, and I can see all the tables and data, but I'm unable to delete old records. There are 2 years of old data that I need to delete. And my hosting company is screaming at me to make the database smaller. It is currently around 650MB.

Can anyone PLEASE offer some assistance to a SQL newbie, pretty please??
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jul 2005
Location: Dallas, TX
Posts: 481
Reputation: campkev is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 19
campkev campkev is offline Offline
Posting Pro in Training

Re: Unable to delete SQL records

  #2  
Mar 27th, 2006
need more info. what have you tried? what error messages/symptoms do you get when you try it?
Reply With Quote  
Join Date: Mar 2006
Posts: 6
Reputation: JohnC is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
JohnC JohnC is offline Offline
Newbie Poster

Re: Unable to delete SQL records

  #3  
Mar 27th, 2006
Thanks for your response, campkev. I'm not sure I understand what you mean by "what have you tried." Applications or commands? I am trying to query a particular table that is logging impressions on banners. I have tried the following:

DELETE FROM usd_ImpressionDetails
WHERE bannerID = 13;

Where "usd_ImpressionDetails" is the table and "bannerID = 13" is just one of the many rows I need to delete. I have a half a dozen application that allow a query to the database and they all produce the same results, which is nothing.

I recently researched if perhaps the database had some kind of lock or permission limits and I was able to turn on "autoshrink" in hopes to reduce the size, but I think I need to wait until the SQL server resets or something. I also ran "dbcc shrinkdatabase bannerdb" but I'm still seeing the same size mdf and ldf files when I run "sp_helpdb bannerdb."

I'm at a complete loss here...
Reply With Quote  
Join Date: Jul 2005
Location: Dallas, TX
Posts: 481
Reputation: campkev is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 19
campkev campkev is offline Offline
Posting Pro in Training

Re: Unable to delete SQL records

  #4  
Mar 27th, 2006
if you are executing your delete query from an application, does whatever login the application is using have delete privileges on the databases and tables you are trying to delete from? Are you getting an error when you run that query or just "0 rows affected"?
Reply With Quote  
Join Date: Mar 2006
Posts: 6
Reputation: JohnC is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
JohnC JohnC is offline Offline
Newbie Poster

Re: Unable to delete SQL records

  #5  
Mar 28th, 2006
I'm not quite sure... when I go to Users, the user that I'm using, these two items are checked: public and db_owner. Then when I go further to Permissions, nothing at all is checked. I tried checking Delete from the column for the particular table that I'm trying to delete data from but when I click save and go back, it doesn't look like it's saved because there's no check marks again. I'm doing all of this with ASP.NET Enterprise Manager. I hope I'm explaining it to where it's making some sense.
Reply With Quote  
Join Date: Mar 2006
Posts: 6
Reputation: JohnC is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
JohnC JohnC is offline Offline
Newbie Poster

Re: Unable to delete SQL records

  #6  
Mar 28th, 2006
P.S. I'm not getting any error messages.
Reply With Quote  
Join Date: Mar 2006
Posts: 6
Reputation: JohnC is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
JohnC JohnC is offline Offline
Newbie Poster

Re: Unable to delete SQL records

  #7  
Apr 1st, 2006
Can't help?
Reply With Quote  
Join Date: Jul 2005
Location: Dallas, TX
Posts: 481
Reputation: campkev is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 19
campkev campkev is offline Offline
Posting Pro in Training

Re: Unable to delete SQL records

  #8  
Apr 1st, 2006
this is sql server?
Reply With Quote  
Join Date: Mar 2006
Posts: 6
Reputation: JohnC is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
JohnC JohnC is offline Offline
Newbie Poster

Re: Unable to delete SQL records

  #9  
Apr 2nd, 2006
Of course.
Reply With Quote  
Join Date: Jul 2005
Location: Dallas, TX
Posts: 481
Reputation: campkev is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 19
campkev campkev is offline Offline
Posting Pro in Training

Re: Unable to delete SQL records

  #10  
Apr 2nd, 2006
I don't know what to tell you if you aren't getting any error messages. I've never used .Net Enterprise Manager, so can't give you specifics. Can you update information in those rows? BannerId is an int, right?
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb MS SQL Marketplace
Thread Tools Display Modes

Other Threads in the MS SQL Forum

All times are GMT -4. The time now is 9:08 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC