473,497 Members | 2,158 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to Restrict all SQL Database's Size

Hello -

I have over 100 MSSQL Databases on my SQL SERVER. How do I restrict
all the MSSQL databases and its transaction logs to 100 MB.

Can someone help me with any script which will do that.

Thanks,

Rubal Jain
www.Rubal.net
Jul 20 '05 #1
1 2044
Hi

This will depend on how/what these databases are and what you want to set
the sizes to.
A start could be the script created by:

EXEC master..sp_MSForEachdb 'USE ? SELECT ''ALTER DATABASE '' + db_name() +
'' MODIFY FILE ( name= '' + RTRIM(name) + '', MAXSIZE=200)'' FROM sysfiles
WHERE status & 0x40 <> 0x40 '

John

"Rubal Jain" <ru*******@yahoo.com> wrote in message
news:7a**************************@posting.google.c om...
Hello -

I have over 100 MSSQL Databases on my SQL SERVER. How do I restrict
all the MSSQL databases and its transaction logs to 100 MB.

Can someone help me with any script which will do that.

Thanks,

Rubal Jain
www.Rubal.net

Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
3111
by: Paul | last post by:
Hi all, at present I I've built a website which can be updated by admin and users. My problem, I've combined "log in" and "access levels" to restrict access to certain pages, using the built...
3
1362
by: MrNobody | last post by:
I have a situation where I add over a hundred child MenuItems to a parent MenuItem. When I click the parent which shows a listing of all the child menu items, it is too big to fit on the page, so...
5
2945
by: toddles666 | last post by:
Hi- Is there any way of restricting access to a database by application & account? For example, I only want the application APP1 to access the database using the USER1 account. I've tried to...
1
1570
by: Uncle Sam | last post by:
how to restrict data insertion upto 50 MB in a table?
21
6467
by: Niu Xiao | last post by:
I see a lot of use in function declarations, such as size_t fread(void* restrict ptr, size_t size, size_t nobj, FILE* restrict fp); but what does the keyword 'restrict' mean? there is no...
1
1098
by: swarnap | last post by:
I'm using a file type control (<input type="file">) to browse the document and store in the database. I wanted to know... 1) how to check if the size of the file to be uploaded is less than certain...
5
8187
by: Dakrat | last post by:
Allow me to preface this post by saying that this is my first database project, and while I have learned a lot, any concepts I have learned are hit and miss as I have found new requirements and...
5
5634
by: Arun Srinivasan | last post by:
The table became inaccessible due to an error during an insert in 'not logged' mode. Now I can't drop it, since it was declared using 'restrict on drop'.. Pleaseeeeee heklp. It's using 400...
4
3168
by: chazzy69 | last post by:
The problem is as follows, i am inputing text and images from another source via my php script, now when i try to display the text and images into a page of my own styling the text and images skewed...
0
6993
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7162
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7375
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5456
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4899
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3088
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3078
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
650
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
287
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.