Showing posts with label log. Show all posts
Showing posts with label log. Show all posts

Wednesday, March 28, 2012

Problem with SQL Service Pack 4

You can review the setup log for any errors (file called sqlsp.log in the
windows directory). It is perfectly safe to run SP4 again to try and make it
stick (assuming you have the system database backups just in case you need
to regress)
HTH,
Jasper Smith (SQL Server MVP)
http://www.sqldbatips.com
"Leon Parker" <u23479@.uwe> wrote in message news:625d255c1f101@.uwe...
>I upgraded from SQL 2000 Service Pack 3 to SQL 2000 Service Pack 4. The
> install says it completed but after I rebooted and did a select @.@.version
> it
> still shows SP3. I only have a default instance so I know that it
> installed
> on the right instance. Could anyone help me out with this?I tried it several times but got the same result.
I've attached a copy of my sqlsp.log file. I looked at the sqlsp.log file
and it only listed one non-fatal error...I can't see this being the problem
considering it was nonfatal.
Jasper Smith wrote:[vbcol=seagreen]
>You can review the setup log for any errors (file called sqlsp.log in the
>windows directory). It is perfectly safe to run SP4 again to try and make i
t
>stick (assuming you have the system database backups just in case you need
>to regress)
>|||I upgraded from SQL 2000 Service Pack 3 to SQL 2000 Service Pack 4. The
install says it completed but after I rebooted and did a select @.@.version it
still shows SP3. I only have a default instance so I know that it installed
on the right instance. Could anyone help me out with this?|||You can review the setup log for any errors (file called sqlsp.log in the
windows directory). It is perfectly safe to run SP4 again to try and make it
stick (assuming you have the system database backups just in case you need
to regress)
HTH,
Jasper Smith (SQL Server MVP)
http://www.sqldbatips.com
"Leon Parker" <u23479@.uwe> wrote in message news:625d255c1f101@.uwe...
>I upgraded from SQL 2000 Service Pack 3 to SQL 2000 Service Pack 4. The
> install says it completed but after I rebooted and did a select @.@.version
> it
> still shows SP3. I only have a default instance so I know that it
> installed
> on the right instance. Could anyone help me out with this?|||I tried it several times but got the same result.
I've attached a copy of my sqlsp.log file. I looked at the sqlsp.log file
and it only listed one non-fatal error...I can't see this being the problem
considering it was nonfatal.
Jasper Smith wrote:[vbcol=seagreen]
>You can review the setup log for any errors (file called sqlsp.log in the
>windows directory). It is perfectly safe to run SP4 again to try and make i
t
>stick (assuming you have the system database backups just in case you need
>to regress)
>|||What does the following query return?
SELECT SERVERPROPERTY('ProductLevel')
Hope this helps.
Dan Guzman
SQL Server MVP
"Leon Parker" <u23479@.uwe> wrote in message news:625d255c1f101@.uwe...
>I upgraded from SQL 2000 Service Pack 3 to SQL 2000 Service Pack 4. The
> install says it completed but after I rebooted and did a select @.@.version
> it
> still shows SP3. I only have a default instance so I know that it
> installed
> on the right instance. Could anyone help me out with this?|||What does the following query return?
SELECT SERVERPROPERTY('ProductLevel')
Hope this helps.
Dan Guzman
SQL Server MVP
"Leon Parker" <u23479@.uwe> wrote in message news:625d255c1f101@.uwe...
>I upgraded from SQL 2000 Service Pack 3 to SQL 2000 Service Pack 4. The
> install says it completed but after I rebooted and did a select @.@.version
> it
> still shows SP3. I only have a default instance so I know that it
> installed
> on the right instance. Could anyone help me out with this?|||SP3....
Dan Guzman wrote:[vbcol=seagreen]
>What does the following query return?
> SELECT SERVERPROPERTY('ProductLevel')
>
Message posted via droptable.com
http://www.droptable.com/Uwe/Forum...server/200606/1|||SP3....
Dan Guzman wrote:[vbcol=seagreen]
>What does the following query return?
> SELECT SERVERPROPERTY('ProductLevel')
>
Message posted via droptable.com
http://www.droptable.com/Uwe/Forum...server/200606/1

Problem with SQL Server Agent.

SQL Server 2000 sp3 on Windows 2003. I am getting the
following error in the sql server agent log and I am not
able to run any of my jobs. sql server lightweight pooling
setting is set to 0.
[298] SQLServer Error: 18452, Login failed for
user '(null)'. Reason: Not associated with a trusted SQL
Server connection. [SQLSTATE 28000]
Thanks in Advance.
I have gotten this sometime when I use windows logins as the owner of a job.
I think it has something to do with our domain controller being unavailable
sometimes. When error occurs I have changed the owner to a sql server login
and the problems goes away.
----
Need SQL Server Examples check out my website at
http://www.geocities.com/sqlserverexamples
"Obaid" <anonymous@.discussions.microsoft.com> wrote in message
news:5fb401c42dff$58db8b70$a601280a@.phx.gbl...
> SQL Server 2000 sp3 on Windows 2003. I am getting the
> following error in the sql server agent log and I am not
> able to run any of my jobs. sql server lightweight pooling
> setting is set to 0.
> [298] SQLServer Error: 18452, Login failed for
> user '(null)'. Reason: Not associated with a trusted SQL
> Server connection. [SQLSTATE 28000]
> Thanks in Advance.
|||If you server is in Mixed Mode set the owner of the job to be SA instead of the creater. Otherwise set the owner to be the same Network ID that SQLServer is running as.
Jeff Duncan
MCDBA, MCSE+I
sql

Problem with SQL Server Agent.

SQL Server 2000 sp3 on Windows 2003. I am getting the
following error in the sql server agent log and I am not
able to run any of my jobs. sql server lightweight pooling
setting is set to 0.
[298] SQLServer Error: 18452, Login failed for
user '(null)'. Reason: Not associated with a trusted SQL
Server connection. [SQLSTATE 28000]
Thanks in Advance.I have gotten this sometime when I use windows logins as the owner of a job.
I think it has something to do with our domain controller being unavailable
sometimes. When error occurs I have changed the owner to a sql server login
and the problems goes away.
--
----
----
--
Need SQL Server Examples check out my website at
http://www.geocities.com/sqlserverexamples
"Obaid" <anonymous@.discussions.microsoft.com> wrote in message
news:5fb401c42dff$58db8b70$a601280a@.phx.gbl...
> SQL Server 2000 sp3 on Windows 2003. I am getting the
> following error in the sql server agent log and I am not
> able to run any of my jobs. sql server lightweight pooling
> setting is set to 0.
> [298] SQLServer Error: 18452, Login failed for
> user '(null)'. Reason: Not associated with a trusted SQL
> Server connection. [SQLSTATE 28000]
> Thanks in Advance.|||If you server is in Mixed Mode set the owner of the job to be SA instead of the creater. Otherwise set the owner to be the same Network ID that SQLServer is running as
Jeff Dunca
MCDBA, MCSE+I

Problem with SQL Server Agent.

SQL Server 2000 sp3 on Windows 2003. I am getting the
following error in the sql server agent log and I am not
able to run any of my jobs. sql server lightweight pooling
setting is set to 0.
[298] SQLServer Error: 18452, Login failed for
user '(null)'. Reason: Not associated with a trusted SQL
Server connection. [SQLSTATE 28000]
Thanks in Advance.I have gotten this sometime when I use windows logins as the owner of a job.
I think it has something to do with our domain controller being unavailable
sometimes. When error occurs I have changed the owner to a sql server login
and the problems goes away.
----
----
--
Need SQL Server Examples check out my website at
http://www.geocities.com/sqlserverexamples
"Obaid" <anonymous@.discussions.microsoft.com> wrote in message
news:5fb401c42dff$58db8b70$a601280a@.phx.gbl...
> SQL Server 2000 sp3 on Windows 2003. I am getting the
> following error in the sql server agent log and I am not
> able to run any of my jobs. sql server lightweight pooling
> setting is set to 0.
> [298] SQLServer Error: 18452, Login failed for
> user '(null)'. Reason: Not associated with a trusted SQL
> Server connection. [SQLSTATE 28000]
> Thanks in Advance.|||If you server is in Mixed Mode set the owner of the job to be SA instead of
the creater. Otherwise set the owner to be the same Network ID that SQLSer
ver is running as.
Jeff Duncan
MCDBA, MCSE+I

Problem with SQL Server 2005 Standard Edition installation

Hello,

When I try to install SQL Server 2005 Standard Edition, Windows XP SP2, setup fails.

Please help!!!

This is log file:

..............................

Loaded DLL:
C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\DbgHelp.dll
Version:
6.5.3.7
MSI (s) (98:E8) [12:19:07:890]: Leaked MSIHANDLE (6010) of type 790531 for thread 2260
MSI (s) (98:E8) [12:19:07:890]: Leaked MSIHANDLE (6009) of type 790540 for thread 2260
MSI (s) (98:E8) [12:19:07:890]: Leaked MSIHANDLE (6008) of type 790541 for thread 2260
MSI (s) (98:E8) [12:19:07:890]: Leaked MSIHANDLE (5973) of type 790541 for thread 2260
MSI (s) (98:E8) [12:19:07:890]: Leaked MSIHANDLE (5970) of type 790531 for thread 2260
MSI (s) (98:E8) [12:19:07:890]: Note: 1: 2769 2: Write_sqlLocalServers.D20239D7_E87C_40C9_9837_E70B8D4882C2 3: 5


Info 2769.The installer has encountered an unexpected error. The error code is 2769. Custom Action Write_sqlLocalServers.D20239D7_E87C_40C9_9837_E70B8D4882C2 did not close 5 MSIHANDLEs.
MSI (s) (98:2C) [12:19:07:890]: Machine policy value 'DisableRollback' is 0
MSI (s) (98:2C) [12:19:07:890]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Rollback\Scripts 3: 2
Action ended 12:19:07: Write_sqlLocalServers.D20239D7_E87C_40C9_9837_E70B8D4882C2. Return value 3.
MSI (s) (98:2C) [12:19:07:890]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Rollback\Scripts 3: 2
MSI (s) (98:2C) [12:19:07:890]: No System Restore sequence number for this installation.
MSI (s) (98:2C) [12:19:07:890]: Unlocking Server
Action ended 12:19:07: INSTALL. Return value 3.
Property(S): ProductCode = {28B22773-100E-4AF2-A1C9-2F2EA8A35844}
Property(S): ProductLanguage = 1033

You did not say what version of XP you are running because you cannot install SQL Server 2005 Standard in XP Home, if you are running Media edition or Pro copy the content of the CDs/DVD into a folder in your C drive and run setup from your C drive. One more thing if you intend to install Reporting Services make sure IIS is running or the installer will skip it without telling you why. Hope this helps.

|||From the error message in the log, it appears that you have a setting on your machine which is preventing the systemstate backup to be rolled back. Check with your network administrator about disabling this setting.|||

I have Windows XP professional. IIS is running. Installation from C is also failed.

May be, I uninstalled incorrectly beta-version of Visual studio 2005 and/or SQL Server 2005.

I uninstalled all components and then cleaned register, but it didn't help.

Thanks.

Gato.

|||

Please comment what setting "is preventing the systemstate backup to be rolled back" , where and how can I check that?

I work without network administrator .

Thanks,

Gato.

|||

Gato wrote:

I have Windows XP professional. IIS is running. Installation from C is also failed.

May be, I uninstalled incorrectly beta-version of Visual studio 2005 and/or SQL Server 2005.

I uninstalled all components and then cleaned register, but it didn't help.

Thanks.

Gato.

Lets start with some WinXP system restore to the last available restore point and copy the files to the C and install from C drive. And I just noticed you are not running the standard setup, because I know the bootstrap setup runs for a short while and terminates. The 2005 installer is very easy I know because I had installed 2000 on all operating systems including 64bits except Vista and it was a pain but installing 2005 was a breeze. Keep me posted and pay attention to the installer don't answer questions not relevant to you.

Monday, March 26, 2012

problem with space

HI friends,
I've got one question. When I realize "log in" in my sql server, I am using
SP like this:
CREATE Procedure CustomerLogin
(
@.Email nvarchar(30),
@.Pwd nvarchar(10),
@.CustomerID int OUTPUT
)
AS
SELECT
@.CustomerID = CustomerID
FROM
Customers
WHERE
Email = @.Email COLLATE SQL_Latin1_General_CP1_CS_AS
AND
Pwd =@.Pwd COLLATE SQL_Latin1_General_CP1_CS_AS
IF @.@.Rowcount < 1
SELECT
@.CustomerID = 0
GO
The problem is that if the password is "qweqwe" and I try to log in with
"qweqwe " or even "qweqwe " (I mean with space after last symbol) it
succeed!!!
Interesting but if I try to log in with " qweqwe" (I mean with space in
beginning) it not succeed.
I don't know why. Could you please somebody help me?Because the trailing spaces are being removed. When you use
the password ' qweqwe' it's not a trailing space so it is
included in the string.
If you want to test to verify, just print out a
len(@.password) before the select.
-Sue
On Tue, 22 Feb 2005 01:45:47 -0000, "Mango"
<mitko762002@.yahoo.com> wrote:

>HI friends,
>I've got one question. When I realize "log in" in my sql server, I am using
>SP like this:
>CREATE Procedure CustomerLogin
>(
> @.Email nvarchar(30),
> @.Pwd nvarchar(10),
> @.CustomerID int OUTPUT
> )
>AS
>
>SELECT
> @.CustomerID = CustomerID
>
>FROM
> Customers
>
>WHERE
> Email = @.Email COLLATE SQL_Latin1_General_CP1_CS_AS
> AND
> Pwd =@.Pwd COLLATE SQL_Latin1_General_CP1_CS_AS
>
>IF @.@.Rowcount < 1
>SELECT
> @.CustomerID = 0
>GO
>
>The problem is that if the password is "qweqwe" and I try to log in with
>"qweqwe " or even "qweqwe " (I mean with space after last symbol) it
>succeed!!!
>Interesting but if I try to log in with " qweqwe" (I mean with space in
>beginning) it not succeed.
>I don't know why. Could you please somebody help me?
>

problem with space

HI friends,
I've got one question. When I realize "log in" in my sql server, I am using
SP like this:
CREATE Procedure CustomerLogin
(
@.Email nvarchar(30),
@.Pwd nvarchar(10),
@.CustomerID int OUTPUT
)
AS
SELECT
@.CustomerID = CustomerID
FROM
Customers
WHERE
Email = @.Email COLLATE SQL_Latin1_General_CP1_CS_AS
AND
Pwd =@.Pwd COLLATE SQL_Latin1_General_CP1_CS_AS
IF @.@.Rowcount < 1
SELECT
@.CustomerID = 0
GO
The problem is that if the password is "qweqwe" and I try to log in with
"qweqwe " or even "qweqwe " (I mean with space after last symbol) it
succeed!!!
Interesting but if I try to log in with " qweqwe" (I mean with space in
beginning) it not succeed.
I don't know why. Could you please somebody help me?
Post the DDL for your Customers table. Specifically, what's datatype of
the Pwd column?
*mike hodgson* |/ database administrator/ | mallesons stephen jaques
*T* +61 (2) 9296 3668 |* F* +61 (2) 9296 3885 |* M* +61 (408) 675 907
*E* mailto:mike.hodgson@.mallesons.nospam.com |* W* http://www.mallesons.com
Mango wrote:

>HI friends,
>I've got one question. When I realize "log in" in my sql server, I am using
>SP like this:
>CREATE Procedure CustomerLogin
>(
> @.Email nvarchar(30),
> @.Pwd nvarchar(10),
> @.CustomerID int OUTPUT
>)
>AS
>
>SELECT
> @.CustomerID = CustomerID
>
>FROM
> Customers
>
>WHERE
> Email = @.Email COLLATE SQL_Latin1_General_CP1_CS_AS
> AND
> Pwd =@.Pwd COLLATE SQL_Latin1_General_CP1_CS_AS
>
>IF @.@.Rowcount < 1
>SELECT
> @.CustomerID = 0
>GO
>
>The problem is that if the password is "qweqwe" and I try to log in with
>"qweqwe " or even "qweqwe " (I mean with space after last symbol) it
>succeed!!!
>Interesting but if I try to log in with " qweqwe" (I mean with space in
>beginning) it not succeed.
>I don't know why. Could you please somebody help me?
>
>
|||the datatype of Pwd is nvarchar. I found that is working corect if i write
it like this:
CREATE Procedure CustomerLogin
(
@.Email nvarchar(80),
@.Pwd nvarchar(50),
@.CustomerID int OUTPUT
)
AS
SELECT
@.CustomerID = CustomerID
FROM
Customers
WHERE
Email + '1' = @.Email COLLATE SQL_Latin1_General_CP1_CS_AS + '1'
AND
Pwd + '1'=@.Pwd COLLATE SQL_Latin1_General_CP1_CS_AS + '1'
IF @.@.Rowcount < 1
SELECT
@.CustomerID = 0
GO
But I am sure this is not the best approach
"Mike Hodgson" <mike.hodgson@.mallesons.nospam.com> wrote in message
news:#t9fdRIGFHA.2608@.TK2MSFTNGP10.phx.gbl...
> Post the DDL for your Customers table. Specifically, what's datatype of
> the Pwd column?
> --
> *mike hodgson* |/ database administrator/ | mallesons stephen jaques
> *T* +61 (2) 9296 3668 |* F* +61 (2) 9296 3885 |* M* +61 (408) 675 907
> *E* mailto:mike.hodgson@.mallesons.nospam.com |* W*
http://www.mallesons.com[vbcol=seagreen]
>
> Mango wrote:
using[vbcol=seagreen]
it
>

Friday, March 23, 2012

problem with space

HI friends,
I've got one question. When I realize "log in" in my sql server, I am using
SP like this:
CREATE Procedure CustomerLogin
(
@.Email nvarchar(30),
@.Pwd nvarchar(10),
@.CustomerID int OUTPUT
)
AS
SELECT
@.CustomerID = CustomerID
FROM
Customers
WHERE
Email = @.Email COLLATE SQL_Latin1_General_CP1_CS_AS
AND
Pwd =@.Pwd COLLATE SQL_Latin1_General_CP1_CS_AS
IF @.@.Rowcount < 1
SELECT
@.CustomerID = 0
GO
The problem is that if the password is "qweqwe" and I try to log in with
"qweqwe " or even "qweqwe " (I mean with space after last symbol) it
succeed!!!
Interesting but if I try to log in with " qweqwe" (I mean with space in
beginning) it not succeed.
I don't know why. Could you please somebody help me?Post the DDL for your Customers table. Specifically, what's datatype of
the Pwd column?
*mike hodgson* |/ database administrator/ | mallesons stephen jaques
*T* +61 (2) 9296 3668 |* F* +61 (2) 9296 3885 |* M* +61 (408) 675 907
*E* mailto:mike.hodgson@.mallesons.nospam.com |* W* http://www.mallesons.com
Mango wrote:

>HI friends,
>I've got one question. When I realize "log in" in my sql server, I am using
>SP like this:
>CREATE Procedure CustomerLogin
>(
> @.Email nvarchar(30),
> @.Pwd nvarchar(10),
> @.CustomerID int OUTPUT
> )
>AS
>
>SELECT
> @.CustomerID = CustomerID
>
>FROM
> Customers
>
>WHERE
> Email = @.Email COLLATE SQL_Latin1_General_CP1_CS_AS
> AND
> Pwd =@.Pwd COLLATE SQL_Latin1_General_CP1_CS_AS
>
>IF @.@.Rowcount < 1
>SELECT
> @.CustomerID = 0
>GO
>
>The problem is that if the password is "qweqwe" and I try to log in with
>"qweqwe " or even "qweqwe " (I mean with space after last symbol) it
>succeed!!!
>Interesting but if I try to log in with " qweqwe" (I mean with space in
>beginning) it not succeed.
>I don't know why. Could you please somebody help me?
>
>|||the datatype of Pwd is nvarchar. I found that is working corect if i write
it like this:
CREATE Procedure CustomerLogin
(
@.Email nvarchar(80),
@.Pwd nvarchar(50),
@.CustomerID int OUTPUT
)
AS
SELECT
@.CustomerID = CustomerID
FROM
Customers
WHERE
Email + '1' = @.Email COLLATE SQL_Latin1_General_CP1_CS_AS + '1'
AND
Pwd + '1'=@.Pwd COLLATE SQL_Latin1_General_CP1_CS_AS + '1'
IF @.@.Rowcount < 1
SELECT
@.CustomerID = 0
GO
But I am sure this is not the best approach
"Mike Hodgson" <mike.hodgson@.mallesons.nospam.com> wrote in message
news:#t9fdRIGFHA.2608@.TK2MSFTNGP10.phx.gbl...
> Post the DDL for your Customers table. Specifically, what's datatype of
> the Pwd column?
> --
> *mike hodgson* |/ database administrator/ | mallesons stephen jaques
> *T* +61 (2) 9296 3668 |* F* +61 (2) 9296 3885 |* M* +61 (408) 675 907
> *E* mailto:mike.hodgson@.mallesons.nospam.com |* W*
http://www.mallesons.com
>
> Mango wrote:
>
using[vbcol=seagreen]
it[vbcol=seagreen]
>sql

problem with space

HI friends,
I've got one question. When I realize "log in" in my sql server, I am using
SP like this:
CREATE Procedure CustomerLogin
(
@.Email nvarchar(30),
@.Pwd nvarchar(10),
@.CustomerID int OUTPUT
)
AS
SELECT
@.CustomerID = CustomerID
FROM
Customers
WHERE
Email = @.Email COLLATE SQL_Latin1_General_CP1_CS_AS
AND
Pwd =@.Pwd COLLATE SQL_Latin1_General_CP1_CS_AS
IF @.@.Rowcount < 1
SELECT
@.CustomerID = 0
GO
The problem is that if the password is "qweqwe" and I try to log in with
"qweqwe " or even "qweqwe " (I mean with space after last symbol) it
succeed!!!
Interesting but if I try to log in with " qweqwe" (I mean with space in
beginning) it not succeed.
I don't know why. Could you please somebody help me?This is a multi-part message in MIME format.
--020209070906080502050607
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Post the DDL for your Customers table. Specifically, what's datatype of
the Pwd column?
--
*mike hodgson* |/ database administrator/ | mallesons stephen jaques
*T* +61 (2) 9296 3668 |* F* +61 (2) 9296 3885 |* M* +61 (408) 675 907
*E* mailto:mike.hodgson@.mallesons.nospam.com |* W* http://www.mallesons.com
Mango wrote:
>HI friends,
>I've got one question. When I realize "log in" in my sql server, I am using
>SP like this:
>CREATE Procedure CustomerLogin
>(
> @.Email nvarchar(30),
> @.Pwd nvarchar(10),
> @.CustomerID int OUTPUT
>)
>AS
>
>SELECT
> @.CustomerID = CustomerID
>
>FROM
> Customers
>
>WHERE
> Email = @.Email COLLATE SQL_Latin1_General_CP1_CS_AS
> AND
> Pwd =@.Pwd COLLATE SQL_Latin1_General_CP1_CS_AS
>
>IF @.@.Rowcount < 1
>SELECT
> @.CustomerID = 0
>GO
>
>The problem is that if the password is "qweqwe" and I try to log in with
>"qweqwe " or even "qweqwe " (I mean with space after last symbol) it
>succeed!!!
>Interesting but if I try to log in with " qweqwe" (I mean with space in
>beginning) it not succeed.
>I don't know why. Could you please somebody help me?
>
>
--020209070906080502050607
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<tt>Post the DDL for your Customers table. Specifically, what's
datatype of the Pwd column?</tt><br>
<div class="moz-signature">
<title></title>
<meta http-equiv="Content-Type" content="text/html; ">
<p><span lang="en-au"><font face="Tahoma" size="2">--<br>
</font> </span><b><span lang="en-au"><font face="Tahoma" size="2">mike
hodgson</font></span></b><span lang="en-au"> <font face="Tahoma"
size="2">|</font><i><font face="Tahoma"> </font><font face="Tahoma"
size="2"> database administrator</font></i><font face="Tahoma" size="2">
| mallesons</font><font face="Tahoma"> </font><font face="Tahoma"
size="2">stephen</font><font face="Tahoma"> </font><font face="Tahoma"
size="2"> jaques</font><font face="Tahoma"><br>
</font><b><font face="Tahoma" size="2">T</font></b><font face="Tahoma"
size="2"> +61 (2) 9296 3668 |</font><b><font face="Tahoma"> </font><font
face="Tahoma" size="2"> F</font></b><font face="Tahoma" size="2"> +61
(2) 9296 3885 |</font><b><font face="Tahoma"> </font><font
face="Tahoma" size="2">M</font></b><font face="Tahoma" size="2"> +61
(408) 675 907</font><br>
<b><font face="Tahoma" size="2">E</font></b><font face="Tahoma" size="2">
<a href="http://links.10026.com/?link=mailto:mike.hodgson@.mallesons.nospam.com">
mailto:mike.hodgson@.mallesons.nospam.com</a> |</font><b><font
face="Tahoma"> </font><font face="Tahoma" size="2">W</font></b><font
face="Tahoma" size="2"> <a href="http://links.10026.com/?link=/">http://www.mallesons.com">
http://www.mallesons.com</a></font></span> </p>
</div>
<br>
<br>
Mango wrote:
<blockquote cite="miduqIMeBIGFHA.2180@.TK2MSFTNGP12.phx.gbl" type="cite">
<pre wrap="">HI friends,
I've got one question. When I realize "log in" in my sql server, I am using
SP like this:
CREATE Procedure CustomerLogin
(
@.Email nvarchar(30),
@.Pwd nvarchar(10),
@.CustomerID int OUTPUT
)
AS
SELECT
@.CustomerID = CustomerID
FROM
Customers
WHERE
Email = @.Email COLLATE SQL_Latin1_General_CP1_CS_AS
AND
Pwd =@.Pwd COLLATE SQL_Latin1_General_CP1_CS_AS
IF @.@.Rowcount < 1
SELECT
@.CustomerID = 0
GO
The problem is that if the password is "qweqwe" and I try to log in with
"qweqwe " or even "qweqwe " (I mean with space after last symbol) it
succeed!!!
Interesting but if I try to log in with " qweqwe" (I mean with space in
beginning) it not succeed.
I don't know why. Could you please somebody help me?
</pre>
</blockquote>
</body>
</html>
--020209070906080502050607--|||the datatype of Pwd is nvarchar. I found that is working corect if i write
it like this:
CREATE Procedure CustomerLogin
(
@.Email nvarchar(80),
@.Pwd nvarchar(50),
@.CustomerID int OUTPUT
)
AS
SELECT
@.CustomerID = CustomerID
FROM
Customers
WHERE
Email + '1' = @.Email COLLATE SQL_Latin1_General_CP1_CS_AS + '1'
AND
Pwd + '1'=@.Pwd COLLATE SQL_Latin1_General_CP1_CS_AS + '1'
IF @.@.Rowcount < 1
SELECT
@.CustomerID = 0
GO
But I am sure this is not the best approach
"Mike Hodgson" <mike.hodgson@.mallesons.nospam.com> wrote in message
news:#t9fdRIGFHA.2608@.TK2MSFTNGP10.phx.gbl...
> Post the DDL for your Customers table. Specifically, what's datatype of
> the Pwd column?
> --
> *mike hodgson* |/ database administrator/ | mallesons stephen jaques
> *T* +61 (2) 9296 3668 |* F* +61 (2) 9296 3885 |* M* +61 (408) 675 907
> *E* mailto:mike.hodgson@.mallesons.nospam.com |* W*
http://www.mallesons.com
>
> Mango wrote:
> >HI friends,
> >
> >I've got one question. When I realize "log in" in my sql server, I am
using
> >SP like this:
> >
> >CREATE Procedure CustomerLogin
> >
> >(
> >
> > @.Email nvarchar(30),
> >
> > @.Pwd nvarchar(10),
> >
> > @.CustomerID int OUTPUT
> >
> >)
> >
> >AS
> >
> >
> >
> >SELECT
> >
> > @.CustomerID = CustomerID
> >
> >
> >
> >FROM
> >
> > Customers
> >
> >
> >
> >WHERE
> >
> > Email = @.Email COLLATE SQL_Latin1_General_CP1_CS_AS
> >
> > AND
> >
> > Pwd =@.Pwd COLLATE SQL_Latin1_General_CP1_CS_AS
> >
> >
> >
> >IF @.@.Rowcount < 1
> >
> >SELECT
> >
> > @.CustomerID = 0
> >
> >GO
> >
> >
> >
> >The problem is that if the password is "qweqwe" and I try to log in with
> >"qweqwe " or even "qweqwe " (I mean with space after last symbol)
it
> >succeed!!!
> >
> >Interesting but if I try to log in with " qweqwe" (I mean with space in
> >beginning) it not succeed.
> >
> >I don't know why. Could you please somebody help me?
> >
> >
> >
> >
>

problem with sp_resolve_logins

I've set up SQL Server log shipping and I'm testing the failover process.
BOL says to run sp_resolve_logins from the target database. That failed for
me with the error: "Invalid object name 'syslogins'."
I searched google, and the consensus was that sp_resolve_logins has to be
run from master. When I did this, the procedure executed successfully, but
all the users in my database remained orphaned.
Next, I ran sp_helptext on sp_resolve_logins to see what's really happening.
It looks like when I ran it the first time from the target database it
failed on this (line 59):
SELECT *
INTO #sysloginstemp
FROM syslogins
WHERE sid = 0x00
because syslogins isn't qualified with master.dbo.
When run from master, it looks the reason it didn't fix the logins is
because of this line (93):
SELECT @.usrname = u.name
FROM dbo.sysusers u
,master.dbo.syslogins l
WHERE u.sid = @.lgnsid
AND l.loginname = @.lgnname
AND l.sid <> u.sid
Since I had to run it from master, it is going to check the sysusers table
of master, not my database, so there won't be any users to resolve.
Can someone tell me if I missed something important here? I came up with a
workaround, but I'd prefer to do it by the book.
I'm using SQL Server 2000 SP3. This particular instance was on the
developer edition, but I looked at sp_resolve_logins on an enterprise
edition machine and it's the same.
Thanks in advance for any insight,
Mike FormanHi Michael,
The Transact-SQL code for the sp_resolve_logins stored procedure
incorrectly uses the syslogins system table (syslogins resides in the
master database). The following code in the stored procedure causes the
error to occur:
SELECT *
INTO #sysloginstemp
FROM syslogins
WHERE sid = 0x00
You may check the following article.
310882 BUG: sp_resolve_logins Stored Procedure Fails If Executed During Log
http://support.microsoft.com/?id=310882
Bill Cheng
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
--
| From: "Michael Forman" <mforman@.factset.com>
| Subject: problem with sp_resolve_logins
| Date: Wed, 6 Aug 2003 16:49:03 -0400
| Lines: 41
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <OpdStwFXDHA.536@.TK2MSFTNGP10.phx.gbl>
| Newsgroups: microsoft.public.sqlserver.server
| NNTP-Posting-Host: inetuser.factset.com 164.55.1.103
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.sqlserver.server:299890
| X-Tomcat-NG: microsoft.public.sqlserver.server
|
| I've set up SQL Server log shipping and I'm testing the failover process.
| BOL says to run sp_resolve_logins from the target database. That failed
for
| me with the error: "Invalid object name 'syslogins'."
|
| I searched google, and the consensus was that sp_resolve_logins has to be
| run from master. When I did this, the procedure executed successfully,
but
| all the users in my database remained orphaned.
|
| Next, I ran sp_helptext on sp_resolve_logins to see what's really
happening.
| It looks like when I ran it the first time from the target database it
| failed on this (line 59):
| SELECT *
| INTO #sysloginstemp
| FROM syslogins
| WHERE sid = 0x00
|
| because syslogins isn't qualified with master.dbo.
|
| When run from master, it looks the reason it didn't fix the logins is
| because of this line (93):
| SELECT @.usrname = u.name
| FROM dbo.sysusers u
| ,master.dbo.syslogins l
| WHERE u.sid = @.lgnsid
| AND l.loginname = @.lgnname
| AND l.sid <> u.sid
|
| Since I had to run it from master, it is going to check the sysusers table
| of master, not my database, so there won't be any users to resolve.
|
| Can someone tell me if I missed something important here? I came up with
a
| workaround, but I'd prefer to do it by the book.
|
| I'm using SQL Server 2000 SP3. This particular instance was on the
| developer edition, but I looked at sp_resolve_logins on an enterprise
| edition machine and it's the same.
|
| Thanks in advance for any insight,
| Mike Forman
|
|
|

Problem with sp_OACreate

The sp_OACreate fails at nights it works fine at daytime, I checked the
Event Log, and saw below error message for every databases I have.
18278 :
Database log truncated: Database: DBNAME.
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:523AA016-9F7B-4CDA-A3DA-809E79084527@.microsoft.com...
> Hi
> You may want to try turning it off for a period and see if the problem
> persists. You need to asses the risk of doing this, such as
> http://support.microsoft.com/defaul...kb;en-us;309422
> John
> "Erdal Akbulut" wrote:
>
[url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_sp_oa-oz_3enj.asp[/ur
l]
any
ActiveX
Windows
ActiveXHi
I don't think that has anything to do with the error! You may want to check
if there are any scheduled virus scans at the time your error occurs.
John
"Erdal Akbulut" wrote:

> The sp_OACreate fails at nights it works fine at daytime, I checked the
> Event Log, and saw below error message for every databases I have.
> 18278 :
> Database log truncated: Database: DBNAME.
>
>
> "John Bell" <jbellnewsposts@.hotmail.com> wrote in message
> news:523AA016-9F7B-4CDA-A3DA-809E79084527@.microsoft.com...
> http://msdn.microsoft.com/library/d...
a-oz_3enj.asp
> any
> ActiveX
> Windows
> ActiveX
>
>|||Hi,
We have a wly scheduled Virus Scan on that machine.sp_OACreate fails more
than once in a w
Thanks,
Erdal
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:24CDDF90-D6DF-4BA7-A02D-84B6F5A5308A@.microsoft.com...
> Hi
> I don't think that has anything to do with the error! You may want to
check
> if there are any scheduled virus scans at the time your error occurs.
> John
> "Erdal Akbulut" wrote:
>
[url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_sp_oa-oz_3enj.asp[/ur
l]
there
using|||Hi
You may be better migrating to CDO.
John
"Erdal Akbulut" wrote:

> Hi,
> We have a wly scheduled Virus Scan on that machine.sp_OACreate fails mo
re
> than once in a w
> Thanks,
> Erdal
>
> "John Bell" <jbellnewsposts@.hotmail.com> wrote in message
> news:24CDDF90-D6DF-4BA7-A02D-84B6F5A5308A@.microsoft.com...
> check
> http://msdn.microsoft.com/library/d...
a-oz_3enj.asp
> there
> using
>
>|||John,
I am not sure if I can use CDOSYS.dll instead of CDONOTS.dll in my VB6
application. Actualy The Server is Win2003 and there was no CDONTS.dll I
copied and registered that dll.
Thanks.
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:0FBF1B85-A949-45A5-B2FE-B9FB780A4C25@.microsoft.com...
> Hi
> You may be better migrating to CDO.
> John
> "Erdal Akbulut" wrote:
>
more
the
problem
[url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_sp_oa-oz_3enj.asp[/ur
l]
VB
moved to
create|||Hi
I am still not sure why it runs during the day and not at night using the
same process, therefore to eliminate any incorrect configuration of
cdonts.dll it would be safer to use the native cdo. If that fails then the
issue is probably external to CDO.
John
"Erdal Akbulut" wrote:

> John,
> I am not sure if I can use CDOSYS.dll instead of CDONOTS.dll in my VB6
> application. Actualy The Server is Win2003 and there was no CDONTS.dll I
> copied and registered that dll.
> Thanks.
>
> "John Bell" <jbellnewsposts@.hotmail.com> wrote in message
> news:0FBF1B85-A949-45A5-B2FE-B9FB780A4C25@.microsoft.com...
> more
> the
> problem
> http://msdn.microsoft.com/library/d...
a-oz_3enj.asp
> VB
> moved to
> create
>
>

Problem with sp_add_log_file_recover_suspect_db

Hi...
I have a database that is marked as suspect, because the log file couldnt
grow more due to physical disk size.
I cant free any space on that drive.
Now i cant execute sp_add_log_file_recover_suspect_db. When i execute the
following command sp_add_log_file_recover_suspect_db 'Bitel mbH',
'logfile2', 'D:\SQLLogEx\log2.ldf', '10000MB'
I get the following error Server: Nachr.-Nr. 170, Schweregrad 15, Status 1,
Zeile 1
Zeile 1: Falsche Syntax in der Nhe von 'Bitel mbH'.
I have tried putting the database name in [] as well, then i get
Server: Nachr.-Nr. 156, Schweregrad 15, Status 1, Zeile 1
Falsche Syntax in der Nhe des ADD-Schlsselwortes.
Server: Nachr.-Nr. 170, Schweregrad 15, Status 1, Zeile 1
Zeile 1: Falsche Syntax in der Nhe von 'mbH'.
ALTER DATABASE Bitel mbH ADD LOG FILE(NAME = [logfile2], FILENAME =
'D:\SQLLogEx\log2.ldf', SIZE = 10000MB )
If i execute the alter database command directly i am told the some of the
files arent accesible.
I have a serious problem here, how do i solve it.
I have looked at
http://msdn.microsoft.com/library/de...tabse_4rol.asp
But none of the approaches seems open to me. The log is 145 GB, and i dont
have that amount of free space anywhere else on the system.
Can i do a detach and reconnect with a new number of logs or what can i do.
I Suspect the reason why the sp_add_log_file_recover_suspect_db doesn work
is because the name contains spaces, can i rename it, add a log, and rename
it back? (i unfortunately need the name to remain the same)
Regards
Jesper
Hi
Doe either of the follwing work?
sp_add_log_file_recover_suspect_db [Bitel mbH], 'logfile2',
'D:\SQLLogEx\log2.ldf', '10000MB'
sp_add_log_file_recover_suspect_db "Bitel mbH", 'logfile2',
'D:\SQLLogEx\log2.ldf', '10000MB'
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Jesper Nielsen" wrote:

> Hi...
> I have a database that is marked as suspect, because the log file couldnt
> grow more due to physical disk size.
> I cant free any space on that drive.
> Now i cant execute sp_add_log_file_recover_suspect_db. When i execute the
> following command sp_add_log_file_recover_suspect_db 'Bitel mbH',
> 'logfile2', 'D:\SQLLogEx\log2.ldf', '10000MB'
> I get the following error Server: Nachr.-Nr. 170, Schweregrad 15, Status 1,
> Zeile 1
> Zeile 1: Falsche Syntax in der N?he von 'Bitel mbH'.
> I have tried putting the database name in [] as well, then i get
> Server: Nachr.-Nr. 156, Schweregrad 15, Status 1, Zeile 1
> Falsche Syntax in der N?he des ADD-Schlüsselwortes.
> Server: Nachr.-Nr. 170, Schweregrad 15, Status 1, Zeile 1
> Zeile 1: Falsche Syntax in der N?he von 'mbH'.
> ALTER DATABASE Bitel mbH ADD LOG FILE(NAME = [logfile2], FILENAME =
> 'D:\SQLLogEx\log2.ldf', SIZE = 10000MB )
> If i execute the alter database command directly i am told the some of the
> files arent accesible.
> I have a serious problem here, how do i solve it.
> I have looked at
> http://msdn.microsoft.com/library/de...tabse_4rol.asp
> But none of the approaches seems open to me. The log is 145 GB, and i dont
> have that amount of free space anywhere else on the system.
> Can i do a detach and reconnect with a new number of logs or what can i do.
> I Suspect the reason why the sp_add_log_file_recover_suspect_db doesn work
> is because the name contains spaces, can i rename it, add a log, and rename
> it back? (i unfortunately need the name to remain the same)
> Regards
> Jesper
>
>
|||Hi...

> Doe either of the follwing work?
> sp_add_log_file_recover_suspect_db [Bitel mbH], 'logfile2',
> 'D:\SQLLogEx\log2.ldf', '10000MB'
> sp_add_log_file_recover_suspect_db "Bitel mbH", 'logfile2',
> 'D:\SQLLogEx\log2.ldf', '10000MB'
Unfortunately not, both yields the same result:
Server: Nachr.-Nr. 156, Schweregrad 15, Status 1, Zeile 1
Falsche Syntax in der Nhe des ADD-Schlsselwortes.
Server: Nachr.-Nr. 170, Schweregrad 15, Status 1, Zeile 1
Zeile 1: Falsche Syntax in der Nhe von 'mbH'.
ALTER DATABASE Bitel mbH ADD LOG FILE(NAME = [logfile2], FILENAME =
'D:\log2.ldf', SIZE = 10000MB )
As you can see in the result the command is not formatted correctly, which
also is why in the original post i had tried to run it directly (with the
result that it complained that some files werent accesible).
Any ideas?
Regards
Jesper (jln@.telebillingREMOVE.dk for direct mail)
|||Hi
Looks liek one of those system SP's that does not support object names that
does not conform to naming conventions.
I would open a call with Microsoft Product Support Services in your country.
They may be able to help.
Regards
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Jesper Nielsen" wrote:

> Hi...
>
> Unfortunately not, both yields the same result:
> Server: Nachr.-Nr. 156, Schweregrad 15, Status 1, Zeile 1
> Falsche Syntax in der N?he des ADD-Schlüsselwortes.
> Server: Nachr.-Nr. 170, Schweregrad 15, Status 1, Zeile 1
> Zeile 1: Falsche Syntax in der N?he von 'mbH'.
> ALTER DATABASE Bitel mbH ADD LOG FILE(NAME = [logfile2], FILENAME =
> 'D:\log2.ldf', SIZE = 10000MB )
> As you can see in the result the command is not formatted correctly, which
> also is why in the original post i had tried to run it directly (with the
> result that it complained that some files werent accesible).
> Any ideas?
> Regards
> Jesper (jln@.telebillingREMOVE.dk for direct mail)
>
>

Problem with sp_add_log_file_recover_suspect_db

Hi...
I have a database that is marked as suspect, because the log file couldnt
grow more due to physical disk size.
I cant free any space on that drive.
Now i cant execute sp_add_log_file_recover_suspect_db. When i execute the
following command sp_add_log_file_recover_suspect_db 'Bitel mbH',
'logfile2', 'D:\SQLLogEx\log2.ldf', '10000MB'
I get the following error Server: Nachr.-Nr. 170, Schweregrad 15, Status 1,
Zeile 1
Zeile 1: Falsche Syntax in der Nähe von 'Bitel mbH'.
I have tried putting the database name in [] as well, then i get
Server: Nachr.-Nr. 156, Schweregrad 15, Status 1, Zeile 1
Falsche Syntax in der Nähe des ADD-Schlüsselwortes.
Server: Nachr.-Nr. 170, Schweregrad 15, Status 1, Zeile 1
Zeile 1: Falsche Syntax in der Nähe von 'mbH'.
ALTER DATABASE Bitel mbH ADD LOG FILE(NAME = [logfile2], FILENAME = 'D:\SQLLogEx\log2.ldf', SIZE = 10000MB )
If i execute the alter database command directly i am told the some of the
files arent accesible.
I have a serious problem here, how do i solve it.
I have looked at
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/trblsql/tr_servdatabse_4rol.asp
But none of the approaches seems open to me. The log is 145 GB, and i dont
have that amount of free space anywhere else on the system.
Can i do a detach and reconnect with a new number of logs or what can i do.
I Suspect the reason why the sp_add_log_file_recover_suspect_db doesn work
is because the name contains spaces, can i rename it, add a log, and rename
it back? (i unfortunately need the name to remain the same)
Regards
JesperHi
Doe either of the follwing work?
sp_add_log_file_recover_suspect_db [Bitel mbH], 'logfile2',
'D:\SQLLogEx\log2.ldf', '10000MB'
sp_add_log_file_recover_suspect_db "Bitel mbH", 'logfile2',
'D:\SQLLogEx\log2.ldf', '10000MB'
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Jesper Nielsen" wrote:
> Hi...
> I have a database that is marked as suspect, because the log file couldnt
> grow more due to physical disk size.
> I cant free any space on that drive.
> Now i cant execute sp_add_log_file_recover_suspect_db. When i execute the
> following command sp_add_log_file_recover_suspect_db 'Bitel mbH',
> 'logfile2', 'D:\SQLLogEx\log2.ldf', '10000MB'
> I get the following error Server: Nachr.-Nr. 170, Schweregrad 15, Status 1,
> Zeile 1
> Zeile 1: Falsche Syntax in der Nähe von 'Bitel mbH'.
> I have tried putting the database name in [] as well, then i get
> Server: Nachr.-Nr. 156, Schweregrad 15, Status 1, Zeile 1
> Falsche Syntax in der Nähe des ADD-Schlüsselwortes.
> Server: Nachr.-Nr. 170, Schweregrad 15, Status 1, Zeile 1
> Zeile 1: Falsche Syntax in der Nähe von 'mbH'.
> ALTER DATABASE Bitel mbH ADD LOG FILE(NAME = [logfile2], FILENAME => 'D:\SQLLogEx\log2.ldf', SIZE = 10000MB )
> If i execute the alter database command directly i am told the some of the
> files arent accesible.
> I have a serious problem here, how do i solve it.
> I have looked at
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/trblsql/tr_servdatabse_4rol.asp
> But none of the approaches seems open to me. The log is 145 GB, and i dont
> have that amount of free space anywhere else on the system.
> Can i do a detach and reconnect with a new number of logs or what can i do.
> I Suspect the reason why the sp_add_log_file_recover_suspect_db doesn work
> is because the name contains spaces, can i rename it, add a log, and rename
> it back? (i unfortunately need the name to remain the same)
> Regards
> Jesper
>
>|||Hi...
> Doe either of the follwing work?
> sp_add_log_file_recover_suspect_db [Bitel mbH], 'logfile2',
> 'D:\SQLLogEx\log2.ldf', '10000MB'
> sp_add_log_file_recover_suspect_db "Bitel mbH", 'logfile2',
> 'D:\SQLLogEx\log2.ldf', '10000MB'
Unfortunately not, both yields the same result:
Server: Nachr.-Nr. 156, Schweregrad 15, Status 1, Zeile 1
Falsche Syntax in der Nähe des ADD-Schlüsselwortes.
Server: Nachr.-Nr. 170, Schweregrad 15, Status 1, Zeile 1
Zeile 1: Falsche Syntax in der Nähe von 'mbH'.
ALTER DATABASE Bitel mbH ADD LOG FILE(NAME = [logfile2], FILENAME ='D:\log2.ldf', SIZE = 10000MB )
As you can see in the result the command is not formatted correctly, which
also is why in the original post i had tried to run it directly (with the
result that it complained that some files werent accesible).
Any ideas?
Regards
Jesper (jln@.telebillingREMOVE.dk for direct mail)|||Hi
Looks liek one of those system SP's that does not support object names that
does not conform to naming conventions.
I would open a call with Microsoft Product Support Services in your country.
They may be able to help.
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Jesper Nielsen" wrote:
> Hi...
> > Doe either of the follwing work?
> > sp_add_log_file_recover_suspect_db [Bitel mbH], 'logfile2',
> > 'D:\SQLLogEx\log2.ldf', '10000MB'
> > sp_add_log_file_recover_suspect_db "Bitel mbH", 'logfile2',
> > 'D:\SQLLogEx\log2.ldf', '10000MB'
> Unfortunately not, both yields the same result:
> Server: Nachr.-Nr. 156, Schweregrad 15, Status 1, Zeile 1
> Falsche Syntax in der Nähe des ADD-Schlüsselwortes.
> Server: Nachr.-Nr. 170, Schweregrad 15, Status 1, Zeile 1
> Zeile 1: Falsche Syntax in der Nähe von 'mbH'.
> ALTER DATABASE Bitel mbH ADD LOG FILE(NAME = [logfile2], FILENAME => 'D:\log2.ldf', SIZE = 10000MB )
> As you can see in the result the command is not formatted correctly, which
> also is why in the original post i had tried to run it directly (with the
> result that it complained that some files werent accesible).
> Any ideas?
> Regards
> Jesper (jln@.telebillingREMOVE.dk for direct mail)
>
>sql

Problem with sp_add_log_file_recover_suspect_db

Hi...
I have a database that is marked as suspect, because the log file couldnt
grow more due to physical disk size.
I cant free any space on that drive.
Now i cant execute sp_add_log_file_recover_suspect_db. When i execute the
following command sp_add_log_file_recover_suspect_db 'Bitel mbH',
'logfile2', 'D:\SQLLogEx\log2.ldf', '10000MB'
I get the following error Server: Nachr.-Nr. 170, Schweregrad 15, Status 1,
Zeile 1
Zeile 1: Falsche Syntax in der Nhe von 'Bitel mbH'.
I have tried putting the database name in [] as well, then i get
Server: Nachr.-Nr. 156, Schweregrad 15, Status 1, Zeile 1
Falsche Syntax in der Nhe des ADD-Schlsselwortes.
Server: Nachr.-Nr. 170, Schweregrad 15, Status 1, Zeile 1
Zeile 1: Falsche Syntax in der Nhe von 'mbH'.
ALTER DATABASE Bitel mbH ADD LOG FILE(NAME = [logfile2], FILENAME =
'D:\SQLLogEx\log2.ldf', SIZE = 10000MB )
If i execute the alter database command directly i am told the some of the
files arent accesible.
I have a serious problem here, how do i solve it.
I have looked at
tabse_4rol.asp" target="_blank">http://msdn.microsoft.com/library/d...
tabse_4rol.asp
But none of the approaches seems open to me. The log is 145 GB, and i dont
have that amount of free space anywhere else on the system.
Can i do a detach and reconnect with a new number of logs or what can i do.
I Suspect the reason why the sp_add_log_file_recover_suspect_db doesn work
is because the name contains spaces, can i rename it, add a log, and rename
it back? (i unfortunately need the name to remain the same)
Regards
JesperHi
Doe either of the follwing work?
sp_add_log_file_recover_suspect_db [Bitel mbH], 'logfile2',
'D:\SQLLogEx\log2.ldf', '10000MB'
sp_add_log_file_recover_suspect_db "Bitel mbH", 'logfile2',
'D:\SQLLogEx\log2.ldf', '10000MB'
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Jesper Nielsen" wrote:

> Hi...
> I have a database that is marked as suspect, because the log file couldnt
> grow more due to physical disk size.
> I cant free any space on that drive.
> Now i cant execute sp_add_log_file_recover_suspect_db. When i execute the
> following command sp_add_log_file_recover_suspect_db 'Bitel mbH',
> 'logfile2', 'D:\SQLLogEx\log2.ldf', '10000MB'
> I get the following error Server: Nachr.-Nr. 170, Schweregrad 15, Status 1
,
> Zeile 1
> Zeile 1: Falsche Syntax in der N?he von 'Bitel mbH'.
> I have tried putting the database name in [] as well, then i get
> Server: Nachr.-Nr. 156, Schweregrad 15, Status 1, Zeile 1
> Falsche Syntax in der N?he des ADD-Schlüsselwortes.
> Server: Nachr.-Nr. 170, Schweregrad 15, Status 1, Zeile 1
> Zeile 1: Falsche Syntax in der N?he von 'mbH'.
> ALTER DATABASE Bitel mbH ADD LOG FILE(NAME = [logfile2], FILENAME =
> 'D:\SQLLogEx\log2.ldf', SIZE = 10000MB )
> If i execute the alter database command directly i am told the some of the
> files arent accesible.
> I have a serious problem here, how do i solve it.
> I have looked at
> databse_4rol.asp" target="_blank">http://msdn.microsoft.com/library/d...atabse_4rol.asp
> But none of the approaches seems open to me. The log is 145 GB, and i dont
> have that amount of free space anywhere else on the system.
> Can i do a detach and reconnect with a new number of logs or what can i do
.
> I Suspect the reason why the sp_add_log_file_recover_suspect_db doesn work
> is because the name contains spaces, can i rename it, add a log, and renam
e
> it back? (i unfortunately need the name to remain the same)
> Regards
> Jesper
>
>|||Hi...

> Doe either of the follwing work?
> sp_add_log_file_recover_suspect_db [Bitel mbH], 'logfile2',
> 'D:\SQLLogEx\log2.ldf', '10000MB'
> sp_add_log_file_recover_suspect_db "Bitel mbH", 'logfile2',
> 'D:\SQLLogEx\log2.ldf', '10000MB'
Unfortunately not, both yields the same result:
Server: Nachr.-Nr. 156, Schweregrad 15, Status 1, Zeile 1
Falsche Syntax in der Nhe des ADD-Schlsselwortes.
Server: Nachr.-Nr. 170, Schweregrad 15, Status 1, Zeile 1
Zeile 1: Falsche Syntax in der Nhe von 'mbH'.
ALTER DATABASE Bitel mbH ADD LOG FILE(NAME = [logfile2], FILENAME =
'D:\log2.ldf', SIZE = 10000MB )
As you can see in the result the command is not formatted correctly, which
also is why in the original post i had tried to run it directly (with the
result that it complained that some files werent accesible).
Any ideas?
Regards
Jesper (jln@.telebillingREMOVE.dk for direct mail)|||Hi
Looks liek one of those system SP's that does not support object names that
does not conform to naming conventions.
I would open a call with Microsoft Product Support Services in your country.
They may be able to help.
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Jesper Nielsen" wrote:

> Hi...
>
> Unfortunately not, both yields the same result:
> Server: Nachr.-Nr. 156, Schweregrad 15, Status 1, Zeile 1
> Falsche Syntax in der N?he des ADD-Schlüsselwortes.
> Server: Nachr.-Nr. 170, Schweregrad 15, Status 1, Zeile 1
> Zeile 1: Falsche Syntax in der N?he von 'mbH'.
> ALTER DATABASE Bitel mbH ADD LOG FILE(NAME = [logfile2], FILENAME =
> 'D:\log2.ldf', SIZE = 10000MB )
> As you can see in the result the command is not formatted correctly, which
> also is why in the original post i had tried to run it directly (with the
> result that it complained that some files werent accesible).
> Any ideas?
> Regards
> Jesper (jln@.telebillingREMOVE.dk for direct mail)
>
>

Monday, March 12, 2012

Problem with SA account

Hi, all experts here,

Thank you very much for your kind attention.

I encountered a problem with SA account log on. This problem occured after I detached one of the database, and when I tried to connect to the server with SA account, the problem occured, the error message is: Cannot open user default database. Login failed. Login failed for user 'sa'. (Microsoft SQL Server, Error:4064)

I then logged on to the server with windows authentification as administrator of the machine, and I have changed the password for SA account as my new password, but when I tried to log on as SA with my new password, the problem still remained.

Would please any experts here give me som advices for why is that and what else could I try to figure it out?

Thank you very much and I am looking forward to hearing from you shortly.

With best regards,

Yours sincerely,

To answer my own question, I logged on as Windows authentification, and change the password for SA account via its properties dialogue, it works fine now.

But still not sure why it did not work when I executed the query to change its password with statement: alter login sa with password='new password' unlock.

Would any experts here know what is the problem with the above statement? Thanks a lot and it is much appreciated to hear from you for that. Thanks a lot.

With best regards,

Yours sincerely,

|||

Why because , each login has a defualt database... if that database is detached/deleted/offline/recovery mode then that login will not be able to login. Generally, you should never keep a user database as default database of SA. keep some system database as default database. Let me tell u , this was nothing related to Password.

Madhu

|||

Madhu is correct. You can change the default database using ALTER LOGIN. Please refer to BOL on ho wto use this statement: http://msdn2.microsoft.com/en-us/library/ms189828.aspx.

Let us know if you have any further question, we will be glad to help.

-Raul Garcia

SDE/T

SQL Server Engine

|||

Hi, thank you all for your very kind advices. It's been very helpful.

With best regards,

Yours sincerely,

Problem with SA account

Hi, all experts here,

Thank you very much for your kind attention.

I encountered a problem with SA account log on. This problem occured after I detached one of the database, and when I tried to connect to the server with SA account, the problem occured, the error message is: Cannot open user default database. Login failed. Login failed for user 'sa'. (Microsoft SQL Server, Error:4064)

I then logged on to the server with windows authentification as administrator of the machine, and I have changed the password for SA account as my new password, but when I tried to log on as SA with my new password, the problem still remained.

Would please any experts here give me som advices for why is that and what else could I try to figure it out?

Thank you very much and I am looking forward to hearing from you shortly.

With best regards,

Yours sincerely,

To answer my own question, I logged on as windows athentification, change the password for SA account via LOGINs properties. It works fine now.

|||

The reason that it worked when you changed it in the GUI is because when you opened the edit account window in the GUI you also changed the default database.

To get around this in the future log into the SQL Server with osql (the command line tool) and specify the -d flag with a name of a database such as master and you can get connected. You can then change the default database using the sp_defaultdb procedure or ALTER LOGIN (if SQL 2005).

|||

Hi, Mrdenny,

Thanks a lot for your kind advices.

With best regards,

Yours sincerely,

Saturday, February 25, 2012

Problem with profiling datetime

Hi,
SQL Server 2005 x64
I have a weird problem when analysing a trace log with DTA.
The problem is that the trace log include syntax error for datetime!!!
Ex. A date time parameter would appear like this in the trace window.
@.ClaimDate=''2006-03-27 00:00:00:000''
-- Note the two single quotes at the end and start...
Whe analysing, DTA give me this error
[Microsoft][SQL Native Client][SQL Server]Incorrect syntax near '2006'
I can't figue out how to change this so I can't profile any statement that
include date.
Please help!!!!
I will add a sample...since my initial post is not that clear...
That simple .NET code
SqlCommand cmd = new SqlCommand("select @.TestDate");
cmd.Parameters.AddWithValue("@.TestDate", DateTime.Now);
cmd.Connection = conn;
DateTime dt = (DateTime) cmd.ExecuteScalar();
The resulting trace log item is as follow
exec sp_executesql N'select @.TestDate',N'@.TestDate
datetime',@.TestDate=''2006-04-02 18:44:22:687''
Wich will fail when analyzed since there is a syntax error in the command
e.g. two single quote at the end and start of the date.
Please help!
"Martin Masse" wrote:

> Hi,
> SQL Server 2005 x64
> I have a weird problem when analysing a trace log with DTA.
> The problem is that the trace log include syntax error for datetime!!!
> Ex. A date time parameter would appear like this in the trace window.
> @.ClaimDate=''2006-03-27 00:00:00:000''
> -- Note the two single quotes at the end and start...
> Whe analysing, DTA give me this error
> [Microsoft][SQL Native Client][SQL Server]Incorrect syntax near '2006'
> I can't figue out how to change this so I can't profile any statement that
> include date.
> Please help!!!!
>
>
>
|||Martin Masse (MartinMasse@.discussions.microsoft.com) writes:
> I will add a sample...since my initial post is not that clear...
> That simple .NET code
> SqlCommand cmd = new SqlCommand("select @.TestDate");
> cmd.Parameters.AddWithValue("@.TestDate", DateTime.Now);
> cmd.Connection = conn;
> DateTime dt = (DateTime) cmd.ExecuteScalar();
> The resulting trace log item is as follow
> exec sp_executesql N'select @.TestDate',N'@.TestDate
> datetime',@.TestDate=''2006-04-02 18:44:22:687''
> Wich will fail when analyzed since there is a syntax error in the command
> e.g. two single quote at the end and start of the date.
> Please help!
I don't really have a suggestion how to work around this, as I have not
worked much with the DTA.
However, it is obviously a bug somewhere, although I can't tell whether
it is in SQL Trace, the Profiler or in SqlClient. Nevertheless I took
the liberty to submit a bug for it on the MSDN Product Feedback Cetnre,
http://lab.msdn.microsoft.com/Produc...x?feedbackId=F
DBK48153
What I noticed was that if I changed DateTime.Now to "DateTime.Now",
that is a string, I got the correct output in Profiler.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
|||Thanks Erland.
"Erland Sommarskog" wrote:

> Martin Masse (MartinMasse@.discussions.microsoft.com) writes:
> I don't really have a suggestion how to work around this, as I have not
> worked much with the DTA.
> However, it is obviously a bug somewhere, although I can't tell whether
> it is in SQL Trace, the Profiler or in SqlClient. Nevertheless I took
> the liberty to submit a bug for it on the MSDN Product Feedback Cetnre,
> http://lab.msdn.microsoft.com/Produc...x?feedbackId=F
> DBK48153
> What I noticed was that if I changed DateTime.Now to "DateTime.Now",
> that is a string, I got the correct output in Profiler.
> --
> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
> Books Online for SQL Server 2005 at
> http://www.microsoft.com/technet/pro...ads/books.mspx
> Books Online for SQL Server 2000 at
> http://www.microsoft.com/sql/prodinf...ons/books.mspx
>