Showing posts with label customers. Show all posts
Showing posts with label customers. Show all posts

Monday, March 26, 2012

How to alter the transaction logfile size in MSDE 2000?

Hi there,

I recently saw that the transaction log files of user dbs grow undefinitely in SQL Server 2000 - one of our customers had a 11 GB log file which totally slowed down the server.
Another customer of ours uses one of my applications logging all actions in a MSDE database file and I fear that the corresponding transaction log file will grow and block the system too - is there any way that I could shrink and set the max size of the transaction log file through SQL?

I already know the command "SHRINK FILE ('filename')" but I haven't found a SQL command to set the max size.

Thank you for any hints!

SaschaTo set the growth, UOM for increment, increment value, allocated size, and max sizeeeee, you need to use ALTER DATABASE. However, the claim that the size of the log file slows down the server or even "block" it is somewhat strange. I've never heard of the size of the log file having such detremental effect on the system. Anyone has other opinion?|||hi rdjabarov,

thank you for your comment. How should the ALTER DATABASE command look like? It's not a part of the standard SQL command, that's why I haven't found any documentation in standard SQL books.
The server slowed down because there were only 180 kb free space on the drive and windows needs some space for swapping, running other programs and other stuff.
I'll try to see if I can get some info on ALTER DATABASE with MS SQL Server.|||Now THAT (!!!) is a different story! In other words, your db is on the verge of becoming Suspect. BTW, your OS doesn't need any more room for swap file, unless you're bogging down the memory as well.

BOL (ALTER DATABASE syntax):

MODIFY FILE
Specifies the given file that should be modified, including the FILENAME, SIZE, FILEGROWTH, and MAXSIZE options.

Friday, March 9, 2012

How to Add Columns and Use Them at Run Time using VB 2005

In order to allow my customers to use their existing data and install updated application, I want to be able to add columns to existing CE tables at startup time, and allow the user to enter data into the new column(s) immediately. I used the ALTER TABLE command as shown in the example below:

cmd.CommandText = "ALTER TABLE tblStores ADD dtDemoDate datetime, dtDemoMode int"

cmdexe = cmd.ExecuteNonQuery()

To add the column, But this does not set the columns in the attached dataset. The program sees the columns and data is able to be added, but is not then in the underlying table? What else do I need to do?

Thank you - b2bMan

You must update the dataset to fit the new schema. Distribute an application update together with the code to update the schema.

How to Add ASPNET account to your database

This is the error message "Login failed for user 'SUSHMA\ASPNET'. "

I am Building a Data Form that displays data from a single table- the Customers table in the Northwind sample Database.

I have Visual Studio.Net 1.0 and SQL Server 2000.

So I feel that I need to add an ASPNET account to my database.

Please could someone tell me if this could solve the problem, if so

please could you tell me how to Add an ASPNET account to my database?

Thank you

This thread has instructions on how to grant database access to a user account.
http://forums.asp.net/875897/ShowPost.aspx
|||

Hi,

Use Enterprise Manager (in SQL Server) to look at the users and groups for the database in question. If you don't see ASPNET there, you can add it, if it is there, it may be that it doesn't have sufficient permissions to do what you are asking it to do. The other thing to check applies if you are using IIS 6 (Win2k3 Server). In this case, ASP.NET uses NETWORK SERVICE, rather than ASPNET as the default worker process.

Hope it helps.