script to read database size?

koron
Member Posts: 3
hi there 
iam woking at a company that have shops around the country.
all the shops have their own database/server
and now and then the database runds up around 100%
and when this hapends wh extend the database.
question 1
are there ar way to have navision attatin automaticly make a file with info on database size?
or can run some kind of external command "parameters" that gives me database size.
question 2
can i somehow extend the database with a script
hope this make sense :oops:
.....annd oohhh BTW happy newyear :P

iam woking at a company that have shops around the country.
all the shops have their own database/server
and now and then the database runds up around 100%
and when this hapends wh extend the database.
question 1
are there ar way to have navision attatin automaticly make a file with info on database size?
or can run some kind of external command "parameters" that gives me database size.
question 2

can i somehow extend the database with a script
hope this make sense :oops:
.....annd oohhh BTW happy newyear :P
0
Comments
-
Answer to question 1: How To calculate database usage?
Answer to question 2: it's a bit dangerous to do this automatically. You could try using SendKeys to automate the keystrokes needed. Better is to calculate the database size, and generate a mail to someone in charge when the used amount reaches some limit.
Happy new year too :PNo support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)0 -
Luc Van Dyck wrote:Answer to question 1: How To calculate database usage?
Answer to question 2: it's a bit dangerous to do this automatically. You could try using SendKeys to automate the keystrokes needed. Better is to calculate the database size, and generate a mail to someone in charge when the used amount reaches some limit.
Happy new year too :P
ohhh the email part sounds really nice!!
can i make navision send a mail when its near the like....90%??
couldt you give me a little hint abour how to do this?
i dont know how how to program in navision thats why i where looking for a standalone script but....
som guys at work are programming in attain so if you could give a litlle hint ille show it to them
thank you so mouch for this really nice information0 -
You 'll have to write some C/AL code to get the job done.
Search the forum for "smtp mail" and you find lots of postings how to send mails through code.
Here is one for example: How to Send Emails through Code Unit
You could write the code (to check the database usage and send the mail) in codeunit 1, function LoginStart, so it gets executed everytime someone logs into NAV. To prevent numerous mails being send (if for example 10 people login to NAV and your database usage has reached 99%), you need to store in a setup-field if a mail has already been send.
Hope this gets you started.No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)0 -
Is there anyone who has an exampel of the code cu 10
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions