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.
Showing posts with label dbs. Show all posts
Showing posts with label dbs. Show all posts
Monday, March 26, 2012
Monday, March 19, 2012
How to add same user to diff DBs on diff Servers?
Does anybody know,
how to add same user to diff DBs on diff Servers?
something like this,
EXEC sp_adduser 'xxxxx'--add user to server1.DB1
EXEC server2.master.dbo. sp_adduser 'xxxxx'--add user to server2.DB2
or other ways?
Thanks.Since SQL Server uses logins at the server level and users at the database
level probably you would need to add the logins first. You can use the
Transfer Logins DTS Task or simply use Enterprise Manager/Management Studio.
This would add the login at the server level.
To add the user, just select the login name on 'Security, Logins',
right-click and select Properties. On the Database Access tab, select the
database and database roles.
Giving exactly the right permissions as the original database would require
scripting the original database.
Hope this helps,
Ben Nevarez, MCDBA, OCP
Database Administrator
"hh" wrote:
> Does anybody know,
> how to add same user to diff DBs on diff Servers?
> something like this,
> EXEC sp_adduser 'xxxxx'--add user to server1.DB1
> EXEC server2.master.dbo. sp_adduser 'xxxxx'--add user to server2.DB2
> or other ways?
> Thanks.|||Thanks Ben.
"Ben Nevarez" wrote:
> Since SQL Server uses logins at the server level and users at the database
> level probably you would need to add the logins first. You can use the
> Transfer Logins DTS Task or simply use Enterprise Manager/Management Studi
o.
> This would add the login at the server level.
> To add the user, just select the login name on 'Security, Logins',
> right-click and select Properties. On the Database Access tab, select the
> database and database roles.
> Giving exactly the right permissions as the original database would requir
e
> scripting the original database.
> Hope this helps,
> Ben Nevarez, MCDBA, OCP
> Database Administrator
>
> "hh" wrote:
>
how to add same user to diff DBs on diff Servers?
something like this,
EXEC sp_adduser 'xxxxx'--add user to server1.DB1
EXEC server2.master.dbo. sp_adduser 'xxxxx'--add user to server2.DB2
or other ways?
Thanks.Since SQL Server uses logins at the server level and users at the database
level probably you would need to add the logins first. You can use the
Transfer Logins DTS Task or simply use Enterprise Manager/Management Studio.
This would add the login at the server level.
To add the user, just select the login name on 'Security, Logins',
right-click and select Properties. On the Database Access tab, select the
database and database roles.
Giving exactly the right permissions as the original database would require
scripting the original database.
Hope this helps,
Ben Nevarez, MCDBA, OCP
Database Administrator
"hh" wrote:
> Does anybody know,
> how to add same user to diff DBs on diff Servers?
> something like this,
> EXEC sp_adduser 'xxxxx'--add user to server1.DB1
> EXEC server2.master.dbo. sp_adduser 'xxxxx'--add user to server2.DB2
> or other ways?
> Thanks.|||Thanks Ben.
"Ben Nevarez" wrote:
> Since SQL Server uses logins at the server level and users at the database
> level probably you would need to add the logins first. You can use the
> Transfer Logins DTS Task or simply use Enterprise Manager/Management Studi
o.
> This would add the login at the server level.
> To add the user, just select the login name on 'Security, Logins',
> right-click and select Properties. On the Database Access tab, select the
> database and database roles.
> Giving exactly the right permissions as the original database would requir
e
> scripting the original database.
> Hope this helps,
> Ben Nevarez, MCDBA, OCP
> Database Administrator
>
> "hh" wrote:
>
Subscribe to:
Posts (Atom)