Schedule Mail Of DB Sizes

Jan 22, 2004

Wonder if anyone can help me out here.

I'm trying to set up a job to run overnight that mails me the size of all the databases on SQL Server.

The way I'm getting the size of the db's is by running the following in SQL Query Analyzer...

EXEC sp_MSforeachdb @command1="print '?' select cast(name as varchar(32)), round(size * 8 / 1.024,3) from ?..sysfiles"

Can anyone suggest a way that I can export the results of this to a text file that can then be mailed to me as part of a scheduled job.

Or can anyone suggest a better/easier way of doing this??

Thanks in advance. :)

View 6 Replies


ADVERTISEMENT

Schedule And E-mail Query Results In HTML Formated Email

Aug 14, 2004

Could anyone walk me through how to do the following:

Schedule a query to run at a designated time
Embed the resulting table in a HTML email
Email the HTML formated results someone automatically


Can this be done with SQL Server only or is there a third party app?



I know its alot but I'm having a hard time finding resourses.

View 1 Replies View Related

DBs, Sizes Etc

Jul 23, 2004

Anyone here with a ready to go sqlscript that lists all db's, files, sizes, owner etc? I guess it's a combination of sp_databases, sp_helpdb and sp_helpdb [db].

View 2 Replies View Related

DB Sizes

Sep 18, 2007



hi,
i'm planning to create a DB of about 1TB of text.
can SQL EXPRESS handle this sizes of data? what about SQL 2005?

does it matter if i put all the data in 1 table?

Thanks.

View 1 Replies View Related

Integration Services :: Sending Mail With HTML Format In Send Mail Task

Aug 18, 2015

I have to send mail with HTML formatĀ  and attaching multiple files dynamically via send mail task.

View 10 Replies View Related

DB Mail And Notify Operator Through DB Mail Error Could Not Retrieve Item From The Queue

Feb 2, 2007

I've set up DB mail and sent a test e-mail and that comes through fine.

I set up an Operator with email Name: DWhelpton@k-and-s.com;MWeaver@k-and-s.com

I created a job and set up the notifications to e-mail the operator on failure.

When the job runs and fails, I do not get an e-mail and I get the following exception in the db mail log:

Date 2/2/2007 8:35:00 AM
Log Database Mail (Database Mail Log)

Log ID 402
Process ID 3936
Last Modified 2/2/2007 8:35:00 AM
Last Modified By NT AUTHORITYSYSTEM

Message
1) Exception Information
===================
Exception Type: Microsoft.SqlServer.Management.SqlIMail.Server.Common.BaseException
Message: Could not retrieve item from the queue.
Data: System.Collections.ListDictionaryInternal
TargetSite: Microsoft.SqlServer.Management.SqlIMail.Server.Controller.ICommand CreateSendMailCommand(Microsoft.SqlServer.Management.SqlIMail.Server.DataAccess.DBSession)
HelpLink: NULL
Source: DatabaseMailEngine

StackTrace Information
===================
at Microsoft.SqlServer.Management.SqlIMail.Server.Controller.CommandFactory.CreateSendMailCommand(DBSession dbSession)
at Microsoft.SqlServer.Management.SqlIMail.Server.Controller.CommandFactory.CreateCommand(DBSession dbSession)
at Microsoft.SqlServer.Management.SqlIMail.Server.Controller.CommandRunner.Run(DBSession db)
at Microsoft.SqlServer.Management.SqlIMail.IMailProcess.ThreadCallBack.MailOperation(Object o)


What step am I missing?

View 1 Replies View Related

Data Vs. Log Sizes

Mar 23, 2000

Hello,

I was told a while ago that your Log should be 2 times the size as your data. Is this a good rule of thumb?


Lee

View 2 Replies View Related

Index Sizes

Jul 29, 2002

Does anyone know of a quick way to find out what the largest indexes on a database are? I have a number of tables and was wondering if there's a stored proc or query that I can execute that will list the indexes and their size in order by size? Thanks

View 1 Replies View Related

Index Sizes

Jul 30, 2002

Does anyone know of a quick way to find out what the largest indexes on a database are? I have a number of tables and was wondering if there's a stored proc or query that I can execute that will list the indexes and their size in order by size? Thanks

View 1 Replies View Related

How To Check DB Sizes?

Jan 18, 2006

Hi there

I hope this isn't a totally stupid question, but I was wondering how to check the physical size the DBs take up on disks...

Does MSSQL save DBs as a specific file-extension? Is there an SQL command I can run that will give extensive info on DB sizes?

Any help welcome :)


Thanks!

View 1 Replies View Related

Log File Sizes

Apr 28, 2008

When you have the autogrowth turned on for log files. What happens when you put a max file size on it? Will just overwrite the old logs to keep the file at the max size or will it just create a new file every time it hits the max size?

Thanks!

View 1 Replies View Related

Calculating Row Sizes

Feb 20, 2008

I'm putting together a manual system that tracks data growth in a certain database. I was going to use sp_spaceused as a part of it, but then realized the datatypes for size are CHAR, not INT or BIGINT. I was going to do counts, averages, etc. on those columns but that wouldn't work against a CHAR field obviously. I could easily write a little something to strip out the KB, but was hoping there was another way to get those figures.

Secondly...has anynoe seen a stored procedure/code/etc. that just calculates the largest/smallest/average row size for a table? I haven't been able to find anything anywhere...

Any insight would be greatly appreciated...

Thanks!

View 2 Replies View Related

XP_sendmail Puts Copy Of Mail In Sent Mail Of Exchange Client.

Jul 9, 2001

I am using nt4.0 sp5 with sql7.0 sp3 and exchange client.
Does anyone know how to keep xp_sendamil form putting a copy of the mail message in the sent mail folder or an automated process for deleting all mail in the sent folder? As it stands now I must manually delete all messages from the sent mail folder on a daily basis.

Thanks,

Ed.

View 6 Replies View Related

SMTP Database Mail Showing Error While Sending Mail

Mar 7, 2007

Lokendra writes "I have configured the Database mail profile and account in Sql Server 2005 but the mail is not sending and showing the following error message:

Error,235,The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 1 (2007-03-05T15:16:07). Exception Message: Cannot send mails to mail server. (Mailbox name not allowed. The server response was: Sorry<c/> that domain isn't in my list of allowed rcpthosts.).
),3000,90,,3/5/2007 3:16:07 PM,sa


but while in the same mail set up in previous instance of sql server 2005 the message was sending very well. After installing new instance of sql server 2005 the problem is arising.


Anybody can tell me that what I can do so that i can send mail using the SMTP databasemail account."

View 1 Replies View Related

SSIS Send Mail Task - Failure Sending Mail

Dec 13, 2007

Dear all,
I have switched off the firewall settings on my system and as suggested im entering the minimal information and data to send the mail.
but still the Mail Task is failing..
plz suggest.

View 11 Replies View Related

SSIS Send Mail Task - Failure Sending Mail

Jun 8, 2006

Hi Everyone,

Hopefully someone out there will have an idea as this is driving me nuts.

I've setup a task to email on success/failure and keep receiving the following message when executed:

Progress: The SendMail task is initiated. - 0 percent complete
[Send Mail Task] Error: An error occurred with the following error message: "Failure sending mail.".
Progress: The SendMail task is completed. - 100 percent complete
Task Send Mail Task failed

When I configure Outlook Express on the same machine with the same settings it works.

On the SMTP Connection Manager I have left the default name, tested with both an IP address and Server Name, and no authentication or SSL.

On the Send Mail Task, it uses the above connection. The To: , From: , Subject fields are populated. Message SourceType is DirectInput, MessageSource is Test, Priority is Normal and no attachments or expressions etc.

Nothing useful is logged in the Event Viewer even with full logging turned on.

Any suggestions appreciated,

Thanks.









View 11 Replies View Related

Nvarchar And Varchar Sizes....

Jun 19, 2004

Hello again everyone....

I have another question for everyone....

I am currently cleaning up my database to get its total size down and am not sure how nvarchar and varchar work exactly.

When defining the length of a varchar or nvarchar in enterprise manager, will that effect the size of the entry (as far as data size) no matter what the length of the entry? In other words, will there be a difference in Data Size for an entry with the length of 4 characters with a definition of varchar(4) versus an entry with the length of 4 characters with a definition of varchar(50).

****If there is no difference, is there any reason in trying to best guess the size to give nvarchar or varchar columns? It would seem easier to just define the lengths of columns which need variable lengths to 200 or 400 just to save time in not trying to best guess what the size might be...*****

Thanks ahead for any help...

-Alec

View 3 Replies View Related

Query Table Sizes

May 17, 2002

Hi,
I am looking to runa query to get the sizes of the tables in my SQL 7 DB.
I know I can access the info in Enterprise Manager, under "Tables & Indexes".
But I need to get this info via a query.
I need rows and size.
I figured out how to get rows through the sys tables:
select sysobjects.name, sysindexes.rows
from sysobjects,sysindexes
where sysobjects.name = sysindexes.name
and xtype = 'U'

Is the size of each table stored in a sys table as well? I can't find it.

View 2 Replies View Related

Matching Tables Are Different Sizes

Apr 17, 2001

Hey all,
Got a little problem. have 2 matching tables on different servers with the EXACT same column layout and data (the tables are being replicated with MSSQL7) and one table is 200MB while the other is 2000MB. I'm running MSSQL7 SP2. Any ideas???

-Marc

View 1 Replies View Related

Log File Sizes Are Growing Like Anything.

Nov 8, 2000

Hi,
my log files are growing like anything. One of my log file size is 20GB.
How i have to reduce the log file size.
If i run DBCC command is it come backs...
Pls tell me the way how i have to find the free space and reduce logsizes.
After taking backups also my log file sizes are not reducing.

Thanks!
Kavira

View 2 Replies View Related

Reducing Database And Log Sizes

Dec 16, 1999

I have inherited a number of databases which were substantially over sized when they were set up. I'd like to reduce both the log and database files to be smaller than their original sizes, what's the easiest way to do this? If anyone has any experience of doing this please reply.

View 1 Replies View Related

Oracle Packet Sizes

Aug 5, 2003

We are looking at installing a new Oracle server for a client but have been told that they have used Oracle in the past but had a lot of problems with slow response even though the bandwidth on the WAN was barely being used. He says that this was due to the fact that Oracle sends out very small packets across the network meaning that there are hundreds of packets being sent out. This caused a problem on the routers being used as it was killing the processors. Is this still the case and have you had other reports of slow response of this nature?

View 1 Replies View Related

Device Sizes Are Negative

Mar 30, 1999

Ok, I have a new one. Several of my devices are showing with negative sizes when viewed in edit in enterprise manager. I cannot edit them as the change now button is grayed-out. Oddly enough they are all located on the same drive. The master (on C drive), and the tempdb (on D drive) both show as the default device. I am very confused. User access to the information is fine. What gives?

View 2 Replies View Related

Log File Sizes For All Databases

Jul 21, 2006

Hi All,

I ran the following query to get the log file sizes for all databases:

select (size*8.00)/1024,filename from master..sysaltfiles

When I compared the results from this query with the transaction log properties in EM, not all of the sizes match.
For example, EM shows the transaction log size for tempdb to be 2 MB but the results of the query shows that transaction log size for tempdb is .5 MB. Which query can I run to get the numbers that would match between two? Thanks.

View 3 Replies View Related

Large File (MDF & LDF) Sizes

Oct 1, 2007

Admin is kind of new to me. Could someone recommend how to reduce these file sizes?

In Dev, my MDF is 16 MB, LDF .5 MB.

I run a script to recreate the schema and insert rows on the Host.

When downloading a db backup from the Host and restoring it to Dev, my MDF is 24 MB, LDF 25 MB.

The same dataset grew by ~35 MB!!!

Any advice is welcome. Thank you. Rick

View 11 Replies View Related

Best Practices For Field Sizes

Jul 23, 2005

Can any one direct me to sources for best practices of field types and sizesto use for commonly used information such as address, names, city, businessnames ....Thanks, Brian

View 3 Replies View Related

Print Image Different Sizes

Feb 25, 2008

I have reporting services installed on a windows 2003 server. If i open a report directly on the server using Internet Explorer 7 and reportviewer and click the print button on the report viewer control. The print document lines up perfectly on the output page and prints beautifully. I have a winforms app that calls the same report as an IMAGE and then prints it. The size of the output on the print page is way off and the font is almost triple. I have it working in another clients environment with similar serve setup and same versions. I have tried different print drivers and different workstations but I think it has something to do with reporting services config. Can someone please help. I have set all margins in the .rdl file to 0 and when i create the PrinterSettings object I set all margins to zero again.

Thanks in advance.

Mike

View 3 Replies View Related

Tables ,sizes, Quanity

May 31, 2007

Got a question,

still new to sql server express, been playing with it for a while, kinda enjoying it.



But



If you were designing a database that had many tables with the possibility of a large amount of data, would you keep them all in one database or would you disperse them into multiple databases. There will be some relations used in some of the tables, but not all.



I believe I will end up with about 21 different tables, 9 of them have the potential for 1,000's of records.



I do appreciate anyone's thoughts or concerns

Davids Learning

View 4 Replies View Related

Configure SMTP Server Mail To Send Mail

Feb 10, 2008

Hello,
The Database Mail feature is already enabled on the server, also I have a mail account on the other server.
The problem I faced is that I need to send mail from my SQL Server using a created email account on the other server. How should I configure my email to do that ?
Should I use a sysmail_add_account procedure to enable account, also set profile and profile account ? Does this way creates server mail account that is binded with other email account?
The mail should be sent from my SQL Server.
Thank You.

View 3 Replies View Related

Database Mail With Yahoo Business Mail Server

Feb 20, 2008

Hi all....

Our company use yahoo business mail server for our corporate mails. I know that I can configure database mail with SMTP. But when I try to configure database mail account with yahoo bizmail, I cannot do that. It gets configured but when I test it it doesn't send any mails. Do I need to have any special condiguration for this. SMTP address is smtp.bizmail.yahoo.com. Also I have specified the Authentication using my user name and password. Please help

Thanks

Rajesh

View 10 Replies View Related

Error Sending Mail With Send Mail Task

Feb 6, 2008

I keep getting a generic "Error Sending Mail" error. For testing purposes I am just trying to send using my own email account. What goes in the SMTP Server box in the connection manager? I have tried:

A - the exchange server address (SOMETHING.us.company.com)
B - The SMTP properties I see when I look at the properties of my email address: (my.name@abcd.efgh.company.com)
C - Just the end portion of the SMTP properties: (abcd.efgh.company.com)
D - My email address (my.name@company.com)

I don't know what to enter, or what is giving me such a generic error message.

View 7 Replies View Related

Help With Mail That Send Mail When Database Bakcup Fails

Sep 1, 2006

Hello

I have got a script which gives the mail to the dba mail box when database backup fails.

In the script I want to make a change so that I get the particular database name , on what ever database i implement.

Can you tell me some suggestions.

The script I am using is :



use master
go
alter PROCEDURE dbo.SendMail
@to VARCHAR(255),
@subject VARCHAR(255),
@message VARCHAR(8000)
AS
BEGIN
SET NOCOUNT ON;
DECLARE
@rv INT,
@from VARCHAR(64),
@server VARCHAR(255);
SELECT
@from = 'testsql2000@is.depaul.edu',
@server = 'smtp.depaul.edu';


select @message = @message + char(13) + Char(13) + @@servername + '-'+ db_name()+ '-' + 'Backup Status Failed' + Char(13)

EXEC @rv = dbo.xp_smtp_sendmail
@to = @to,
@from = @from,
@message = @message,
@subject = @subject,
@server = @server;
END
GO




--- After the above script is run the following should be given in the 2nd step when
--- the backup jobs are scheduled ------

exec master.dbo.sendmail
@to = 'dvaddi@depaul.edu',
@subject =' Test sqlserver 2000',
@message = '' ;




Thanks

View 4 Replies View Related

Sending Mail To Several Users With Send Mail Task ?

Nov 10, 2006

I know you can specify additional recipients in the To column by sepperating them with a semicolon. But whats the easiest way to send to several users, when the email address must be retrieved from a table with a query like this:

select email from problem_subscribers

where project = 'project1'

and statusmail = 'OnError'

So when the eventhandler gets an OnError i want the mail task to be sent to each problemsubscriber.



View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved