Showing posts with label space. Show all posts
Showing posts with label space. Show all posts

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_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)
>
>