When I backup a my transaction log and then run DBCC SQLPERF(logspace) the log shows 12% space used. The backup was run at night long after any transactions had been executed so there should be no active transactions. In SQL 6.5 you could run DBCC CHECKTABLE(syslogs) to clear up the usage inaccuracy is there a similar command in 7.0 to fix the space usage inaccuracy?
I have a database which has log file size 300 GB. As the drive is filling up i need to clear the space on the drive, for that i have to shrink the log file.Â
Unfortunately i dont have option to take backup of the database.And i am not able to shrink the file now. Is there any way to shrink the log file with out taking backup of it ?
Hi, I am trying to do this: UPDATE Users SET uniqueurl = replaceAllEmptySpacesInUniqueURL('uniqueurl') What would be the syntax. Any help appreciated. Thanks
I am generating a Report from Sql Data Source in Sql Server 2005 and viewing the Report in Report viewer control of Visual Studio 2005. The data in the Data Source contains string with multiple spaces (for example €œ Test String €œ) but when they get rendered in Report viewer control, multiple spaces gets converted to single space €? Test String €œ.
I tried following solutions 1) Replacing spaces with €œ €? 2) Inserting <pre> tag before the string and </pre> tag after the string (Also tried <Pre> instead of <pre>)
But in all the cases result is same. The Report Viewer control is showing €œ €? instead of space and €œ<Pre>€? tag instead of preserving spaces.
Please provide me a solution so that spaces can be preserved in Report Viewer.
I am using the below script to get space alerts  and now i am interested in sending alerts  if for any drive space available is Less than 10% or 15%.. how to convert beelow code to find in %Â
Hi.. I was doing a good maintenance on my DB and my trans log LDF keep growing until 30GB but my DB data file MDF is only 2GB. I found the two following method to reduce my log size.
Method 1: I used veritas to backup log file with truncate Method 2: I used the shrink database option in Enterprises manager to shrink it (file chosen=log , use default option)
After doing that, I found my LDF log file is still about the same size=27GB but when I see clearly, from the shrink database windows, the log spaced used reduced to only 100MB, the allocation log space is still 27GB. Why? How to make the LDF smaller to be the around the same size as the space used 100MB?
This is driving me bananas. Can't find any info on this anywhere....SQL 2000 seems to replace double space with a single space when I seta varchar field to " " (2spaces), it only stores " " (1space). Whyon earth would microsoft do this? If I save 2 spaces - I WANT TO SEE2 SPACES!!!!Can anyone help? Is this a database setting? Is this due to usingvarchar?Any help appreciated.Colin Hale
hi thank you for this solution Hugo (dutch?) and it's very handy, thankyou but my issue is that we created dozens of views with my function.This functions returns an integer of a date. This function has to give alowerlimit and higherlimit back when dates are out of Calendar range.But i want to read this from the Calendartable ONCE and store it in aglobal variable somewhere in SQL Server. I DON'T want to referencetables in my function. SO read once the lower- and upperlimit and usethis variable/property for referencing in my function!!GreetzHennie*** Sent via Developersdex http://www.developersdex.com ***Don't just participate in USENET...get rewarded for it!
I'm trying to clear a database transaction log that has gotten much too large. I backed it up hoping that this would clear the "active" log, but now I just have two copies of a huge transaction log. How do I clear the active log? Thanks in advance.
Hi....Does anyone know if there is a similar command to SQL2K's DBCC ERRORLOG. I'm currently writing a preventative maintenance script and want to force archiving of errorlogs. Any help greatly appreciated.
if i run a query once it takes 10 seconds and if i run the same query again it takes 1 second because it is cached. So i want to know how i can clear it because i want do some benchmarking on a query that is in cache
I would like to clear the logfile. Could anybody tell me how to do this? What I would like most would be to run SQL-Server without any log-file (while development). But I suppose that this is not possible.
select *From titles(18 row(s) affected)Totally 18 records are there in Titles table.When I queryselect title,title_id From titles where title like 'T%' and title_idlike 'M%'It is returning 2 records.So,now if I introduce a not in 2 places also it should return 16records.Whereas it is returning 14 records. What is the bestway to understandthis.select title,title_id From titles where title not like 'T%' andtitle_id not like 'M%'ThanksGanesh
I got this error every 15 minutes. I delete everything such as maintenance plan jobs, replication, log shipping, mirroring in my SSMS. I can't find out the solution for this error. I didn't know, how to resolve this problem.
What is the best way to empty out a table to reset its identity field back to 1?
I was going to do "Generate SQL Script" for all the tables I wanted to reset and then drop and re-create each table. Is there a better way to empty out all of your tables?
hi I would like to clear all data in a table called ... How do I do that - and before I do it I'd like the data copied to a another table as a backup .... Please guide me ..... Thanks in advance .....
I had deleted the login and user in my SQL 2005 database. However, each time when i connect to my database using the SQL enterprise manager, I can still see the deleted username under the login. It seems that the username is stored or cache somewhere after the first time that I have login. Does anyone know how to clear it? I am using SQL 2005 authenication method on 2003 Server machine. Thanks.
Environment1)We are using VBA,MS Access 2000/2003 and SQL Server 2000 in ourproject.2)We need to use Rational clear case as the SCM tool.Our WorkOur work primarily falls in developing SQL Server stored procedures,functions and few VisualBasicForAccess(VBA) code.Technical Help sought1) Does SQL Server 2000 provide any inbuilt capabilities of SoftwareConfiguration Management(SCM)?Not that I am aware of other thanextending it with other DM management tools like BMC,A&G,VERITAS etc.2)If not, Is there any plug-in available in SQL Server environment thatcan be installed on SQL Server so that any code developed [Storedprocedures/functions etc] can be managed in Clearcase.[I am looking forEclipse plugin's kind of plugins which would enable you to check in andcheck out from Eclipse after the initial configuration is done onEclipse]?3)If plugins are not available then the option we have is, manual andexternal check in and check out the code bits in to Clearcase.Can someone point me to concise and relevant user manual on this.
We want to back up our test db (new application) and then put it back on the box. The transaction log is pretty full (600mb), can I clear this file or delete the data in it -- we do not need it since this is all testing data.
I'm writing a web application that saves data to a Microsoft SQL database. As I build my application, I continually dirty my database with test data and refine my data schema. Is there a tool that can quickly remove all of the data from 4 of my 5 tables? Right now I'm using MS SQL Server Management Studio Express to open each table and manually deleting the rows of data and it's a pain in the ass. Playing around with the Management Express, I was able to generate a create SQL script (I'm afraid to test it though) that looks like it will rebuild my table. The problem is, one of my tables is a list (index?) of types...and I'd need that data saved ebuilt each time...but I cannot figure out how to tell SQL that the rows in this table needs to be rebuilt (and is not really data per say).How do you guys "clear" or reset your database during development?-=STZ=-
I have an application that allows users to "reserve" a certain time and location for practice sessions. I want them to look at a web form that shows which times are available and then allows them to select an open slot and then submit this form with some personal information. My problem is that as soon as they select an open slot, other users should see that this slot is no longer available. On the other hand, if someone selects an open slot and then takes too long to type in their personal information, I want it somehow to kick them out and re-open this slot back up.
I know that I can create a field called 'status' in my database that gets turn to something like 'pending' as soon as the first user clicks on an open slot, but how would I turn this field back to the 'open' state if the user took too long to enter their data?
how i can clear sql server logs by run xp_cmdshell stored procedure. (my user in sql server is a admin). i don't want use enterprise manager . i want write a query and use at xp_cmdshell . befor thx.