Friday, March 30, 2012
Outlook needs to be open for SMTP.
Ive been testing using the Pop3/ SMTP option as an alternative to Exchange
for SQL Alerts. I can get everything running with no problems. I set up an
operator and can test it 10 times in a row with success... while Outlook is
opened. But if I close Outlook, I will be able to test with success no more
than 2 times. (Though it does say sent successfull.) I will hit the test
button and the email will never arrive.
I will then log onto the box and attempt to open Outlook and it won't allow
me too. It complains about the Outlook.pst file being in use. The only way
to free this file up is to restart the SQL Agent. Only then does my test
email possibly arrive.
Has anyone else experienced this? Fix?
TIA, ChrisRMaybe one of the articles linked here:
http://www.aspfaq.com/2403
(Or you might consider switching to XP_SMTP_SendMail.)
--
This is my signature. It is a general reminder.
Please post DDL, sample data and desired results.
See http://www.aspfaq.com/5006 for info.
"ChrisR" <noemail@.bla.com> wrote in message
news:OZ7ldn3PFHA.2348@.tk2msftngp13.phx.gbl...
> sql2k sp3a
> Ive been testing using the Pop3/ SMTP option as an alternative to Exchange
> for SQL Alerts. I can get everything running with no problems. I set up an
> operator and can test it 10 times in a row with success... while Outlook
> is opened. But if I close Outlook, I will be able to test with success no
> more than 2 times. (Though it does say sent successfull.) I will hit the
> test button and the email will never arrive.
> I will then log onto the box and attempt to open Outlook and it won't
> allow me too. It complains about the Outlook.pst file being in use. The
> only way to free this file up is to restart the SQL Agent. Only then does
> my test email possibly arrive.
> Has anyone else experienced this? Fix?
> TIA, ChrisR
>
>|||ChrisR
your not alone, i had the same issue. NEVER found an answer ((HUGS))
"ChrisR" wrote:
> sql2k sp3a
> Ive been testing using the Pop3/ SMTP option as an alternative to Exchange
> for SQL Alerts. I can get everything running with no problems. I set up an
> operator and can test it 10 times in a row with success... while Outlook is
> opened. But if I close Outlook, I will be able to test with success no more
> than 2 times. (Though it does say sent successfull.) I will hit the test
> button and the email will never arrive.
> I will then log onto the box and attempt to open Outlook and it won't allow
> me too. It complains about the Outlook.pst file being in use. The only way
> to free this file up is to restart the SQL Agent. Only then does my test
> email possibly arrive.
> Has anyone else experienced this? Fix?
> TIA, ChrisR
>
>
Friday, March 23, 2012
Outer Join Challenge
tables. I've simplified the situation below.
Table: Opportunity
Columns:
Name - always has a value
OpportunityID - key field link
Status - 0 or 1 for Open or Closed
Table: Activities
Owner - always has a value
RegardingObjectID - key field link
Status - 0 or 1 for Open or Closed
I am attempting to isolate those opportunities that do not have an open
activity. I thought an outer join would do the trick, and I would just look
for those opportunities with a null Owner. Below is my statement:
SELECT Opportunity.Name, Activities.Owner
FROM Opportunity LEFT OUTER JOIN Activities
ON Opportunity.OpportunityID = Activities.RegardingObjectID
where Activities.Status = 0
It seems as if the join is evaluated first before the filters, so that
opportunities that have no open activities are being dropped because the
link is pulling in the closed activities. In other words, the only results
that are returned with a null Owner are those that have neither an open nor
a close activity.
This is a SQL statement that I am going to use for a SQL Report using SQL
Reporting Services, so I think I need to accomplish this with one SQL
statement.
Is my only avenue to create a restricted view of the Activities table and
use that in my report?
SELECT Opportunity.Name, Activities.Owner
FROM Opportunity LEFT OUTER JOIN Activities
ON (Opportunity.OpportunityID = Activities.RegardingObjectID and
Activities.Status = 0)
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: http://cerbermail.com/?QugbLEWINF
"Cindy" <CindyMikeworth@.newsgroups.nospam> wrote in message
news:%23nrS$uK8GHA.2128@.TK2MSFTNGP05.phx.gbl...
> I'm struggling with the creation of a SQL 2005 statement involving two
> tables. I've simplified the situation below.
> Table: Opportunity
> Columns:
> Name - always has a value
> OpportunityID - key field link
> Status - 0 or 1 for Open or Closed
> Table: Activities
> Owner - always has a value
> RegardingObjectID - key field link
> Status - 0 or 1 for Open or Closed
> I am attempting to isolate those opportunities that do not have an open
> activity. I thought an outer join would do the trick, and I would just
> look for those opportunities with a null Owner. Below is my statement:
> SELECT Opportunity.Name, Activities.Owner
> FROM Opportunity LEFT OUTER JOIN Activities
> ON Opportunity.OpportunityID = Activities.RegardingObjectID
> where Activities.Status = 0
> It seems as if the join is evaluated first before the filters, so that
> opportunities that have no open activities are being dropped because the
> link is pulling in the closed activities. In other words, the only
> results that are returned with a null Owner are those that have neither an
> open nor a close activity.
> This is a SQL statement that I am going to use for a SQL Report using SQL
> Reporting Services, so I think I need to accomplish this with one SQL
> statement.
> Is my only avenue to create a restricted view of the Activities table and
> use that in my report?
>
Tuesday, March 20, 2012
other programs won't start while SQL is running
I've got a Win2000 adv server sp4 w/ sql2000 sp3. I've had no complaints from the DBA about sql performance.
The problem is while sql is running other programs won't start.
IIS
v2i protector
They time out. If I close sql and restart the other services they start fine but then sql won't start.
The event id's I get for all programs are
26-Application popup:'program.exe' application error: The application failed to initialize properly (0xc0000142). Click on OK to terminate the application.
7009- Timeout (30000 milliseconds) waiting for the 'program' service to connect.
7000-The 'program' service failed to start due to the following error" the service did not respond to the start or control request in a timely fashion.
Has anyone seen a situation like this before?
Thanks
Hi,
Can you make the SQL Server Memory to Static and Restart the SQL Server and
other services. It seems
SQL Server meory set to dynamic and it utilize all the memory available in
the system. This might be a
problem.
Using task manager check the memory utilized by SQLSERVR.EXE.
Thanks
Hari
MCDBA
"Rich Lehr" <Rich Lehr@.discussions.microsoft.com> wrote in message
news:2062A7B0-6AC9-4507-86ED-C7206DA1574F@.microsoft.com...
> First of all I'm not a sql guru. I'm just doing some troubleshooting on
the server.
> I've got a Win2000 adv server sp4 w/ sql2000 sp3. I've had no complaints
from the DBA about sql performance.
> The problem is while sql is running other programs won't start.
> IIS
> v2i protector
> They time out. If I close sql and restart the other services they start
fine but then sql won't start.
> The event id's I get for all programs are
> 26-Application popup:'program.exe' application error: The application
failed to initialize properly (0xc0000142). Click on OK to terminate the
application.
> 7009- Timeout (30000 milliseconds) waiting for the 'program' service to
connect.
> 7000-The 'program' service failed to start due to the following error" the
service did not respond to the start or control request in a timely fashion.
> Has anyone seen a situation like this before?
> Thanks
>
|||Rich,
Sounds like you may be lacking enough memory to operate properly or someone
has turned off the Dynamic Memory allocation in SQL Server by setting the
SET Working Set size to On. Make sure the Memory in SQL Server is still set
to Dynamic but lower the Max Memory setting enough to leave memory for the
other applications.
Andrew J. Kelly SQL MVP
"Rich Lehr" <Rich Lehr@.discussions.microsoft.com> wrote in message
news:2062A7B0-6AC9-4507-86ED-C7206DA1574F@.microsoft.com...
> First of all I'm not a sql guru. I'm just doing some troubleshooting on
the server.
> I've got a Win2000 adv server sp4 w/ sql2000 sp3. I've had no complaints
from the DBA about sql performance.
> The problem is while sql is running other programs won't start.
> IIS
> v2i protector
> They time out. If I close sql and restart the other services they start
fine but then sql won't start.
> The event id's I get for all programs are
> 26-Application popup:'program.exe' application error: The application
failed to initialize properly (0xc0000142). Click on OK to terminate the
application.
> 7009- Timeout (30000 milliseconds) waiting for the 'program' service to
connect.
> 7000-The 'program' service failed to start due to the following error" the
service did not respond to the start or control request in a timely fashion.
> Has anyone seen a situation like this before?
> Thanks
>
|||"Andrew J. Kelly" wrote:
> Rich,
> Sounds like you may be lacking enough memory to operate properly or someone
> has turned off the Dynamic Memory allocation in SQL Server by setting the
> SET Working Set size to On. Make sure the Memory in SQL Server is still set
> to Dynamic but lower the Max Memory setting enough to leave memory for the
> other applications.
> --
> Andrew J. Kelly SQL MVP
>
> "Rich Lehr" <Rich Lehr@.discussions.microsoft.com> wrote in message
> news:2062A7B0-6AC9-4507-86ED-C7206DA1574F@.microsoft.com...
> the server.
> from the DBA about sql performance.
> fine but then sql won't start.
> failed to initialize properly (0xc0000142). Click on OK to terminate the
> application.
> connect.
> service did not respond to the start or control request in a timely fashion.
> After you guys replied to my post I checked out the server after the boot. Between the MSMDSRV.EXE and the SQLSERVR.EXE they were using up 1.6 gig of memory!!! I'm still not quite sure of the fix yet but the I found a MS knowledgebase article concerni
ng a memory leak in MSMDSRV.EXE. We're looking into it and are keeping your posts in mind. Thank you both very much.
>
Monday, March 12, 2012
OT: SQL 2008 LA Launch in February
Thanks
"Kevin3NF" wrote:
> Who's going besides me?
> I'd like to meet as many of you as I can, so I'm getting in at 6p the night
> before and staying for the post-launch festivities that night...
> Shame they slipped the true release date

> now I guess...
> --
> Kevin3NF
> SQL Server dude
> You want fries with that?
> http://kevin3nf.blogspot.com/
> I only check the newsgroups during work hours, M-F.
> Hit my blog and the contact links if necessary...I may be available.
>
>
>
$0 for the event itself...its a sales/marketing promotion for Microsoft.
Hotels, travel and some meals are on you...
http://www.microsoft.com/heroeshappenhere/events/los-angeles/default.mspx
Thinking about coming out?
Kevin3NF
SQL Server dude
You want fries with that?
http://kevin3nf.blogspot.com/
I only check the newsgroups during work hours, M-F.
Hit my blog and the contact links if necessary...I may be available.
"Pete" <phayward_delete@.delete_bigfoot.com> wrote in message
news:224F77F0-D581-4937-8987-6ECC506D2689@.microsoft.com...[vbcol=seagreen]
> I've tried to find out how much this events costs. Any clues?
> Thanks
> "Kevin3NF" wrote:
|||Thanks Kevin. No I was just wondering, as here in Oz the same event is
US$180. I had a sneeking suspicion that once again us Aussies are getting
ripped. Oh and we apparently get trial (Visual Studio) and CTP (SQL Server
2008) software not "Promotional" versions as you guys get, which I assume
are Not for Resale versions.
"Kevin3NF" wrote:
> $0 for the event itself...its a sales/marketing promotion for Microsoft.
> Hotels, travel and some meals are on you...
> http://www.microsoft.com/heroeshappenhere/events/los-angeles/default.mspx
> Thinking about coming out?
> --
> Kevin3NF
> SQL Server dude
> You want fries with that?
> http://kevin3nf.blogspot.com/
> I only check the newsgroups during work hours, M-F.
> Hit my blog and the contact links if necessary...I may be available.
>
> "Pete" <phayward_delete@.delete_bigfoot.com> wrote in message
> news:224F77F0-D581-4937-8987-6ECC506D2689@.microsoft.com...
>
>
|||Were getting CTP as well, since the rtm won't be ready yet

Kevin3NF
SQL Server dude
You want fries with that?
http://kevin3nf.blogspot.com/
I only check the newsgroups during work hours, M-F.
Hit my blog and the contact links if necessary...I may be available.
"Pete" <phayward_delete@.delete_bigfoot.com> wrote in message
news:8FF6852C-2136-40CF-A5DC-63823929F6D0@.microsoft.com...[vbcol=seagreen]
> Thanks Kevin. No I was just wondering, as here in Oz the same event is
> US$180. I had a sneeking suspicion that once again us Aussies are getting
> ripped. Oh and we apparently get trial (Visual Studio) and CTP (SQL Server
> 2008) software not "Promotional" versions as you guys get, which I assume
> are Not for Resale versions.
> "Kevin3NF" wrote:
|||Yes of course ... silly me. IT's VS I'm really after but we do get Windows
Server 2008 Enterprise which may be useful for some.
"Kevin3NF" wrote:
> Were getting CTP as well, since the rtm won't be ready yet

> --
> Kevin3NF
> SQL Server dude
> You want fries with that?
> http://kevin3nf.blogspot.com/
> I only check the newsgroups during work hours, M-F.
> Hit my blog and the contact links if necessary...I may be available.
>
> "Pete" <phayward_delete@.delete_bigfoot.com> wrote in message
> news:8FF6852C-2136-40CF-A5DC-63823929F6D0@.microsoft.com...
>
>
OT: Google Groups dropping messages?
that you miss new messages? I've seen numerous responses in the last
two days where the original message was missing from the message
list. Just curious if it's affecting everybody, or just me...
Yeah...I noticed it starting a few or several months ago. If
you search threads via google groups, you will now find
posts in those threads missing as well - that's how I first
noticed it. It was sporadic in the beginning but looks like
it's gotten worse.
-Sue
On 22 Feb 2007 12:28:15 -0800, "Tracy McKibben"
<tracy.mckibben@.gmail.com> wrote:
>Anybody else here using Google Groups to read/post? Have you noticed
>that you miss new messages? I've seen numerous responses in the last
>two days where the original message was missing from the message
>list. Just curious if it's affecting everybody, or just me...
osql vs. QA and extended characters
using scripts and osql.exe to perform these with generally good results.
A recent addition to these installs is a script that populates a table
of usernames and encryped passwords, and this is where I'm having
trouble. If I run a script in Query Analyzer that contains this line:
insert into operator (op_code, password, first_name, last_name,
security, operator, salespoint) values ('ADMIN', '??', 'ADMIN',
'ADMIN', 9, 'SYSTEM', 'SYSTEM')
I get predictable results and the encrypted password gets correctly
decrypted in our application.
If I run the very same script using osql like this:
osql.exe -E -i MyScript.sql -o "Output.txt"
The password doesn't end up in the database as '??', it seems to get
changed to '?+-' which obviously wouldn't decrypt correctly in the
application.
So this makes me think there's some kind of translation going on with
these extended characters when running the script via osql. Anyone know
how I can achieve the same results with osql as QA? I'm hoping there's a
switch or something that will do the trick. Thanks!
Matt
MattB wrote:
> Hi, I have some sql commands I incorporate into an install and I've
> been using scripts and osql.exe to perform these with generally good
> results.
> A recent addition to these installs is a script that populates a table
> of usernames and encryped passwords, and this is where I'm having
> trouble. If I run a script in Query Analyzer that contains this line:
> insert into operator (op_code, password, first_name, last_name,
> security, operator, salespoint) values ('ADMIN', '??', 'ADMIN',
> 'ADMIN', 9, 'SYSTEM', 'SYSTEM')
> I get predictable results and the encrypted password gets correctly
> decrypted in our application.
> If I run the very same script using osql like this:
> osql.exe -E -i MyScript.sql -o "Output.txt"
> The password doesn't end up in the database as '??', it seems to
> get changed to '?+-' which obviously wouldn't decrypt correctly in
> the application.
> So this makes me think there's some kind of translation going on with
> these extended characters when running the script via osql. Anyone
> know how I can achieve the same results with osql as QA? I'm hoping
> there's a switch or something that will do the trick. Thanks!
> Matt
See this page:
http://www.windowsitpro.com/SQLServe...ver_37470.html
David Gugick
Imceda Software
www.imceda.com
|||David Gugick wrote:
> MattB wrote:
>
> See this page:
> http://www.windowsitpro.com/SQLServe...ver_37470.html
>
Great. Thanks!
Matt
Saturday, February 25, 2012
OSQL + sql files with accent characters = problems!
I've an SQL file which contain accent characters to fill my default values
like this:
insert into mtytable... values('Fvrier')
and also I create storedprocedures which execute some insert / update
command with the same values.
The SQL file is correct.
I've a batch file (.bat) which execute this command :
osql -E -i "MyScript.sql" -d MyDatabase
but the result is:
the accents disappeared !
Fvrier become Fvrier in the database!
My stored procedure has changed during the OSQL execution.
How can I solve the problem?
The storeprocedure (and other commands) are correct in the .sql file.
thanks.
Jerome.
"Jj" <willgart_A_@.hotmail_A_.com> wrote in message
news:uIuFDPyyEHA.2040@.tk2msftngp13.phx.gbl...
> Hi,
> I've an SQL file which contain accent characters to fill my default values
> like this:
> insert into mtytable... values('Fvrier')
> and also I create storedprocedures which execute some insert / update
> command with the same values.
> The SQL file is correct.
> I've a batch file (.bat) which execute this command :
> osql -E -i "MyScript.sql" -d MyDatabase
> but the result is:
> the accents disappeared !
> Fvrier become Fvrier in the database!
> My stored procedure has changed during the OSQL execution.
> How can I solve the problem?
> The storeprocedure (and other commands) are correct in the .sql file.
> thanks.
> Jerome.
>
osql can use Unicode input files, however, when you create the Unicode input
files,
you need to do so using UTF-16 rather than the default UTF-8.
HTH
Rick Sawtell
MCT, MCSD, MCDBA
|||ok, I'll try this
"Rick Sawtell" <quickening@.msn.com> wrote in message
news:uYdrCK0yEHA.2676@.TK2MSFTNGP12.phx.gbl...
> "Jj" <willgart_A_@.hotmail_A_.com> wrote in message
> news:uIuFDPyyEHA.2040@.tk2msftngp13.phx.gbl...
> osql can use Unicode input files, however, when you create the Unicode
> input files,
> you need to do so using UTF-16 rather than the default UTF-8.
> HTH
> Rick Sawtell
> MCT, MCSD, MCDBA
>
>
OSQL + sql files with accent characters = problems!
I've an SQL file which contain accent characters to fill my default values
like this:
insert into mtytable... values('Fvrier')
and also I create storedprocedures which execute some insert / update
command with the same values.
The SQL file is correct.
I've a batch file (.bat) which execute this command :
osql -E -i "MyScript.sql" -d MyDatabase
but the result is:
the accents disappeared !
Fvrier become Fvrier in the database!
My stored procedure has changed during the OSQL execution.
How can I solve the problem?
The storeprocedure (and other commands) are correct in the .sql file.
thanks.
Jerome.
"Jj" <willgart_A_@.hotmail_A_.com> wrote in message
news:uIuFDPyyEHA.2040@.tk2msftngp13.phx.gbl...
> Hi,
> I've an SQL file which contain accent characters to fill my default values
> like this:
> insert into mtytable... values('Fvrier')
> and also I create storedprocedures which execute some insert / update
> command with the same values.
> The SQL file is correct.
> I've a batch file (.bat) which execute this command :
> osql -E -i "MyScript.sql" -d MyDatabase
> but the result is:
> the accents disappeared !
> Fvrier become Fvrier in the database!
> My stored procedure has changed during the OSQL execution.
> How can I solve the problem?
> The storeprocedure (and other commands) are correct in the .sql file.
> thanks.
> Jerome.
>
osql can use Unicode input files, however, when you create the Unicode input
files,
you need to do so using UTF-16 rather than the default UTF-8.
HTH
Rick Sawtell
MCT, MCSD, MCDBA
|||ok, I'll try this
"Rick Sawtell" <quickening@.msn.com> wrote in message
news:uYdrCK0yEHA.2676@.TK2MSFTNGP12.phx.gbl...
> "Jj" <willgart_A_@.hotmail_A_.com> wrote in message
> news:uIuFDPyyEHA.2040@.tk2msftngp13.phx.gbl...
> osql can use Unicode input files, however, when you create the Unicode
> input files,
> you need to do so using UTF-16 rather than the default UTF-8.
> HTH
> Rick Sawtell
> MCT, MCSD, MCDBA
>
>
Monday, February 20, 2012
Orphaned SQL Logins on the Mirror
Hi there,
I’ve recently set-up database mirroring between two servers in the same domain: DMZSQL01 and DMZSQL02 with a witness of DMZSQL03.
The mirroring as all gone according to plan.
Set up all the users/databases on the Mirror (DMZSQL02) and then do a back-up/restore to sync the databases and then enable the mirroring, this has all gone fine and we have lots of synchronised/mirrored databases now. However, if I do a failover the logins on the mirror are not valid, they are in SQL Server and also the database but they don’t work. I’ve read through other posts and found links to this SQL Server article:
http://support.microsoft.com/kb/918992/
This has had no effect though. Do I need to remove everything off my mirror and start again setting up the users first and then doing a backup/restore or is there some other way. Both servers are reporting the SID’s are the same for the logins which do not work. However the principle_ID is different, I'm quite sure if this is a problem or not?
Can anyone point me in the right direction of what to do next? Or have any ideas.
Thanks
Ed
I am quite sure the problem is just like your thread title orphaned logins
If you can, failover to the mirror server, and run this to list all orphaned logins in the database you want to fix (it's per-database level, not per-server-instance)
EXEC sp_change_users_login 'report'
I imagine you just have to fix them on the mirrored servers, and then failback to the primary server again after it's fixed and working on the mirror server
|||
Thanks,
I've just run that as you said and it's not showing the SQL Login I need in the database. Can you describe how I can fix/add that user?
The sp_change_users_login 'report' stored proc, does that list the users which should be there but aren't or those which are there which are supposed to be in the DB?
The SQL Login is showing in the User group for the database but not when I run the EXEC sp_change_users_login 'report' command?
Thanks
Ed
Orphaned login is where the login exist at the server level, but they are not linked to the login credentials stored inside each database
I'd say first step is to open the login under Server -> Security -> pick the login -> User Mapping
if it's all blank, it's most likely orphaned. When you try to add permission on the database, it'll give you an error <- this almost guarantees it's orphaned
Then see this thread on how to auto-fix them
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=12615
|||Search this forum for 'orphaned'.
|||Hi, thanks for the help so far it’s much appreciated and very helpfull.
It appears the SP to fix the orphaned users did work; however, I now have a different problem.
The databases I am mirroring are used by our web site so in our web pages we have connection strings (and a few even use ODBC connections). In the connection strings we use an IP Address of the server (or server name) and database name/SQL Server login details.
Let’s say my principle server is 192.168.3.50 and my Mirror is 192.168.3.51 and my Witness is 192.168.3.52.
My web pages all use 192.168.3.50 as the server in their connection string, however when the database used is failed over, the active database now lives on 192.168.3.51, at this point the web page can’t find the database (as it isn’t active on the principle (192.168.3.50) any more) so reports a login failure. What I guess I need is some method for SQL server to automatically pull the data from 192.168.3.51 when 3.51 is active…. Does that make sense? So if the database on 192.168.3.50 is damaged the same server is still accessed by applications but data is pulled from 192.168.3.51 instead
If there any SQL Server mechanism I can set-up so the database continues to service requests seamlessly regardless to which server the database is currently active on?
Thanks
Ed
|||this is off topic already, you should mark this one as answered, and create a new thread
in short, you should read more into mirroring and search a bit
other than .Net ADO which supports builtin failover server connection string, you have to handle the failover in the client side, on your own
it is beyond SQL server's scope.
We use DNS Alias so we can change the IP on the DNS without changing configurations for applications
but that means we don't have AUTOMATIC FAILOVER at all, but a manual failover with shorter down time (provided we get notified and react quickly)