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?
>
Showing posts with label friends. Show all posts
Showing posts with label friends. 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?
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
>
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
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?
> >
> >
> >
> >
>
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?
> >
> >
> >
> >
>
Monday, March 12, 2012
problem with RESTORE database
Hi Friends,
I have been facing a problem while restoring a database backup from
one SQL server on Win2003Server to another SQL Server on Win2000.
The error head is
ODBC SQL STATE : 42000
Please suggest me some way to overcome this.
Thanks,
Dutt.
How exactly are you restoring the database and can you give the full error
please?
"Dutt" <Mr.Dutt@.gmail.com> wrote in message
news:1173694572.447609.52340@.h3g2000cwc.googlegrou ps.com...
> Hi Friends,
> I have been facing a problem while restoring a database backup from
> one SQL server on Win2003Server to another SQL Server on Win2000.
> The error head is
> ODBC SQL STATE : 42000
>
> Please suggest me some way to overcome this.
> Thanks,
> Dutt.
>
|||yeah,
Its saying........
The media family on device 'D:\Xpert_Full.bak' is incorrectly formed.
SQL Server cannot process this media family.
RESTORE is terminating abnormally.
Thanks Immi,
Dutt
|||and you are getting this error from simply backing up the database, copying
to the new server and then restoring?
Are they both SQLserver 2005?
"Immy" <therealasianbabe@.hotmail.com> wrote in message
news:O7AVESJZHHA.3628@.TK2MSFTNGP02.phx.gbl...
> How exactly are you restoring the database and can you give the full error
> please?
> "Dutt" <Mr.Dutt@.gmail.com> wrote in message
> news:1173694572.447609.52340@.h3g2000cwc.googlegrou ps.com...
>
|||Dutt
Try
restore database ... from disk ='D:\Xpert_Full.bak' with file=1 ,recovery
I think you issued your backup with 'without init' option
"Dutt" <Mr.Dutt@.gmail.com> wrote in message
news:1173697414.376193.158530@.h3g2000cwc.googlegro ups.com...
> yeah,
> Its saying........
> The media family on device 'D:\Xpert_Full.bak' is incorrectly formed.
> SQL Server cannot process this media family.
> RESTORE is terminating abnormally.
> Thanks Immi,
> Dutt
>
|||Hello,
Can you use RESTORE HEADERONLY and see if you have multiple backup files in
the same the same backup file. If yes then
try using FILE= option while restoring. If you get any errors then you may
need to contact microsoft product support to
investigate further or do a FULL database backup again from source using
BACKUP DATABASE WITH INIT option
and try restoring into destination again.
Thanks
Hari
"Dutt" <Mr.Dutt@.gmail.com> wrote in message
news:1173697414.376193.158530@.h3g2000cwc.googlegro ups.com...
> yeah,
> Its saying........
> The media family on device 'D:\Xpert_Full.bak' is incorrectly formed.
> SQL Server cannot process this media family.
> RESTORE is terminating abnormally.
> Thanks Immi,
> Dutt
>
|||Hi,
Immy,I'm using SQL Server 2000 in both systems.
Dimant,Its showing some error.
Hari,There is only one backup with that name.
I stress again that the back up is in another server.
Thanks,
Dutt
I have been facing a problem while restoring a database backup from
one SQL server on Win2003Server to another SQL Server on Win2000.
The error head is
ODBC SQL STATE : 42000
Please suggest me some way to overcome this.
Thanks,
Dutt.
How exactly are you restoring the database and can you give the full error
please?
"Dutt" <Mr.Dutt@.gmail.com> wrote in message
news:1173694572.447609.52340@.h3g2000cwc.googlegrou ps.com...
> Hi Friends,
> I have been facing a problem while restoring a database backup from
> one SQL server on Win2003Server to another SQL Server on Win2000.
> The error head is
> ODBC SQL STATE : 42000
>
> Please suggest me some way to overcome this.
> Thanks,
> Dutt.
>
|||yeah,
Its saying........
The media family on device 'D:\Xpert_Full.bak' is incorrectly formed.
SQL Server cannot process this media family.
RESTORE is terminating abnormally.
Thanks Immi,
Dutt
|||and you are getting this error from simply backing up the database, copying
to the new server and then restoring?
Are they both SQLserver 2005?
"Immy" <therealasianbabe@.hotmail.com> wrote in message
news:O7AVESJZHHA.3628@.TK2MSFTNGP02.phx.gbl...
> How exactly are you restoring the database and can you give the full error
> please?
> "Dutt" <Mr.Dutt@.gmail.com> wrote in message
> news:1173694572.447609.52340@.h3g2000cwc.googlegrou ps.com...
>
|||Dutt
Try
restore database ... from disk ='D:\Xpert_Full.bak' with file=1 ,recovery
I think you issued your backup with 'without init' option
"Dutt" <Mr.Dutt@.gmail.com> wrote in message
news:1173697414.376193.158530@.h3g2000cwc.googlegro ups.com...
> yeah,
> Its saying........
> The media family on device 'D:\Xpert_Full.bak' is incorrectly formed.
> SQL Server cannot process this media family.
> RESTORE is terminating abnormally.
> Thanks Immi,
> Dutt
>
|||Hello,
Can you use RESTORE HEADERONLY and see if you have multiple backup files in
the same the same backup file. If yes then
try using FILE= option while restoring. If you get any errors then you may
need to contact microsoft product support to
investigate further or do a FULL database backup again from source using
BACKUP DATABASE WITH INIT option
and try restoring into destination again.
Thanks
Hari
"Dutt" <Mr.Dutt@.gmail.com> wrote in message
news:1173697414.376193.158530@.h3g2000cwc.googlegro ups.com...
> yeah,
> Its saying........
> The media family on device 'D:\Xpert_Full.bak' is incorrectly formed.
> SQL Server cannot process this media family.
> RESTORE is terminating abnormally.
> Thanks Immi,
> Dutt
>
|||Hi,
Immy,I'm using SQL Server 2000 in both systems.
Dimant,Its showing some error.
Hari,There is only one backup with that name.
I stress again that the back up is in another server.
Thanks,
Dutt
problem with RESTORE database
Hi Friends,
I have been facing a problem while restoring a database backup from
one SQL server on Win2003Server to another SQL Server on Win2000.
The error head is
ODBC SQL STATE : 42000
Please suggest me some way to overcome this.
Thanks,
Dutt.How exactly are you restoring the database and can you give the full error
please?
"Dutt" <Mr.Dutt@.gmail.com> wrote in message
news:1173694572.447609.52340@.h3g2000cwc.googlegroups.com...
> Hi Friends,
> I have been facing a problem while restoring a database backup from
> one SQL server on Win2003Server to another SQL Server on Win2000.
> The error head is
> ODBC SQL STATE : 42000
>
> Please suggest me some way to overcome this.
> Thanks,
> Dutt.
>|||yeah,
Its saying........
The media family on device 'D:\Xpert_Full.bak' is incorrectly formed.
SQL Server cannot process this media family.
RESTORE is terminating abnormally.
Thanks Immi,
Dutt|||and you are getting this error from simply backing up the database, copying
to the new server and then restoring?
Are they both SQLserver 2005?
"Immy" <therealasianbabe@.hotmail.com> wrote in message
news:O7AVESJZHHA.3628@.TK2MSFTNGP02.phx.gbl...
> How exactly are you restoring the database and can you give the full error
> please?
> "Dutt" <Mr.Dutt@.gmail.com> wrote in message
> news:1173694572.447609.52340@.h3g2000cwc.googlegroups.com...
>|||Dutt
Try
restore database ... from disk ='D:\Xpert_Full.bak' with file=1 ,recovery
I think you issued your backup with 'without init' option
"Dutt" <Mr.Dutt@.gmail.com> wrote in message
news:1173697414.376193.158530@.h3g2000cwc.googlegroups.com...
> yeah,
> Its saying........
> The media family on device 'D:\Xpert_Full.bak' is incorrectly formed.
> SQL Server cannot process this media family.
> RESTORE is terminating abnormally.
> Thanks Immi,
> Dutt
>|||Hello,
Can you use RESTORE HEADERONLY and see if you have multiple backup files in
the same the same backup file. If yes then
try using FILE= option while restoring. If you get any errors then you may
need to contact microsoft product support to
investigate further or do a FULL database backup again from source using
BACKUP DATABASE WITH INIT option
and try restoring into destination again.
Thanks
Hari
"Dutt" <Mr.Dutt@.gmail.com> wrote in message
news:1173697414.376193.158530@.h3g2000cwc.googlegroups.com...
> yeah,
> Its saying........
> The media family on device 'D:\Xpert_Full.bak' is incorrectly formed.
> SQL Server cannot process this media family.
> RESTORE is terminating abnormally.
> Thanks Immi,
> Dutt
>|||Hi,
Immy,I'm using SQL Server 2000 in both systems.
Dimant,Its showing some error.
Hari,There is only one backup with that name.
I stress again that the back up is in another server.
Thanks,
Dutt|||Dutt wrote:
> Hi,
> Immy,I'm using SQL Server 2000 in both systems.
> Dimant,Its showing some error.
> Hari,There is only one backup with that name.
> I stress again that the back up is in another server.
> Thanks,
> Dutt
>
Could you show us the full statement you are running?
You could also try to look up the RESTORE FILELISTONLY and RESTORE
HEADERONLY commands in Books On Line to see what the reveal. An option
could also be to run the RESTORE VERIFYONLY command to check if the
backup file is corrupt or not.
Regards
Steen Schlter Persson
Database Administrator / System Administrator
I have been facing a problem while restoring a database backup from
one SQL server on Win2003Server to another SQL Server on Win2000.
The error head is
ODBC SQL STATE : 42000
Please suggest me some way to overcome this.
Thanks,
Dutt.How exactly are you restoring the database and can you give the full error
please?
"Dutt" <Mr.Dutt@.gmail.com> wrote in message
news:1173694572.447609.52340@.h3g2000cwc.googlegroups.com...
> Hi Friends,
> I have been facing a problem while restoring a database backup from
> one SQL server on Win2003Server to another SQL Server on Win2000.
> The error head is
> ODBC SQL STATE : 42000
>
> Please suggest me some way to overcome this.
> Thanks,
> Dutt.
>|||yeah,
Its saying........
The media family on device 'D:\Xpert_Full.bak' is incorrectly formed.
SQL Server cannot process this media family.
RESTORE is terminating abnormally.
Thanks Immi,
Dutt|||and you are getting this error from simply backing up the database, copying
to the new server and then restoring?
Are they both SQLserver 2005?
"Immy" <therealasianbabe@.hotmail.com> wrote in message
news:O7AVESJZHHA.3628@.TK2MSFTNGP02.phx.gbl...
> How exactly are you restoring the database and can you give the full error
> please?
> "Dutt" <Mr.Dutt@.gmail.com> wrote in message
> news:1173694572.447609.52340@.h3g2000cwc.googlegroups.com...
>|||Dutt
Try
restore database ... from disk ='D:\Xpert_Full.bak' with file=1 ,recovery
I think you issued your backup with 'without init' option
"Dutt" <Mr.Dutt@.gmail.com> wrote in message
news:1173697414.376193.158530@.h3g2000cwc.googlegroups.com...
> yeah,
> Its saying........
> The media family on device 'D:\Xpert_Full.bak' is incorrectly formed.
> SQL Server cannot process this media family.
> RESTORE is terminating abnormally.
> Thanks Immi,
> Dutt
>|||Hello,
Can you use RESTORE HEADERONLY and see if you have multiple backup files in
the same the same backup file. If yes then
try using FILE= option while restoring. If you get any errors then you may
need to contact microsoft product support to
investigate further or do a FULL database backup again from source using
BACKUP DATABASE WITH INIT option
and try restoring into destination again.
Thanks
Hari
"Dutt" <Mr.Dutt@.gmail.com> wrote in message
news:1173697414.376193.158530@.h3g2000cwc.googlegroups.com...
> yeah,
> Its saying........
> The media family on device 'D:\Xpert_Full.bak' is incorrectly formed.
> SQL Server cannot process this media family.
> RESTORE is terminating abnormally.
> Thanks Immi,
> Dutt
>|||Hi,
Immy,I'm using SQL Server 2000 in both systems.
Dimant,Its showing some error.
Hari,There is only one backup with that name.
I stress again that the back up is in another server.
Thanks,
Dutt|||Dutt wrote:
> Hi,
> Immy,I'm using SQL Server 2000 in both systems.
> Dimant,Its showing some error.
> Hari,There is only one backup with that name.
> I stress again that the back up is in another server.
> Thanks,
> Dutt
>
Could you show us the full statement you are running?
You could also try to look up the RESTORE FILELISTONLY and RESTORE
HEADERONLY commands in Books On Line to see what the reveal. An option
could also be to run the RESTORE VERIFYONLY command to check if the
backup file is corrupt or not.
Regards
Steen Schlter Persson
Database Administrator / System Administrator
problem with RESTORE database
Hi Friends,
I have been facing a problem while restoring a database backup from
one SQL server on Win2003Server to another SQL Server on Win2000.
The error head is
ODBC SQL STATE : 42000
Please suggest me some way to overcome this.
Thanks,
Dutt.How exactly are you restoring the database and can you give the full error
please?
"Dutt" <Mr.Dutt@.gmail.com> wrote in message
news:1173694572.447609.52340@.h3g2000cwc.googlegroups.com...
> Hi Friends,
> I have been facing a problem while restoring a database backup from
> one SQL server on Win2003Server to another SQL Server on Win2000.
> The error head is
> ODBC SQL STATE : 42000
>
> Please suggest me some way to overcome this.
> Thanks,
> Dutt.
>|||yeah,
Its saying........
The media family on device 'D:\Xpert_Full.bak' is incorrectly formed.
SQL Server cannot process this media family.
RESTORE is terminating abnormally.
Thanks Immi,
Dutt|||and you are getting this error from simply backing up the database, copying
to the new server and then restoring?
Are they both SQLserver 2005?
"Immy" <therealasianbabe@.hotmail.com> wrote in message
news:O7AVESJZHHA.3628@.TK2MSFTNGP02.phx.gbl...
> How exactly are you restoring the database and can you give the full error
> please?
> "Dutt" <Mr.Dutt@.gmail.com> wrote in message
> news:1173694572.447609.52340@.h3g2000cwc.googlegroups.com...
>> Hi Friends,
>> I have been facing a problem while restoring a database backup from
>> one SQL server on Win2003Server to another SQL Server on Win2000.
>> The error head is
>> ODBC SQL STATE : 42000
>>
>> Please suggest me some way to overcome this.
>> Thanks,
>> Dutt.
>|||Dutt
Try
restore database ... from disk ='D:\Xpert_Full.bak' with file=1 ,recovery
I think you issued your backup with 'without init' option
"Dutt" <Mr.Dutt@.gmail.com> wrote in message
news:1173697414.376193.158530@.h3g2000cwc.googlegroups.com...
> yeah,
> Its saying........
> The media family on device 'D:\Xpert_Full.bak' is incorrectly formed.
> SQL Server cannot process this media family.
> RESTORE is terminating abnormally.
> Thanks Immi,
> Dutt
>|||Hello,
Can you use RESTORE HEADERONLY and see if you have multiple backup files in
the same the same backup file. If yes then
try using FILE= option while restoring. If you get any errors then you may
need to contact microsoft product support to
investigate further or do a FULL database backup again from source using
BACKUP DATABASE WITH INIT option
and try restoring into destination again.
Thanks
Hari
"Dutt" <Mr.Dutt@.gmail.com> wrote in message
news:1173697414.376193.158530@.h3g2000cwc.googlegroups.com...
> yeah,
> Its saying........
> The media family on device 'D:\Xpert_Full.bak' is incorrectly formed.
> SQL Server cannot process this media family.
> RESTORE is terminating abnormally.
> Thanks Immi,
> Dutt
>|||Hi,
Immy,I'm using SQL Server 2000 in both systems.
Dimant,Its showing some error.
Hari,There is only one backup with that name.
I stress again that the back up is in another server.
Thanks,
Dutt|||Dutt wrote:
> Hi,
> Immy,I'm using SQL Server 2000 in both systems.
> Dimant,Its showing some error.
> Hari,There is only one backup with that name.
> I stress again that the back up is in another server.
> Thanks,
> Dutt
>
Could you show us the full statement you are running?
You could also try to look up the RESTORE FILELISTONLY and RESTORE
HEADERONLY commands in Books On Line to see what the reveal. An option
could also be to run the RESTORE VERIFYONLY command to check if the
backup file is corrupt or not.
--
Regards
Steen Schlüter Persson
Database Administrator / System Administrator
I have been facing a problem while restoring a database backup from
one SQL server on Win2003Server to another SQL Server on Win2000.
The error head is
ODBC SQL STATE : 42000
Please suggest me some way to overcome this.
Thanks,
Dutt.How exactly are you restoring the database and can you give the full error
please?
"Dutt" <Mr.Dutt@.gmail.com> wrote in message
news:1173694572.447609.52340@.h3g2000cwc.googlegroups.com...
> Hi Friends,
> I have been facing a problem while restoring a database backup from
> one SQL server on Win2003Server to another SQL Server on Win2000.
> The error head is
> ODBC SQL STATE : 42000
>
> Please suggest me some way to overcome this.
> Thanks,
> Dutt.
>|||yeah,
Its saying........
The media family on device 'D:\Xpert_Full.bak' is incorrectly formed.
SQL Server cannot process this media family.
RESTORE is terminating abnormally.
Thanks Immi,
Dutt|||and you are getting this error from simply backing up the database, copying
to the new server and then restoring?
Are they both SQLserver 2005?
"Immy" <therealasianbabe@.hotmail.com> wrote in message
news:O7AVESJZHHA.3628@.TK2MSFTNGP02.phx.gbl...
> How exactly are you restoring the database and can you give the full error
> please?
> "Dutt" <Mr.Dutt@.gmail.com> wrote in message
> news:1173694572.447609.52340@.h3g2000cwc.googlegroups.com...
>> Hi Friends,
>> I have been facing a problem while restoring a database backup from
>> one SQL server on Win2003Server to another SQL Server on Win2000.
>> The error head is
>> ODBC SQL STATE : 42000
>>
>> Please suggest me some way to overcome this.
>> Thanks,
>> Dutt.
>|||Dutt
Try
restore database ... from disk ='D:\Xpert_Full.bak' with file=1 ,recovery
I think you issued your backup with 'without init' option
"Dutt" <Mr.Dutt@.gmail.com> wrote in message
news:1173697414.376193.158530@.h3g2000cwc.googlegroups.com...
> yeah,
> Its saying........
> The media family on device 'D:\Xpert_Full.bak' is incorrectly formed.
> SQL Server cannot process this media family.
> RESTORE is terminating abnormally.
> Thanks Immi,
> Dutt
>|||Hello,
Can you use RESTORE HEADERONLY and see if you have multiple backup files in
the same the same backup file. If yes then
try using FILE= option while restoring. If you get any errors then you may
need to contact microsoft product support to
investigate further or do a FULL database backup again from source using
BACKUP DATABASE WITH INIT option
and try restoring into destination again.
Thanks
Hari
"Dutt" <Mr.Dutt@.gmail.com> wrote in message
news:1173697414.376193.158530@.h3g2000cwc.googlegroups.com...
> yeah,
> Its saying........
> The media family on device 'D:\Xpert_Full.bak' is incorrectly formed.
> SQL Server cannot process this media family.
> RESTORE is terminating abnormally.
> Thanks Immi,
> Dutt
>|||Hi,
Immy,I'm using SQL Server 2000 in both systems.
Dimant,Its showing some error.
Hari,There is only one backup with that name.
I stress again that the back up is in another server.
Thanks,
Dutt|||Dutt wrote:
> Hi,
> Immy,I'm using SQL Server 2000 in both systems.
> Dimant,Its showing some error.
> Hari,There is only one backup with that name.
> I stress again that the back up is in another server.
> Thanks,
> Dutt
>
Could you show us the full statement you are running?
You could also try to look up the RESTORE FILELISTONLY and RESTORE
HEADERONLY commands in Books On Line to see what the reveal. An option
could also be to run the RESTORE VERIFYONLY command to check if the
backup file is corrupt or not.
--
Regards
Steen Schlüter Persson
Database Administrator / System Administrator
Subscribe to:
Posts (Atom)