Showing posts with label server2000. Show all posts
Showing posts with label server2000. Show all posts

Friday, March 30, 2012

problem with CAST and CONVERT in SQL Server2000 converting decimal places from 4 to 2

All of my currency columns are only storing 2 decimal places when I insert into the database but when I pull out the data with a SELECT statement, I always get 4 decimal places instead of the 2 that were inserted.

For example:

Database Price SELECT statement Price

100.56 100.5600

I have tried to use the CAST and/or CONVERT commands but I cannot get the output to come out as 100.56. Has anyone had a similar problem?

Thanks

Paradise [ip]

Look at the STR() function in Books Online.

STR(FloatExpression,LengthOverall,PlacesToRightOfDecimal)

|||Usually this type of formatting is done on the client side. You can use any of the string.format functions.|||You application is having a precision problem, it happens in SQL Server, there are two solutions a third party driver that on the TDS(Tabular Data Stream) level correct it or do it the cheap and free way use Decimal or Numeric instead of money and your problems will go away. Numeric is bigger than money but you will not get that problem. Hope this helps.|||I have tried to use the decimal datatype convert but it is rounding up or down and I am trying to show an amount, i.e. price. I just need something that will allow me to show the value as it exists in the database. When I view the data in the table, I only see the two decimal places.|||

Try the format in these links. Hope this helps


http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconformattingnumericdataforspecificculture.asp

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconcustomnumericformatstringsoutputexample.asp

Wednesday, March 28, 2012

problem with BCP

Dear all,
I created a BCP file from SQL Server2000 with .BCP Extension.
Now i am trying to load data in the SQL Server2005 Database table.
First was getting the error of remote connection which i solved .
Now i am getting this below error
SQLState = HY000, NativeError = 0
Error = [Microsoft][SQL Native Client]Unable to open BCP error-file
NULL
I am executing this code
exec master..xp_cmdshell ' BCP c:\Sp_who_Perocess.bcp in
epinav.dbo.Sp_who_Perocess -n -"EPI-IT-SUFIAN\SQL_DATA" -U -P'
Pls help
from
Dollerhi
there is an error in your syntex, it's complaining about your error file
u have -n -"EPI-IT-SUFIAN\SQL_DATA"
is this the location for your error / log ilfe -"EPI-IT-SUFIAN\SQL_DATA"
if so then you have to add the -e switch and add a file name as well
and u are specifying login and password with blank values '
-U -P
"doller" wrote:
> Dear all,
> I created a BCP file from SQL Server2000 with .BCP Extension.
> Now i am trying to load data in the SQL Server2005 Database table.
> First was getting the error of remote connection which i solved .
> Now i am getting this below error
> SQLState = HY000, NativeError = 0
> Error = [Microsoft][SQL Native Client]Unable to open BCP error-file
> NULL
> I am executing this code
> exec master..xp_cmdshell ' BCP c:\Sp_who_Perocess.bcp in
> epinav.dbo.Sp_who_Perocess -n -"EPI-IT-SUFIAN\SQL_DATA" -U -P'
> Pls help
> from
> Doller
>|||Hi
Assuming epinav.dbo.Sp_who_Perocess is a table or view, you should get the
command working from a command prompt and then fit that into the xp_cmdshell
call.
Try the following adding the correct loginid and password:
exec master..xp_cmdshell ' BCP "epinav.dbo.Sp_who_Perocess" in
"c:\Sp_who_Perocess.bcp" -n -S "EPI-IT-SUFIAN\SQL_DATA" -U {loginid} -P
{password}'
John
"doller" wrote:
> Dear all,
> I created a BCP file from SQL Server2000 with .BCP Extension.
> Now i am trying to load data in the SQL Server2005 Database table.
> First was getting the error of remote connection which i solved .
> Now i am getting this below error
> SQLState = HY000, NativeError = 0
> Error = [Microsoft][SQL Native Client]Unable to open BCP error-file
> NULL
> I am executing this code
> exec master..xp_cmdshell ' BCP c:\Sp_who_Perocess.bcp in
> epinav.dbo.Sp_who_Perocess -n -"EPI-IT-SUFIAN\SQL_DATA" -U -P'
> Pls help
> from
> Doller
>|||Hi
This assumed that EPI-IT-SUFIAN\SQL_DATA was the database server if not
please let us know what it is supposed to be!
You can check the format and parameters of the BCP utility in books online.
John
"John Bell" wrote:
> Hi
> Assuming epinav.dbo.Sp_who_Perocess is a table or view, you should get the
> command working from a command prompt and then fit that into the xp_cmdshell
> call.
> Try the following adding the correct loginid and password:
> exec master..xp_cmdshell ' BCP "epinav.dbo.Sp_who_Perocess" in
> "c:\Sp_who_Perocess.bcp" -n -S "EPI-IT-SUFIAN\SQL_DATA" -U {loginid} -P
> {password}'
> John
>
> "doller" wrote:
> > Dear all,
> >
> > I created a BCP file from SQL Server2000 with .BCP Extension.
> > Now i am trying to load data in the SQL Server2005 Database table.
> > First was getting the error of remote connection which i solved .
> > Now i am getting this below error
> >
> > SQLState = HY000, NativeError = 0
> > Error = [Microsoft][SQL Native Client]Unable to open BCP error-file
> > NULL
> >
> > I am executing this code
> > exec master..xp_cmdshell ' BCP c:\Sp_who_Perocess.bcp in
> > epinav.dbo.Sp_who_Perocess -n -"EPI-IT-SUFIAN\SQL_DATA" -U -P'
> >
> > Pls help
> >
> > from
> > Doller
> >
> >|||Hi all,
EPI-IT-SUFIAN is my server name and SQL_DATA is my instance name.
i resolved the connection issue but now i am getting diffrent type of
error
SQLState = HY000, NativeError = 0
Error = [Microsoft][SQL Native Client]Unable to open BCP error-file
NULL
pls help
from
doller
John Bell wrote:
> Hi
> This assumed that EPI-IT-SUFIAN\SQL_DATA was the database server if not
> please let us know what it is supposed to be!
> You can check the format and parameters of the BCP utility in books online.
> John
> "John Bell" wrote:
> > Hi
> >
> > Assuming epinav.dbo.Sp_who_Perocess is a table or view, you should get the
> > command working from a command prompt and then fit that into the xp_cmdshell
> > call.
> >
> > Try the following adding the correct loginid and password:
> >
> > exec master..xp_cmdshell ' BCP "epinav.dbo.Sp_who_Perocess" in
> > "c:\Sp_who_Perocess.bcp" -n -S "EPI-IT-SUFIAN\SQL_DATA" -U {loginid} -P
> > {password}'
> >
> > John
> >
> >
> > "doller" wrote:
> >
> > > Dear all,
> > >
> > > I created a BCP file from SQL Server2000 with .BCP Extension.
> > > Now i am trying to load data in the SQL Server2005 Database table.
> > > First was getting the error of remote connection which i solved .
> > > Now i am getting this below error
> > >
> > > SQLState = HY000, NativeError = 0
> > > Error = [Microsoft][SQL Native Client]Unable to open BCP error-file
> > > NULL
> > >
> > > I am executing this code
> > > exec master..xp_cmdshell ' BCP c:\Sp_who_Perocess.bcp in
> > > epinav.dbo.Sp_who_Perocess -n -"EPI-IT-SUFIAN\SQL_DATA" -U -P'
> > >
> > > Pls help
> > >
> > > from
> > > Doller
> > >
> > >|||hi doller,
the following line might be enough (it's been tested from DOS session)
bcp <db>.<table> in <path>.<file> -n -S<server> -U<login> -P<password>
--
current location: alicante (es)
"doller" wrote:
> Hi all,
> EPI-IT-SUFIAN is my server name and SQL_DATA is my instance name.
> i resolved the connection issue but now i am getting diffrent type of
> error
> SQLState = HY000, NativeError = 0
> Error = [Microsoft][SQL Native Client]Unable to open BCP error-file
> NULL
> pls help
> from
> doller
>
> John Bell wrote:
> > Hi
> >
> > This assumed that EPI-IT-SUFIAN\SQL_DATA was the database server if not
> > please let us know what it is supposed to be!
> >
> > You can check the format and parameters of the BCP utility in books online.
> >
> > John
> >
> > "John Bell" wrote:
> >
> > > Hi
> > >
> > > Assuming epinav.dbo.Sp_who_Perocess is a table or view, you should get the
> > > command working from a command prompt and then fit that into the xp_cmdshell
> > > call.
> > >
> > > Try the following adding the correct loginid and password:
> > >
> > > exec master..xp_cmdshell ' BCP "epinav.dbo.Sp_who_Perocess" in
> > > "c:\Sp_who_Perocess.bcp" -n -S "EPI-IT-SUFIAN\SQL_DATA" -U {loginid} -P
> > > {password}'
> > >
> > > John
> > >
> > >
> > > "doller" wrote:
> > >
> > > > Dear all,
> > > >
> > > > I created a BCP file from SQL Server2000 with .BCP Extension.
> > > > Now i am trying to load data in the SQL Server2005 Database table.
> > > > First was getting the error of remote connection which i solved .
> > > > Now i am getting this below error
> > > >
> > > > SQLState = HY000, NativeError = 0
> > > > Error = [Microsoft][SQL Native Client]Unable to open BCP error-file
> > > > NULL
> > > >
> > > > I am executing this code
> > > > exec master..xp_cmdshell ' BCP c:\Sp_who_Perocess.bcp in
> > > > epinav.dbo.Sp_who_Perocess -n -"EPI-IT-SUFIAN\SQL_DATA" -U -P'
> > > >
> > > > Pls help
> > > >
> > > > from
> > > > Doller
> > > >
> > > >
>|||Hi ,
Thanks for all ur help.
I was getting the error unable to open the BCP file because i was using
-U -P as i was working on the server means with trustedconnection so i
have to use -T in place of -U and -P
from
Doller
Enric wrote:
> hi doller,
> the following line might be enough (it's been tested from DOS session)
> bcp <db>.<table> in <path>.<file> -n -S<server> -U<login> -P<password>
> --
> current location: alicante (es)
>
> "doller" wrote:
> > Hi all,
> >
> > EPI-IT-SUFIAN is my server name and SQL_DATA is my instance name.
> >
> > i resolved the connection issue but now i am getting diffrent type of
> > error
> > SQLState = HY000, NativeError = 0
> > Error = [Microsoft][SQL Native Client]Unable to open BCP error-file
> > NULL
> >
> > pls help
> >
> > from
> > doller
> >
> >
> >
> > John Bell wrote:
> > > Hi
> > >
> > > This assumed that EPI-IT-SUFIAN\SQL_DATA was the database server if not
> > > please let us know what it is supposed to be!
> > >
> > > You can check the format and parameters of the BCP utility in books online.
> > >
> > > John
> > >
> > > "John Bell" wrote:
> > >
> > > > Hi
> > > >
> > > > Assuming epinav.dbo.Sp_who_Perocess is a table or view, you should get the
> > > > command working from a command prompt and then fit that into the xp_cmdshell
> > > > call.
> > > >
> > > > Try the following adding the correct loginid and password:
> > > >
> > > > exec master..xp_cmdshell ' BCP "epinav.dbo.Sp_who_Perocess" in
> > > > "c:\Sp_who_Perocess.bcp" -n -S "EPI-IT-SUFIAN\SQL_DATA" -U {loginid} -P
> > > > {password}'
> > > >
> > > > John
> > > >
> > > >
> > > > "doller" wrote:
> > > >
> > > > > Dear all,
> > > > >
> > > > > I created a BCP file from SQL Server2000 with .BCP Extension.
> > > > > Now i am trying to load data in the SQL Server2005 Database table.
> > > > > First was getting the error of remote connection which i solved .
> > > > > Now i am getting this below error
> > > > >
> > > > > SQLState = HY000, NativeError = 0
> > > > > Error = [Microsoft][SQL Native Client]Unable to open BCP error-file
> > > > > NULL
> > > > >
> > > > > I am executing this code
> > > > > exec master..xp_cmdshell ' BCP c:\Sp_who_Perocess.bcp in
> > > > > epinav.dbo.Sp_who_Perocess -n -"EPI-IT-SUFIAN\SQL_DATA" -U -P'
> > > > >
> > > > > Pls help
> > > > >
> > > > > from
> > > > > Doller
> > > > >
> > > > >
> >
> >

problem with BCP

Dear all,
I created a BCP file from SQL Server2000 with .BCP Extension.
Now i am trying to load data in the SQL Server2005 Database table.
First was getting the error of remote connection which i solved .
Now i am getting this below error
SQLState = HY000, NativeError = 0
Error = [Microsoft][SQL Native Client]Unable to open BCP error-file
NULL
I am executing this code
exec master..xp_cmdshell ' BCP c:\Sp_who_Perocess.bcp in
epinav.dbo.Sp_who_Perocess -n -"EPI-IT-SUFIAN\SQL_DATA" -U -P'
Pls help
from
Dollerhi
there is an error in your syntex, it's complaining about your error file
u have -n -"EPI-IT-SUFIAN\SQL_DATA"
is this the location for your error / log ilfe -"EPI-IT-SUFIAN\SQL_DATA"
if so then you have to add the -e switch and add a file name as well
and u are specifying login and password with blank values '
-U -P
"doller" wrote:

> Dear all,
> I created a BCP file from SQL Server2000 with .BCP Extension.
> Now i am trying to load data in the SQL Server2005 Database table.
> First was getting the error of remote connection which i solved .
> Now i am getting this below error
> SQLState = HY000, NativeError = 0
> Error = [Microsoft][SQL Native Client]Unable to open BCP error-fil
e
> NULL
> I am executing this code
> exec master..xp_cmdshell ' BCP c:\Sp_who_Perocess.bcp in
> epinav.dbo.Sp_who_Perocess -n -"EPI-IT-SUFIAN\SQL_DATA" -U -P'
> Pls help
> from
> Doller
>|||Hi
Assuming epinav.dbo.Sp_who_Perocess is a table or view, you should get the
command working from a command prompt and then fit that into the xp_cmdshell
call.
Try the following adding the correct loginid and password:
exec master..xp_cmdshell ' BCP "epinav.dbo.Sp_who_Perocess" in
"c:\Sp_who_Perocess.bcp" -n -S "EPI-IT-SUFIAN\SQL_DATA" -U {loginid} -P
{password}'
John
"doller" wrote:

> Dear all,
> I created a BCP file from SQL Server2000 with .BCP Extension.
> Now i am trying to load data in the SQL Server2005 Database table.
> First was getting the error of remote connection which i solved .
> Now i am getting this below error
> SQLState = HY000, NativeError = 0
> Error = [Microsoft][SQL Native Client]Unable to open BCP error-fil
e
> NULL
> I am executing this code
> exec master..xp_cmdshell ' BCP c:\Sp_who_Perocess.bcp in
> epinav.dbo.Sp_who_Perocess -n -"EPI-IT-SUFIAN\SQL_DATA" -U -P'
> Pls help
> from
> Doller
>|||Hi
This assumed that EPI-IT-SUFIAN\SQL_DATA was the database server if not
please let us know what it is supposed to be!
You can check the format and parameters of the BCP utility in books online.
John
"John Bell" wrote:
[vbcol=seagreen]
> Hi
> Assuming epinav.dbo.Sp_who_Perocess is a table or view, you should get th
e
> command working from a command prompt and then fit that into the xp_cmdshe
ll
> call.
> Try the following adding the correct loginid and password:
> exec master..xp_cmdshell ' BCP "epinav.dbo.Sp_who_Perocess" in
> "c:\Sp_who_Perocess.bcp" -n -S "EPI-IT-SUFIAN\SQL_DATA" -U {loginid}
-P
> {password}'
> John
>
> "doller" wrote:
>|||Hi all,
EPI-IT-SUFIAN is my server name and SQL_DATA is my instance name.
i resolved the connection issue but now i am getting diffrent type of
error
SQLState = HY000, NativeError = 0
Error = [Microsoft][SQL Native Client]Unable to open BCP error-file
NULL
pls help
from
doller
John Bell wrote:[vbcol=seagreen]
> Hi
> This assumed that EPI-IT-SUFIAN\SQL_DATA was the database server if not
> please let us know what it is supposed to be!
> You can check the format and parameters of the BCP utility in books online
.
> John
> "John Bell" wrote:
>|||hi doller,
the following line might be enough (it's been tested from DOS session)
bcp <db>.<table> in <path>.<file> -n -S<server> -U<login> -P<password>
--
current location: alicante (es)
"doller" wrote:

> Hi all,
> EPI-IT-SUFIAN is my server name and SQL_DATA is my instance name.
> i resolved the connection issue but now i am getting diffrent type of
> error
> SQLState = HY000, NativeError = 0
> Error = [Microsoft][SQL Native Client]Unable to open BCP error-fil
e
> NULL
> pls help
> from
> doller
>
> John Bell wrote:
>|||Hi ,
Thanks for all ur help.
I was getting the error unable to open the BCP file because i was using
-U -P as i was working on the server means with trustedconnection so i
have to use -T in place of -U and -P
from
Doller
Enric wrote:[vbcol=seagreen]
> hi doller,
> the following line might be enough (it's been tested from DOS session)
> bcp <db>.<table> in <path>.<file> -n -S<server> -U<login> -P<password>
> --
> current location: alicante (es)
>
> "doller" wrote:
>

problem with BCP

Dear all,
I created a BCP file from SQL Server2000 with .BCP Extension.
Now i am trying to load data in the SQL Server2005 Database table.
First was getting the error of remote connection which i solved .
Now i am getting this below error
SQLState = HY000, NativeError = 0
Error = [Microsoft][SQL Native Client]Unable to open BCP error-file
NULL
I am executing this code
exec master..xp_cmdshell ' BCP c:\Sp_who_Perocess.bcp in
epinav.dbo.Sp_who_Perocess -n -"EPI-IT-SUFIAN\SQL_DATA" -U -P'
Pls help
from
Doller
hi
there is an error in your syntex, it's complaining about your error file
u have -n -"EPI-IT-SUFIAN\SQL_DATA"
is this the location for your error / log ilfe -"EPI-IT-SUFIAN\SQL_DATA"
if so then you have to add the -e switch and add a file name as well
and u are specifying login and password with blank values ?
-U -P
"doller" wrote:

> Dear all,
> I created a BCP file from SQL Server2000 with .BCP Extension.
> Now i am trying to load data in the SQL Server2005 Database table.
> First was getting the error of remote connection which i solved .
> Now i am getting this below error
> SQLState = HY000, NativeError = 0
> Error = [Microsoft][SQL Native Client]Unable to open BCP error-file
> NULL
> I am executing this code
> exec master..xp_cmdshell ' BCP c:\Sp_who_Perocess.bcp in
> epinav.dbo.Sp_who_Perocess -n -"EPI-IT-SUFIAN\SQL_DATA" -U -P'
> Pls help
> from
> Doller
>
|||Hi
Assuming epinav.dbo.Sp_who_Perocess is a table or view, you should get the
command working from a command prompt and then fit that into the xp_cmdshell
call.
Try the following adding the correct loginid and password:
exec master..xp_cmdshell ' BCP "epinav.dbo.Sp_who_Perocess" in
"c:\Sp_who_Perocess.bcp" -n -S "EPI-IT-SUFIAN\SQL_DATA" -U {loginid} -P
{password}'
John
"doller" wrote:

> Dear all,
> I created a BCP file from SQL Server2000 with .BCP Extension.
> Now i am trying to load data in the SQL Server2005 Database table.
> First was getting the error of remote connection which i solved .
> Now i am getting this below error
> SQLState = HY000, NativeError = 0
> Error = [Microsoft][SQL Native Client]Unable to open BCP error-file
> NULL
> I am executing this code
> exec master..xp_cmdshell ' BCP c:\Sp_who_Perocess.bcp in
> epinav.dbo.Sp_who_Perocess -n -"EPI-IT-SUFIAN\SQL_DATA" -U -P'
> Pls help
> from
> Doller
>
|||Hi
This assumed that EPI-IT-SUFIAN\SQL_DATA was the database server if not
please let us know what it is supposed to be!
You can check the format and parameters of the BCP utility in books online.
John
"John Bell" wrote:
[vbcol=seagreen]
> Hi
> Assuming epinav.dbo.Sp_who_Perocess is a table or view, you should get the
> command working from a command prompt and then fit that into the xp_cmdshell
> call.
> Try the following adding the correct loginid and password:
> exec master..xp_cmdshell ' BCP "epinav.dbo.Sp_who_Perocess" in
> "c:\Sp_who_Perocess.bcp" -n -S "EPI-IT-SUFIAN\SQL_DATA" -U {loginid} -P
> {password}'
> John
>
> "doller" wrote:
|||Hi all,
EPI-IT-SUFIAN is my server name and SQL_DATA is my instance name.
i resolved the connection issue but now i am getting diffrent type of
error
SQLState = HY000, NativeError = 0
Error = [Microsoft][SQL Native Client]Unable to open BCP error-file
NULL
pls help
from
doller
John Bell wrote:[vbcol=seagreen]
> Hi
> This assumed that EPI-IT-SUFIAN\SQL_DATA was the database server if not
> please let us know what it is supposed to be!
> You can check the format and parameters of the BCP utility in books online.
> John
> "John Bell" wrote:
|||hi doller,
the following line might be enough (it's been tested from DOS session)
bcp <db>.<table> in <path>.<file> -n -S<server> -U<login> -P<password>
current location: alicante (es)
"doller" wrote:

> Hi all,
> EPI-IT-SUFIAN is my server name and SQL_DATA is my instance name.
> i resolved the connection issue but now i am getting diffrent type of
> error
> SQLState = HY000, NativeError = 0
> Error = [Microsoft][SQL Native Client]Unable to open BCP error-file
> NULL
> pls help
> from
> doller
>
> John Bell wrote:
>
|||Hi ,
Thanks for all ur help.
I was getting the error unable to open the BCP file because i was using
-U -P as i was working on the server means with trustedconnection so i
have to use -T in place of -U and -P
from
Doller
Enric wrote:[vbcol=seagreen]
> hi doller,
> the following line might be enough (it's been tested from DOS session)
> bcp <db>.<table> in <path>.<file> -n -S<server> -U<login> -P<password>
> --
> current location: alicante (es)
>
> "doller" wrote:

Friday, March 9, 2012

Problem when adding new registration in SQL Server2000

I couldn't add new registration in SQL Server2000 using SQL Server Authentication mode even I've already entered correct server name, username sa and correct password.
I've tried to ping this server from command line and it's ok.
But if I run Windows Explorer (\\servername) and put Windows'username and password then add new registration again, it's successful.
Please explain me why? I want to add new registraion from some server which I only have SQL Server username and password but don't have Windows username and password. Is it possible?Are you suing a default instance or a named instance ? If its a named instance you would have to use the syntax Servername\Instancenmae instead of just the servername. make also sure the server is running Mixed mode authentication if you want to use SQL Server authentication. You won′t need the Windows user name or password then.

Jens K. Suessmeyer

http://www.sqlserver2005.de
|||

Hi JensK.Suessmeyer,

After reading your answer, I've checked and found that the SQL Server has default instance(MSSQLSERVER) and server is running mixed mode authentication.

Following are all the complicated steps I must do to add new registration:
Ping SERVERNAME to check connection
Add new registration, using SA and SApassword
The previous step failed, then run windows explorer (\\SERVERNAME)
Put windows logon info: SERVERNAME\trunghd & mypassword
Add new registration again and it's successful

If I add registration from some server that I've already entered windows logon info once, it's successful too.

The question is why I have to give Windows logon information to the server when it's running in SQL authentication mode. I found no relation between my Windows username in this server with the installed SQL server in it.

Thank you very much for your answer.

Problem when adding new registration in SQL Server2000

I couldn't add new registration in SQL Server2000 using SQL Server Authentication mode even I've already entered correct server name, username sa and correct password.
I've tried to ping this server from command line and it's ok.
But if I run Windows Explorer (\\servername) and put Windows'username and password then add new registration again, it's successful.
Please explain me why? I want to add new registraion from some server which I only have SQL Server username and password but don't have Windows username and password. Is it possible?Are you suing a default instance or a named instance ? If its a named instance you would have to use the syntax Servername\Instancenmae instead of just the servername. make also sure the server is running Mixed mode authentication if you want to use SQL Server authentication. You won′t need the Windows user name or password then.

Jens K. Suessmeyer

http://www.sqlserver2005.de
|||

Hi JensK.Suessmeyer,

After reading your answer, I've checked and found that the SQL Server has default instance(MSSQLSERVER) and server is running mixed mode authentication.

Following are all the complicated steps I must do to add new registration:
Ping SERVERNAME to check connection
Add new registration, using SA and SApassword
The previous step failed, then run windows explorer (\\SERVERNAME)
Put windows logon info: SERVERNAME\trunghd & mypassword
Add new registration again and it's successful

If I add registration from some server that I've already entered windows logon info once, it's successful too.

The question is why I have to give Windows logon information to the server when it's running in SQL authentication mode. I found no relation between my Windows username in this server with the installed SQL server in it.

Thank you very much for your answer.