Tuesday, March 27, 2012
ERROR EXECUTING EXTENDED STORED PROCEDURE Specified user can not login
I'm wrote a program that uses the extended stored procedure XP_CMDSHELL .
The user is not an admin and I'm not sure how to set up a Proxy account.
I'm getting the following error when I try to add the user into the
Non-SysAdmin job step proxy account.
ERROR EXECUTING EXTENDED STORED PROCEDURE Specified user can not login
I gave the users domain rights to the master database on the server and then
gave permission to use the XP_CMDSHELL procedure.
My knowledge on permissions in SQL SERVER 2000 is hazy and I would like to
know what steps I have to take to add a non-admin user to be able to use the
XP_CMDSHELL procedure. Do I have to set anything outside of SQL SERVER
2000?...
Any help will be greatly appreciated.
Thanks,
Matt
If the user invoking xp_cmdshell is not a member of the sysadmin role, the
proxy account will be used.
The proxy account is setup using the dialog on the SQL Agent property page
in SQL Enterprise Manager (Job System tab) or using the extend stored
procedure xp_sqlagent_proxy_account, see
http://msdn.microsoft.com/library/de...aa-sz_8sdm.asp
See http://www.databasejournal.com/featu...le.php/3372131 for
more background.
GertD@.SQLDev.Net
Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
Copyright SQLDev.Net 1991-2005 All rights reserved.
"Matthew Beirn" <mbeirn@.ssimed.com> wrote in message
news:u7EruuMTFHA.3336@.TK2MSFTNGP10.phx.gbl...
> Hello All,
> I'm wrote a program that uses the extended stored procedure XP_CMDSHELL .
> The user is not an admin and I'm not sure how to set up a Proxy account.
> I'm getting the following error when I try to add the user into the
> Non-SysAdmin job step proxy account.
> ERROR EXECUTING EXTENDED STORED PROCEDURE Specified user can not login
> I gave the users domain rights to the master database on the server and
> then gave permission to use the XP_CMDSHELL procedure.
> My knowledge on permissions in SQL SERVER 2000 is hazy and I would like to
> know what steps I have to take to add a non-admin user to be able to use
> the XP_CMDSHELL procedure. Do I have to set anything outside of SQL
> SERVER 2000?...
> Any help will be greatly appreciated.
> Thanks,
> Matt
>
ERROR EXECUTING EXTENDED STORED PROCEDURE Specified user can not login
I'm wrote a program that uses the extended stored procedure XP_CMDSHELL .
The user is not an admin and I'm not sure how to set up a Proxy account.
I'm getting the following error when I try to add the user into the
Non-SysAdmin job step proxy account.
ERROR EXECUTING EXTENDED STORED PROCEDURE Specified user can not login
I gave the users domain rights to the master database on the server and then
gave permission to use the XP_CMDSHELL procedure.
My knowledge on permissions in SQL SERVER 2000 is hazy and I would like to
know what steps I have to take to add a non-admin user to be able to use the
XP_CMDSHELL procedure. Do I have to set anything outside of SQL SERVER
2000?...
Any help will be greatly appreciated.
Thanks,
MattIf the user invoking xp_cmdshell is not a member of the sysadmin role, the
proxy account will be used.
The proxy account is setup using the dialog on the SQL Agent property page
in SQL Enterprise Manager (Job System tab) or using the extend stored
procedure xp_sqlagent_proxy_account, see
sz_8sdm.asp" target="_blank">http://msdn.microsoft.com/library/d.../>
sz_8sdm.asp
See http://www.databasejournal.com/feat...cle.php/3372131 for
more background.
GertD@.SQLDev.Net
Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
Copyright SQLDev.Net 1991-2005 All rights reserved.
"Matthew Beirn" <mbeirn@.ssimed.com> wrote in message
news:u7EruuMTFHA.3336@.TK2MSFTNGP10.phx.gbl...
> Hello All,
> I'm wrote a program that uses the extended stored procedure XP_CMDSHELL .
> The user is not an admin and I'm not sure how to set up a Proxy account.
> I'm getting the following error when I try to add the user into the
> Non-SysAdmin job step proxy account.
> ERROR EXECUTING EXTENDED STORED PROCEDURE Specified user can not login
> I gave the users domain rights to the master database on the server and
> then gave permission to use the XP_CMDSHELL procedure.
> My knowledge on permissions in SQL SERVER 2000 is hazy and I would like to
> know what steps I have to take to add a non-admin user to be able to use
> the XP_CMDSHELL procedure. Do I have to set anything outside of SQL
> SERVER 2000?...
> Any help will be greatly appreciated.
> Thanks,
> Matt
>
ERROR EXECUTING EXTENDED STORED PROCEDURE Specified user can not login
I'm wrote a program that uses the extended stored procedure XP_CMDSHELL .
The user is not an admin and I'm not sure how to set up a Proxy account.
I'm getting the following error when I try to add the user into the
Non-SysAdmin job step proxy account.
ERROR EXECUTING EXTENDED STORED PROCEDURE Specified user can not login
I gave the users domain rights to the master database on the server and then
gave permission to use the XP_CMDSHELL procedure.
My knowledge on permissions in SQL SERVER 2000 is hazy and I would like to
know what steps I have to take to add a non-admin user to be able to use the
XP_CMDSHELL procedure. Do I have to set anything outside of SQL SERVER
2000?...
Any help will be greatly appreciated.
Thanks,
MattIf the user invoking xp_cmdshell is not a member of the sysadmin role, the
proxy account will be used.
The proxy account is setup using the dialog on the SQL Agent property page
in SQL Enterprise Manager (Job System tab) or using the extend stored
procedure xp_sqlagent_proxy_account, see
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_xp_aa-sz_8sdm.asp
See http://www.databasejournal.com/features/mssql/article.php/3372131 for
more background.
GertD@.SQLDev.Net
Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
Copyright © SQLDev.Net 1991-2005 All rights reserved.
"Matthew Beirn" <mbeirn@.ssimed.com> wrote in message
news:u7EruuMTFHA.3336@.TK2MSFTNGP10.phx.gbl...
> Hello All,
> I'm wrote a program that uses the extended stored procedure XP_CMDSHELL .
> The user is not an admin and I'm not sure how to set up a Proxy account.
> I'm getting the following error when I try to add the user into the
> Non-SysAdmin job step proxy account.
> ERROR EXECUTING EXTENDED STORED PROCEDURE Specified user can not login
> I gave the users domain rights to the master database on the server and
> then gave permission to use the XP_CMDSHELL procedure.
> My knowledge on permissions in SQL SERVER 2000 is hazy and I would like to
> know what steps I have to take to add a non-admin user to be able to use
> the XP_CMDSHELL procedure. Do I have to set anything outside of SQL
> SERVER 2000?...
> Any help will be greatly appreciated.
> Thanks,
> Matt
>sql
Thursday, March 22, 2012
Error deploying Analysis Service Project
Hi,
We are following the Analysis Service Tutorial and when we tried to deploy we got these errors:
Error 1 OLE DB error: OLE DB or ODBC error: Login failed for user 'PASCAL\CEZAR$'.; 42000. 0 0
Error 2 Errors in the high-level relational engine. A connection could not be made to the data source with the DataSourceID of 'Adventure Works DW', Name of 'Adventure Works DW'. 0 0
Error 3 Errors in the OLAP storage engine: An error occurred while the dimension, with the ID of 'Time', Name of 'Time' was being processed. 0 0
Error 4 Errors in the OLAP storage engine: An error occurred while the 'CalendarYear' attribute of the 'Time' dimension from the 'Analysis Services Project1' database was being processed. 0 0
Error 5 OLE DB error: OLE DB or ODBC error: Login failed for user 'PASCAL\CEZAR$'.; 42000. 0 0
Error 6 Errors in the high-level relational engine. A connection could not be made to the data source with the DataSourceID of 'Adventure Works DW', Name of 'Adventure Works DW'. 0 0
Error 7 Errors in the OLAP storage engine: An error occurred while the dimension, with the ID of 'Time', Name of 'Time' was being processed. 0 0
Error 8 Errors in the OLAP storage engine: An error occurred while the 'CalendarSemester' attribute of the 'Time' dimension from the 'Analysis Services Project1' database was being processed. 0 0
We hope someone can help us.
Thanks a lot.
Hi Cezar. Your problem looks like the user PASCAL\CEZAR$ doesn't have access rights to the SQL Server source data, 'Adventure Works DW'. Check the access rights for 'Adventure Works DW' in SQL Server Manager, and verify that the user PASCAL\CEZAR$ has rights to the database.
Hope this helps - Paul Goldy
|||Hi,
Thanks for your answer. The user error has been solved, but we got other error messages:
Error 1 OLE DB error: OLE DB or ODBC error: SELECT permission denied on object 'DimTime', database 'AdventureWorksDW', schema 'dbo'.; 42000. 0 0
Error 2 Errors in the OLAP storage engine: An error occurred while the dimension, with the ID of 'Time', Name of 'Time' was being processed. 0 0
Error 3 Errors in the OLAP storage engine: An error occurred while the 'EnglishMonthName' attribute of the 'Time' dimension from the 'Analysis Services Project1' database was being processed. 0 0
Error 4 OLE DB error: OLE DB or ODBC error: SELECT permission denied on object 'DimTime', database 'AdventureWorksDW', schema 'dbo'.; 42000. 0 0
Error 5 Errors in the OLAP storage engine: An error occurred while the dimension, with the ID of 'Time', Name of 'Time' was being processed. 0 0
Error 6 Errors in the OLAP storage engine: An error occurred while the 'CalendarSemester' attribute of the 'Time' dimension from the 'Analysis Services Project1' database was being processed. 0 0
Error 7 Errors in the high-level relational engine. The database operation was cancelled because of an earlier failure. 0 0
Error 8 Errors in the OLAP storage engine: An error occurred while the dimension, with the ID of 'Time', Name of 'Time' was being processed. 0 0
Error 9 Errors in the OLAP storage engine: An error occurred while the 'CalendarYear' attribute of the 'Time' dimension from the 'Analysis Services Project1' database was being processed. 0 0
Error 10 OLE DB error: OLE DB or ODBC error: Opera??o cancelada; HY008. 0 0
Error 11 Errors in the OLAP storage engine: An error occurred while the dimension, with the ID of 'Time', Name of 'Time' was being processed. 0 0
Error 12 Errors in the OLAP storage engine: An error occurred while the 'CalendarQuarter' attribute of the 'Time' dimension from the 'Analysis Services Project1' database was being processed. 0 0
What can we do?
Yours, Cezar
|||Hi Cezar. The error you received, "SELECT permission denied on object 'DimTime', database 'AdventureWorksDW', schema 'dbo'.; 42000. 0 0", is saying you do NOT have read permission for the AdventureWorksDW database. In SQL manager 2005 you must manage the permission for the AdventureWorksDW database and allow the user (I assume CEZAR\PASCAL$) db_datareader permission for the database. Here is a link which discusses more about setting permissions for SQL Server:
http://msdn2.microsoft.com/en-us/library/ms189121.aspx
Paul Goldy
Monday, March 19, 2012
Error creating login - Incorrect syntax near 'LOGIN'.
I am using Sql server 2005 and when I try to create a new login from
the sql server mgmnt studio, I get this error.
Msg 170, Level 15, State 1, Line 1
Line 1: Incorrect syntax near 'LOGIN'.
I have logged in as "sa" and the login statement that I am using is:
CREATE LOGIN test WITH PASSWORD = 'beta'
The product version is 8.00.2039.
Anybody knows whats wrong'
Thanks for helping out.
EshaWorks for me. The two most likely cause I can think of is there's a
non-printable character somewhere that didn't get copied to the post or you
have a Beta version of SQL Server 2005 (or SQL Server 2000) that had a
different CREATE LOGIN syntax.
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Esha" <eshhyasi@.gmail.com> wrote in message
news:1151465435.377462.192620@.p79g2000cwp.googlegroups.com...
> Hi,
> I am using Sql server 2005 and when I try to create a new login from
> the sql server mgmnt studio, I get this error.
>
> Msg 170, Level 15, State 1, Line 1
> Line 1: Incorrect syntax near 'LOGIN'.
>
> I have logged in as "sa" and the login statement that I am using is:
> CREATE LOGIN test WITH PASSWORD = 'beta'
> The product version is 8.00.2039.
> Anybody knows whats wrong'
> Thanks for helping out.
> Esha
>|||Esha,
CREATE LOGIN is a new T-SQL statement in SQL Server 2005.
Since you are using SQL Server 2000, you need to use sp_addlogin
or sp_grantlogin. Management Studio should use the version-appropriate
T-SQL depending on whether you are adding a login to a 2000 instance
or a 2005 instance. If this is not working for you, can you tell us what
steps you are taking in Management Studio in your attempt to create
the new login?
Steve Kass
Drew University
Esha wrote:
>Hi,
>I am using Sql server 2005 and when I try to create a new login from
>the sql server mgmnt studio, I get this error.
>
>Msg 170, Level 15, State 1, Line 1
>Line 1: Incorrect syntax near 'LOGIN'.
>
>I have logged in as "sa" and the login statement that I am using is:
>CREATE LOGIN test WITH PASSWORD = 'beta'
>The product version is 8.00.2039.
>Anybody knows whats wrong'
>Thanks for helping out.
>Esha
>
>|||Hi Steve,
Thanks for the quick response.
I just verified and you are right. My database engine is SQL server
2000 but my management studio is 2005. I used sp_addlogin and it
worked.
I created a new user for the new login from the management studio and I
assigned the roles of db_datareader and db_datawriter. If I need to
allow the user, read and write access only, but not "execute" access
for scripts, do I need to assign any other roles apart from the above
two?
Thanks a lot
Esha
Steve Kass wrote:
> Esha,
> CREATE LOGIN is a new T-SQL statement in SQL Server 2005.
> Since you are using SQL Server 2000, you need to use sp_addlogin
> or sp_grantlogin. Management Studio should use the version-appropriate
> T-SQL depending on whether you are adding a login to a 2000 instance
> or a 2005 instance. If this is not working for you, can you tell us what
> steps you are taking in Management Studio in your attempt to create
> the new login?
> Steve Kass
> Drew University
> Esha wrote:
>|||Thanks Roger,
I was using management studio 2005 to connect to SQL server 2000 and
hence it was not working. I used sp_addlogin as suggested by Steve and
it worked.
Thanks a lot,
Esha
Roger Wolter[MSFT] wrote:
> Works for me. The two most likely cause I can think of is there's a
> non-printable character somewhere that didn't get copied to the post or yo
u
> have a Beta version of SQL Server 2005 (or SQL Server 2000) that had a
> different CREATE LOGIN syntax.
> --
> This posting is provided "AS IS" with no warranties, and confers no rights
.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
> "Esha" <eshhyasi@.gmail.com> wrote in message
> news:1151465435.377462.192620@.p79g2000cwp.googlegroups.com...|||Esha,
Whether the user can "execute" a script (a T-SQL statement?) depends on
what the script does. A data reader can execute a SELECT statement,
and a data writer can execute DELETE, UPDATE, or INSERT statements.
You can grant or deny permissions on individual stored procedures, tables,
and other objects more specifically with GRANT and DENY. The security
models for 2000 and 2005 are somewhat different, and I suggest you refer to
Books Online for the appropriate version of your database instance for more
details.
SK
Esha wrote:
>Hi Steve,
>Thanks for the quick response.
>I just verified and you are right. My database engine is SQL server
>2000 but my management studio is 2005. I used sp_addlogin and it
>worked.
>I created a new user for the new login from the management studio and I
>assigned the roles of db_datareader and db_datawriter. If I need to
>allow the user, read and write access only, but not "execute" access
>for scripts, do I need to assign any other roles apart from the above
>two?
>Thanks a lot
>Esha
>Steve Kass wrote:
>
>
>
Error creating login - Incorrect syntax near 'LOGIN'.
I am using Sql server 2005 and when I try to create a new login from
the sql server mgmnt studio, I get this error.
Msg 170, Level 15, State 1, Line 1
Line 1: Incorrect syntax near 'LOGIN'.
I have logged in as "sa" and the login statement that I am using is:
CREATE LOGIN test WITH PASSWORD = 'beta'
The product version is 8.00.2039.
Anybody knows whats wrong'
Thanks for helping out.
EshaThis is a multi-part message in MIME format.
--060001040307010407040902
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Yeah, you're trying to run a "CREATE LOGIN" statement on a SQL 2000
instance by the sounds of it. What's the version of the SQL instance
(run "SELECT SERVERPROPERTY('ProductVersion')")?
CREATE LOGIN is new to the SQL 2005 dialect of T-SQL. To add new logins
to a SQL 2000 instance, regardless of which SQL client tool you use, you
need to use sp_addlogin or sp_grantlogin (depending on whether it's a
standard SQL login or a trusted login we're talking about). I think the
GUI in Management Studio ought to take care of this automatically (ie.
use different commands depending on the server version) but if you want
to use T-SQL yourself then you need to write the correct statements for
the SQL version the server is running.
--
*mike hodgson*
http://sqlnerd.blogspot.com
eshhyasi@.gmail.com wrote:
>Hi,
>I am using Sql server 2005 and when I try to create a new login from
>the sql server mgmnt studio, I get this error.
>Msg 170, Level 15, State 1, Line 1
>Line 1: Incorrect syntax near 'LOGIN'.
>I have logged in as "sa" and the login statement that I am using is:
>CREATE LOGIN test WITH PASSWORD = 'beta'
>The product version is 8.00.2039.
>Anybody knows whats wrong'
>Thanks for helping out.
>Esha
>
>
--060001040307010407040902
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>Yeah, you're trying to run a "CREATE LOGIN" statement on a SQL 2000
instance by the sounds of it. What's the version of the SQL instance
(run "SELECT SERVERPROPERTY('ProductVersion')")?<br>
<br>
CREATE LOGIN is new to the SQL 2005 dialect of T-SQL. To add new
logins to a SQL 2000 instance, regardless of which SQL client tool you
use, you need to use sp_addlogin or sp_grantlogin (depending on whether
it's a standard SQL login or a trusted login we're talking about). I
think the GUI in Management Studio ought to take care of this
automatically (ie. use different commands depending on the server
version) but if you want to use T-SQL yourself then you need to write
the correct statements for the SQL version the server is running.<br>
</tt>
<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"><br>
<font face="Tahoma" size="2"><a href="http://links.10026.com/?link=http://sqlnerd.blogspot.com</a></font></span>">http://sqlnerd.blogspot.com">http://sqlnerd.blogspot.com</a></font></span>
</p>
</div>
<br>
<br>
<a class="moz-txt-link-abbreviated" href="http://links.10026.com/?link=mailto:eshhyasi@.gmail.com">eshhyasi@.gmail.com</a> wrote:
<blockquote
cite="mid1151465632.155321.236760@.m73g2000cwd.googlegroups.com"
type="cite">
<pre wrap="">Hi,
I am using Sql server 2005 and when I try to create a new login from
the sql server mgmnt studio, I get this error.
Msg 170, Level 15, State 1, Line 1
Line 1: Incorrect syntax near 'LOGIN'.
I have logged in as "sa" and the login statement that I am using is:
CREATE LOGIN test WITH PASSWORD = 'beta'
The product version is 8.00.2039.
Anybody knows whats wrong'
Thanks for helping out.
Esha
</pre>
</blockquote>
</body>
</html>
--060001040307010407040902--|||Thanks Mike,
I used sp_addlogin and it worked.
Thanks a lot,
Esha
Mike Hodgson wrote:
> Yeah, you're trying to run a "CREATE LOGIN" statement on a SQL 2000
> instance by the sounds of it. What's the version of the SQL instance
> (run "SELECT SERVERPROPERTY('ProductVersion')")?
> CREATE LOGIN is new to the SQL 2005 dialect of T-SQL. To add new logins
> to a SQL 2000 instance, regardless of which SQL client tool you use, you
> need to use sp_addlogin or sp_grantlogin (depending on whether it's a
> standard SQL login or a trusted login we're talking about). I think the
> GUI in Management Studio ought to take care of this automatically (ie.
> use different commands depending on the server version) but if you want
> to use T-SQL yourself then you need to write the correct statements for
> the SQL version the server is running.
> --
> *mike hodgson*
> http://sqlnerd.blogspot.com
>
> eshhyasi@.gmail.com wrote:
> >Hi,
> >
> >I am using Sql server 2005 and when I try to create a new login from
> >the sql server mgmnt studio, I get this error.
> >
> >Msg 170, Level 15, State 1, Line 1
> >Line 1: Incorrect syntax near 'LOGIN'.
> >
> >I have logged in as "sa" and the login statement that I am using is:
> >
> >CREATE LOGIN test WITH PASSWORD = 'beta'
> >
> >The product version is 8.00.2039.
> >
> >Anybody knows whats wrong'
> >
> >Thanks for helping out.
> >
> >Esha
> >
> >
> >
> --060001040307010407040902
> Content-Type: text/html; charset=ISO-8859-1
> X-Google-AttachSize: 2029
> <!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>Yeah, you're trying to run a "CREATE LOGIN" statement on a SQL 2000
> instance by the sounds of it. What's the version of the SQL instance
> (run "SELECT SERVERPROPERTY('ProductVersion')")?<br>
> <br>
> CREATE LOGIN is new to the SQL 2005 dialect of T-SQL. To add new
> logins to a SQL 2000 instance, regardless of which SQL client tool you
> use, you need to use sp_addlogin or sp_grantlogin (depending on whether
> it's a standard SQL login or a trusted login we're talking about). I
> think the GUI in Management Studio ought to take care of this
> automatically (ie. use different commands depending on the server
> version) but if you want to use T-SQL yourself then you need to write
> the correct statements for the SQL version the server is running.<br>
> </tt>
> <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"><br>
> <font face="Tahoma" size="2"><a href="http://links.10026.com/?link=http://sqlnerd.blogspot.com</a></font></span>">http://sqlnerd.blogspot.com">http://sqlnerd.blogspot.com</a></font></span>
> </p>
> </div>
> <br>
> <br>
> <a class="moz-txt-link-abbreviated" href="http://links.10026.com/?link=mailto:eshhyasi@.gmail.com">eshhyasi@.gmail.com</a> wrote:
> <blockquote
> cite="mid1151465632.155321.236760@.m73g2000cwd.googlegroups.com"
> type="cite">
> <pre wrap="">Hi,
> I am using Sql server 2005 and when I try to create a new login from
> the sql server mgmnt studio, I get this error.
> Msg 170, Level 15, State 1, Line 1
> Line 1: Incorrect syntax near 'LOGIN'.
> I have logged in as "sa" and the login statement that I am using is:
> CREATE LOGIN test WITH PASSWORD = 'beta'
> The product version is 8.00.2039.
> Anybody knows whats wrong'
> Thanks for helping out.
> Esha
> </pre>
> </blockquote>
> </body>
> </html>
> --060001040307010407040902--|||Thanks Mike,
I used sp_addlogin and it worked.
Thanks a lot,
Esha
Mike Hodgson wrote:
> Yeah, you're trying to run a "CREATE LOGIN" statement on a SQL 2000
> instance by the sounds of it. What's the version of the SQL instance
> (run "SELECT SERVERPROPERTY('ProductVersion')")?
> CREATE LOGIN is new to the SQL 2005 dialect of T-SQL. To add new logins
> to a SQL 2000 instance, regardless of which SQL client tool you use, you
> need to use sp_addlogin or sp_grantlogin (depending on whether it's a
> standard SQL login or a trusted login we're talking about). I think the
> GUI in Management Studio ought to take care of this automatically (ie.
> use different commands depending on the server version) but if you want
> to use T-SQL yourself then you need to write the correct statements for
> the SQL version the server is running.
> --
> *mike hodgson*
> http://sqlnerd.blogspot.com
>
> eshhyasi@.gmail.com wrote:
> >Hi,
> >
> >I am using Sql server 2005 and when I try to create a new login from
> >the sql server mgmnt studio, I get this error.
> >
> >Msg 170, Level 15, State 1, Line 1
> >Line 1: Incorrect syntax near 'LOGIN'.
> >
> >I have logged in as "sa" and the login statement that I am using is:
> >
> >CREATE LOGIN test WITH PASSWORD = 'beta'
> >
> >The product version is 8.00.2039.
> >
> >Anybody knows whats wrong'
> >
> >Thanks for helping out.
> >
> >Esha
> >
> >
> >
> --060001040307010407040902
> Content-Type: text/html; charset=ISO-8859-1
> X-Google-AttachSize: 2029
> <!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>Yeah, you're trying to run a "CREATE LOGIN" statement on a SQL 2000
> instance by the sounds of it. What's the version of the SQL instance
> (run "SELECT SERVERPROPERTY('ProductVersion')")?<br>
> <br>
> CREATE LOGIN is new to the SQL 2005 dialect of T-SQL. To add new
> logins to a SQL 2000 instance, regardless of which SQL client tool you
> use, you need to use sp_addlogin or sp_grantlogin (depending on whether
> it's a standard SQL login or a trusted login we're talking about). I
> think the GUI in Management Studio ought to take care of this
> automatically (ie. use different commands depending on the server
> version) but if you want to use T-SQL yourself then you need to write
> the correct statements for the SQL version the server is running.<br>
> </tt>
> <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"><br>
> <font face="Tahoma" size="2"><a href="http://links.10026.com/?link=http://sqlnerd.blogspot.com</a></font></span>">http://sqlnerd.blogspot.com">http://sqlnerd.blogspot.com</a></font></span>
> </p>
> </div>
> <br>
> <br>
> <a class="moz-txt-link-abbreviated" href="http://links.10026.com/?link=mailto:eshhyasi@.gmail.com">eshhyasi@.gmail.com</a> wrote:
> <blockquote
> cite="mid1151465632.155321.236760@.m73g2000cwd.googlegroups.com"
> type="cite">
> <pre wrap="">Hi,
> I am using Sql server 2005 and when I try to create a new login from
> the sql server mgmnt studio, I get this error.
> Msg 170, Level 15, State 1, Line 1
> Line 1: Incorrect syntax near 'LOGIN'.
> I have logged in as "sa" and the login statement that I am using is:
> CREATE LOGIN test WITH PASSWORD = 'beta'
> The product version is 8.00.2039.
> Anybody knows whats wrong'
> Thanks for helping out.
> Esha
> </pre>
> </blockquote>
> </body>
> </html>
> --060001040307010407040902--|||Even you are using Management Studio, you are connected to a SQL Server 2000
instance (according to your product version). You should connect to a SQL
Server 2005 instance to use create login.
Ben Nevarez, MCDBA, OCP
Database Administrator
"eshhyasi@.gmail.com" wrote:
> Hi,
> I am using Sql server 2005 and when I try to create a new login from
> the sql server mgmnt studio, I get this error.
> Msg 170, Level 15, State 1, Line 1
> Line 1: Incorrect syntax near 'LOGIN'.
> I have logged in as "sa" and the login statement that I am using is:
> CREATE LOGIN test WITH PASSWORD = 'beta'
> The product version is 8.00.2039.
> Anybody knows whats wrong'
> Thanks for helping out.
> Esha
>
Error creating login - Incorrect syntax near 'LOGIN'.
instance by the sounds of it. What's the version of the SQL instance
(run "SELECT SERVERPROPERTY('ProductVersion')")?
CREATE LOGIN is new to the SQL 2005 dialect of T-SQL. To add new logins
to a SQL 2000 instance, regardless of which SQL client tool you use, you
need to use sp_addlogin or sp_grantlogin (depending on whether it's a
standard SQL login or a trusted login we're talking about). I think the
GUI in Management Studio ought to take care of this automatically (ie.
use different commands depending on the server version) but if you want
to use T-SQL yourself then you need to write the correct statements for
the SQL version the server is running.
*mike hodgson*
http://sqlnerd.blogspot.com
eshhyasi@.gmail.com wrote:
>Hi,
>I am using Sql server 2005 and when I try to create a new login from
>the sql server mgmnt studio, I get this error.
>Msg 170, Level 15, State 1, Line 1
>Line 1: Incorrect syntax near 'LOGIN'.
>I have logged in as "sa" and the login statement that I am using is:
>CREATE LOGIN test WITH PASSWORD = 'beta'
>The product version is 8.00.2039.
>Anybody knows whats wrong'
>Thanks for helping out.
>Esha
>
>Even you are using Management Studio, you are connected to a SQL Server 2000
instance (according to your product version). You should connect to a SQL
Server 2005 instance to use create login.
Ben Nevarez, MCDBA, OCP
Database Administrator
"eshhyasi@.gmail.com" wrote:
> Hi,
> I am using Sql server 2005 and when I try to create a new login from
> the sql server mgmnt studio, I get this error.
> Msg 170, Level 15, State 1, Line 1
> Line 1: Incorrect syntax near 'LOGIN'.
> I have logged in as "sa" and the login statement that I am using is:
> CREATE LOGIN test WITH PASSWORD = 'beta'
> The product version is 8.00.2039.
> Anybody knows whats wrong'
> Thanks for helping out.
> Esha
>|||Thanks Mike,
I used sp_addlogin and it worked.
Thanks a lot,
Esha
Mike Hodgson wrote:
> Yeah, you're trying to run a "CREATE LOGIN" statement on a SQL 2000
> instance by the sounds of it. What's the version of the SQL instance
> (run "SELECT SERVERPROPERTY('ProductVersion')")?
> CREATE LOGIN is new to the SQL 2005 dialect of T-SQL. To add new logins
> to a SQL 2000 instance, regardless of which SQL client tool you use, you
> need to use sp_addlogin or sp_grantlogin (depending on whether it's a
> standard SQL login or a trusted login we're talking about). I think the
> GUI in Management Studio ought to take care of this automatically (ie.
> use different commands depending on the server version) but if you want
> to use T-SQL yourself then you need to write the correct statements for
> the SQL version the server is running.
> --
> *mike hodgson*
> http://sqlnerd.blogspot.com
>
> eshhyasi@.gmail.com wrote:
>
> --060001040307010407040902
> Content-Type: text/html; charset=ISO-8859-1
> X-Google-AttachSize: 2029
> <!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>Yeah, you're trying to run a "CREATE LOGIN" statement on a SQL 2000
> instance by the sounds of it. What's the version of the SQL inst
ance
> (run "SELECT SERVERPROPERTY('ProductVersion')")?<br>
> <br>
> CREATE LOGIN is new to the SQL 2005 dialect of T-SQL. To add new
> logins to a SQL 2000 instance, regardless of which SQL client tool you
> use, you need to use sp_addlogin or sp_grantlogin (depending on whether
> it's a standard SQL login or a trusted login we're talking about).&nbs
p; I
> think the GUI in Management Studio ought to take care of this
> automatically (ie. use different commands depending on the server
> version) but if you want to use T-SQL yourself then you need to write
> the correct statements for the SQL version the server is running.<br>
> </tt>
> <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"><br>
> <font face="Tahoma" size="2"><a href="http://links.10026.com/?link=http://sqlnerd.blogspot.com">http://sqlner
d.blogspot.com</a></font></span>
> </p>
> </div>
> <br>
> <br>
> <a class="moz-txt-link-abbreviated" href="http://links.10026.com/?link=mailto:eshhyasi@.gmail.com">eshhy
asi@.gmail.com</a> wrote:
> <blockquote
> cite="mid1151465632.155321.236760@.m73g2000cwd.googlegroups.com"
> type="cite">
> <pre wrap="">Hi,
> I am using Sql server 2005 and when I try to create a new login from
> the sql server mgmnt studio, I get this error.
> Msg 170, Level 15, State 1, Line 1
> Line 1: Incorrect syntax near 'LOGIN'.
> I have logged in as "sa" and the login statement that I am using is:
> CREATE LOGIN test WITH PASSWORD = 'beta'
> The product version is 8.00.2039.
> Anybody knows whats wrong'
> Thanks for helping out.
> Esha
> </pre>
> </blockquote>
> </body>
> </html>
> --060001040307010407040902--|||Thanks Mike,
I used sp_addlogin and it worked.
Thanks a lot,
Esha
Mike Hodgson wrote:
> Yeah, you're trying to run a "CREATE LOGIN" statement on a SQL 2000
> instance by the sounds of it. What's the version of the SQL instance
> (run "SELECT SERVERPROPERTY('ProductVersion')")?
> CREATE LOGIN is new to the SQL 2005 dialect of T-SQL. To add new logins
> to a SQL 2000 instance, regardless of which SQL client tool you use, you
> need to use sp_addlogin or sp_grantlogin (depending on whether it's a
> standard SQL login or a trusted login we're talking about). I think the
> GUI in Management Studio ought to take care of this automatically (ie.
> use different commands depending on the server version) but if you want
> to use T-SQL yourself then you need to write the correct statements for
> the SQL version the server is running.
> --
> *mike hodgson*
> http://sqlnerd.blogspot.com
>
> eshhyasi@.gmail.com wrote:
>
> --060001040307010407040902
> Content-Type: text/html; charset=ISO-8859-1
> X-Google-AttachSize: 2029
> <!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>Yeah, you're trying to run a "CREATE LOGIN" statement on a SQL 2000
> instance by the sounds of it. What's the version of the SQL inst
ance
> (run "SELECT SERVERPROPERTY('ProductVersion')")?<br>
> <br>
> CREATE LOGIN is new to the SQL 2005 dialect of T-SQL. To add new
> logins to a SQL 2000 instance, regardless of which SQL client tool you
> use, you need to use sp_addlogin or sp_grantlogin (depending on whether
> it's a standard SQL login or a trusted login we're talking about).&nbs
p; I
> think the GUI in Management Studio ought to take care of this
> automatically (ie. use different commands depending on the server
> version) but if you want to use T-SQL yourself then you need to write
> the correct statements for the SQL version the server is running.<br>
> </tt>
> <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"><br>
> <font face="Tahoma" size="2"><a href="http://links.10026.com/?link=http://sqlnerd.blogspot.com">http://sqlner
d.blogspot.com</a></font></span>
> </p>
> </div>
> <br>
> <br>
> <a class="moz-txt-link-abbreviated" href="http://links.10026.com/?link=mailto:eshhyasi@.gmail.com">eshhy
asi@.gmail.com</a> wrote:
> <blockquote
> cite="mid1151465632.155321.236760@.m73g2000cwd.googlegroups.com"
> type="cite">
> <pre wrap="">Hi,
> I am using Sql server 2005 and when I try to create a new login from
> the sql server mgmnt studio, I get this error.
> Msg 170, Level 15, State 1, Line 1
> Line 1: Incorrect syntax near 'LOGIN'.
> I have logged in as "sa" and the login statement that I am using is:
> CREATE LOGIN test WITH PASSWORD = 'beta'
> The product version is 8.00.2039.
> Anybody knows whats wrong'
> Thanks for helping out.
> Esha
> </pre>
> </blockquote>
> </body>
> </html>
> --060001040307010407040902--|||Hi,
I am using Sql server 2005 and when I try to create a new login from
the sql server mgmnt studio, I get this error.
Msg 170, Level 15, State 1, Line 1
Line 1: Incorrect syntax near 'LOGIN'.
I have logged in as "sa" and the login statement that I am using is:
CREATE LOGIN test WITH PASSWORD = 'beta'
The product version is 8.00.2039.
Anybody knows whats wrong'
Thanks for helping out.
Esha|||Yeah, you're trying to run a "CREATE LOGIN" statement on a SQL 2000
instance by the sounds of it. What's the version of the SQL instance
(run "SELECT SERVERPROPERTY('ProductVersion')")?
CREATE LOGIN is new to the SQL 2005 dialect of T-SQL. To add new logins
to a SQL 2000 instance, regardless of which SQL client tool you use, you
need to use sp_addlogin or sp_grantlogin (depending on whether it's a
standard SQL login or a trusted login we're talking about). I think the
GUI in Management Studio ought to take care of this automatically (ie.
use different commands depending on the server version) but if you want
to use T-SQL yourself then you need to write the correct statements for
the SQL version the server is running.
*mike hodgson*
http://sqlnerd.blogspot.com
eshhyasi@.gmail.com wrote:
>Hi,
>I am using Sql server 2005 and when I try to create a new login from
>the sql server mgmnt studio, I get this error.
>Msg 170, Level 15, State 1, Line 1
>Line 1: Incorrect syntax near 'LOGIN'.
>I have logged in as "sa" and the login statement that I am using is:
>CREATE LOGIN test WITH PASSWORD = 'beta'
>The product version is 8.00.2039.
>Anybody knows whats wrong'
>Thanks for helping out.
>Esha
>
>|||Even you are using Management Studio, you are connected to a SQL Server 2000
instance (according to your product version). You should connect to a SQL
Server 2005 instance to use create login.
Ben Nevarez, MCDBA, OCP
Database Administrator
"eshhyasi@.gmail.com" wrote:
> Hi,
> I am using Sql server 2005 and when I try to create a new login from
> the sql server mgmnt studio, I get this error.
> Msg 170, Level 15, State 1, Line 1
> Line 1: Incorrect syntax near 'LOGIN'.
> I have logged in as "sa" and the login statement that I am using is:
> CREATE LOGIN test WITH PASSWORD = 'beta'
> The product version is 8.00.2039.
> Anybody knows whats wrong'
> Thanks for helping out.
> Esha
>|||Thanks Mike,
I used sp_addlogin and it worked.
Thanks a lot,
Esha
Mike Hodgson wrote:
> Yeah, you're trying to run a "CREATE LOGIN" statement on a SQL 2000
> instance by the sounds of it. What's the version of the SQL instance
> (run "SELECT SERVERPROPERTY('ProductVersion')")?
> CREATE LOGIN is new to the SQL 2005 dialect of T-SQL. To add new logins
> to a SQL 2000 instance, regardless of which SQL client tool you use, you
> need to use sp_addlogin or sp_grantlogin (depending on whether it's a
> standard SQL login or a trusted login we're talking about). I think the
> GUI in Management Studio ought to take care of this automatically (ie.
> use different commands depending on the server version) but if you want
> to use T-SQL yourself then you need to write the correct statements for
> the SQL version the server is running.
> --
> *mike hodgson*
> http://sqlnerd.blogspot.com
>
> eshhyasi@.gmail.com wrote:
>
> --060001040307010407040902
> Content-Type: text/html; charset=ISO-8859-1
> X-Google-AttachSize: 2029
> <!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>Yeah, you're trying to run a "CREATE LOGIN" statement on a SQL 2000
> instance by the sounds of it. What's the version of the SQL inst
ance
> (run "SELECT SERVERPROPERTY('ProductVersion')")?<br>
> <br>
> CREATE LOGIN is new to the SQL 2005 dialect of T-SQL. To add new
> logins to a SQL 2000 instance, regardless of which SQL client tool you
> use, you need to use sp_addlogin or sp_grantlogin (depending on whether
> it's a standard SQL login or a trusted login we're talking about).&nbs
p; I
> think the GUI in Management Studio ought to take care of this
> automatically (ie. use different commands depending on the server
> version) but if you want to use T-SQL yourself then you need to write
> the correct statements for the SQL version the server is running.<br>
> </tt>
> <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"><br>
> <font face="Tahoma" size="2"><a href="http://links.10026.com/?link=http://sqlnerd.blogspot.com">http://sqlner
d.blogspot.com</a></font></span>
> </p>
> </div>
> <br>
> <br>
> <a class="moz-txt-link-abbreviated" href="http://links.10026.com/?link=mailto:eshhyasi@.gmail.com">eshhy
asi@.gmail.com</a> wrote:
> <blockquote
> cite="mid1151465632.155321.236760@.m73g2000cwd.googlegroups.com"
> type="cite">
> <pre wrap="">Hi,
> I am using Sql server 2005 and when I try to create a new login from
> the sql server mgmnt studio, I get this error.
> Msg 170, Level 15, State 1, Line 1
> Line 1: Incorrect syntax near 'LOGIN'.
> I have logged in as "sa" and the login statement that I am using is:
> CREATE LOGIN test WITH PASSWORD = 'beta'
> The product version is 8.00.2039.
> Anybody knows whats wrong'
> Thanks for helping out.
> Esha
> </pre>
> </blockquote>
> </body>
> </html>
> --060001040307010407040902--|||Thanks Mike,
I used sp_addlogin and it worked.
Thanks a lot,
Esha
Mike Hodgson wrote:
> Yeah, you're trying to run a "CREATE LOGIN" statement on a SQL 2000
> instance by the sounds of it. What's the version of the SQL instance
> (run "SELECT SERVERPROPERTY('ProductVersion')")?
> CREATE LOGIN is new to the SQL 2005 dialect of T-SQL. To add new logins
> to a SQL 2000 instance, regardless of which SQL client tool you use, you
> need to use sp_addlogin or sp_grantlogin (depending on whether it's a
> standard SQL login or a trusted login we're talking about). I think the
> GUI in Management Studio ought to take care of this automatically (ie.
> use different commands depending on the server version) but if you want
> to use T-SQL yourself then you need to write the correct statements for
> the SQL version the server is running.
> --
> *mike hodgson*
> http://sqlnerd.blogspot.com
>
> eshhyasi@.gmail.com wrote:
>
> --060001040307010407040902
> Content-Type: text/html; charset=ISO-8859-1
> X-Google-AttachSize: 2029
> <!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>Yeah, you're trying to run a "CREATE LOGIN" statement on a SQL 2000
> instance by the sounds of it. What's the version of the SQL inst
ance
> (run "SELECT SERVERPROPERTY('ProductVersion')")?<br>
> <br>
> CREATE LOGIN is new to the SQL 2005 dialect of T-SQL. To add new
> logins to a SQL 2000 instance, regardless of which SQL client tool you
> use, you need to use sp_addlogin or sp_grantlogin (depending on whether
> it's a standard SQL login or a trusted login we're talking about).&nbs
p; I
> think the GUI in Management Studio ought to take care of this
> automatically (ie. use different commands depending on the server
> version) but if you want to use T-SQL yourself then you need to write
> the correct statements for the SQL version the server is running.<br>
> </tt>
> <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"><br>
> <font face="Tahoma" size="2"><a href="http://links.10026.com/?link=http://sqlnerd.blogspot.com">http://sqlner
d.blogspot.com</a></font></span>
> </p>
> </div>
> <br>
> <br>
> <a class="moz-txt-link-abbreviated" href="http://links.10026.com/?link=mailto:eshhyasi@.gmail.com">eshhy
asi@.gmail.com</a> wrote:
> <blockquote
> cite="mid1151465632.155321.236760@.m73g2000cwd.googlegroups.com"
> type="cite">
> <pre wrap="">Hi,
> I am using Sql server 2005 and when I try to create a new login from
> the sql server mgmnt studio, I get this error.
> Msg 170, Level 15, State 1, Line 1
> Line 1: Incorrect syntax near 'LOGIN'.
> I have logged in as "sa" and the login statement that I am using is:
> CREATE LOGIN test WITH PASSWORD = 'beta'
> The product version is 8.00.2039.
> Anybody knows whats wrong'
> Thanks for helping out.
> Esha
> </pre>
> </blockquote>
> </body>
> </html>
> --060001040307010407040902--
Error Creating DSN using odbcconf.exe for SQL Server
hi there
i want to create a DSN using command line arguments,with Trusted connection=no, Login name= sa password=*******
i try creating like this
C:\>odbcconf.exe /a {CONFIGSYSDSN "SQL Server" "DSN=blabla|Description=blablubb|SERVER=vsnet1|Trusted_Connection=no |Database=dm"}
this work fine, but when i specify the login id & password as
C:\>odbcconf.exe /a {CONFIGSYSDSN "SQL Server" "DSN=blabla|Description=blablubb|SERVER=vsnet1|Trusted_Connection=no|loginid=sa|password=sysadm|Database=dm"}
this throws an error as
CONFIGSYSDSN: Unable to create a data source for the 'SQL Server' Driver: Invalid keyword-value pair with error code :2147467259
I too try the
loginID, login id, login , user, userid, uid
Password, pwd
and many more...
all these throws same error.
Please help me.
Regards,
Thnaks.
Gurpreet S. Gill
Persistence of login credentials in a DSN is not supported (it's insecure). Using trusted connection would be the best way to achieve connecting without specifying credentials since the logged on user credentials is used for authenticating to the server. The command below should create the DSN for you.
odbcconf.exe /a {CONFIGSYSDSN "SQL Server" "DSN=blabla|Description=blablubb|SERVER=vsnet1|Trusted_Connection=Yes|Database=dm"}
Hope this helps
Uwa.
|||Thanks Uwa Agbonile
this is right, that it is insecure, is there any way to do that, i mean the registry (regedit), or else?
Regards,
Thanks.
Gurpreet S. Gill
|||Like I suggested already, one secure way to do this is to use integrated security. If you must use SQL Server authentication your options depend on the circumstances of your application. You could code the application to request the credentials from the user or retrieve them from a location you know to be secure.
You could also embed the credentials as part of the connection string directly in your application but again this is insecure and not recommended.
Regards,
Uwa.
|||Uwa--
I understand, what you want to say.
Thanks for your help.
Regards
Gurpreet S. Gill
Error Creating DSN using odbcconf.exe for SQL Server
hi there
i want to create a DSN using command line arguments,with Trusted connection=no, Login name= sa password=*******
i try creating like this
C:\>odbcconf.exe /a {CONFIGSYSDSN "SQL Server" "DSN=blabla|Description=blablubb|SERVER=vsnet1|Trusted_Connection=no |Database=dm"}
this work fine, but when i specify the login id & password as
C:\>odbcconf.exe /a {CONFIGSYSDSN "SQL Server" "DSN=blabla|Description=blablubb|SERVER=vsnet1|Trusted_Connection=no|loginid=sa|password=sysadm|Database=dm"}
this throws an error as
CONFIGSYSDSN: Unable to create a data source for the 'SQL Server' Driver: Invalid keyword-value pair with error code :2147467259
I too try the
loginID, login id, login , user, userid, uid
Password, pwd
and many more...
all these throws same error.
Please help me.
Regards,
Thnaks.
Gurpreet S. Gill
Persistence of login credentials in a DSN is not supported (it's insecure). Using trusted connection would be the best way to achieve connecting without specifying credentials since the logged on user credentials is used for authenticating to the server. The command below should create the DSN for you.
odbcconf.exe /a {CONFIGSYSDSN "SQL Server" "DSN=blabla|Description=blablubb|SERVER=vsnet1|Trusted_Connection=Yes|Database=dm"}
Hope this helps
Uwa.
|||Thanks Uwa Agbonile
this is right, that it is insecure, is there any way to do that, i mean the registry (regedit), or else?
Regards,
Thanks.
Gurpreet S. Gill
|||Like I suggested already, one secure way to do this is to use integrated security. If you must use SQL Server authentication your options depend on the circumstances of your application. You could code the application to request the credentials from the user or retrieve them from a location you know to be secure.
You could also embed the credentials as part of the connection string directly in your application but again this is insecure and not recommended.
Regards,
Uwa.
|||Uwa--
I understand, what you want to say.
Thanks for your help.
Regards
Gurpreet S. Gill
Error Could establish connection to the database
Hi,
I encounter few errors when I try to create a login page using tool in Microsoft Visual Studio 2005, please refer to below :
'--------------------------
When I try to configure the setting for Provider Configuration in the ASP.NET Website Administration Tool using Select a single provider for all site management data or Select a different provider for each feature (advanced) options, the error 'Could not establish a connection to the database' appear.
I have tried to run aspnet_regsql to configure the server and database and return to this tool to configure the Provider configuration but the same error 'Could not establish a connection to the database.' appear.
When I click the Security Configuration link in ASP.NET Configuration, the error as shown below appear :
'There is a problem with your selected data store. This can be caused by an invalid server name or credentials, or by insufficient permission. It can also be caused by the role manager feature not being enabled. Click the below button to be redirected to a page where you can choose a new data store.
The following message may help in diagnosing the problem: An error has occured while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact under the default settings SQL Server does not allow remote connections.(provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)'
When I try to choose Data Store in the Security Configuration screen(Figure 4), the same error('Could not establish a connection to the database') appear.
I also have tried to configure the SQL Server Surface Area Configuration but the same error still appear….
Is there any other configuration I need to set before I can create this login page?
Thank you.
Hi Vickie,
Based on the errors, have you verified that you can manually connect to the data source with the connection string information you are using? You can use the information at this link to see if the 'role manager' feature is enabled,http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag2/html/paght000013.asp. And, you can use this link to verify that your server will allow remote connections,http://support.microsoft.com/kb/265808/en-us. I hope this helps.
~des
Friday, March 9, 2012
Error Connection with instance
After create it , how to add into ODBC?have any different for the login
authentication between instance and local server?> How i can create the Instance into my sql server?
> After create it , how to add into ODBC?have any different for the login
> authentication between instance and local server?
It is hard to say what went wrong from your info. You can check how to
connect to SQL Server at
http://msdn2.microsoft.com/en-gb/library/ms190944.aspx. You can check
different connection string, including ODBS connection strings, at
http://www.connectionstrings.com/.
--
Dejan Sarka
http://www.solidqualitylearning.com/blogs/
Error Connecting To SQL 2005 through Webservice using SQL Authentication
Running a SQL 2005 Database under a Default instance. i.e. (SERVERNAME) and not (SERVERNAME/SQL2005)
I have a SQL Login sa password.
When I connect to SQL 2005 from anywhere other then the webservice it works fine.
In my webservice i am using System.Data.SqlClient.
SqlConnection, SqlCommand, SqlDataAdapter are being used to called a stored procedure and return the data into a System.Data.DataSet.
I get the following error when calling DataAdapter.Fill(dataSet);
{"TCP Provider: An existing connection was forcibly closed by the remote host.\r\n\r\nLogin failed for user 'sa'."}
I have no resolutions as of yet. Any help would be greatly appreciated.
Did you mean you can connect to the SQL2005 from anywhere with 'sa' login, except webservice? You can check the status of 'sa' login in management studio under Security->Logins, also make sure the Authentication Mode is SQL Server and Windows.|||I have checked the status of the login for user "sa" and it has access rights and grant levels to everything it needs to.
I have also created a new account specifically for that database which does not work either. Same error.
And yes my SQL 2005 Instance is configured to use both SQL Authentication and Windows Authentication. (Mixed Mode).
Any Ideas?
|||If you encountered this issue when you're trying to establish encrypted connection , you may take a look at this article:
http://blogs.msdn.com/sql_protocols/archive/2006/07/26/678596.aspx
Wednesday, March 7, 2012
Error Connecting to Database (SQL Server 2005)!
I'm encountering an issue with regards to the default REMOTE LOGIN
settings to my database instance on SQL Server 2005.
The message I am recieving is as follows:
"An error has occurred while establishing a connection to the server.
When connecting to SQL Server 2005, this failure may be caused by the
fact
that under the default settings SQL Server does not allow remote
connections. (provider: Named Pipes Provider, error: 40 - Could not
open a connection to SQL Server
Please check your database settings and credentials and confirm that
the server is reachable."
To my knowledge, I am able to see my database running, and that I have
already set up the DAC Surface Area Configuration, and ensured that
both "Named Pipes and TCP/IP protocols" have been enabled.
Whats wrong here guys...am I missing something?Mohd Al Junaibi wrote:
> Hello all,
> I'm encountering an issue with regards to the default REMOTE LOGIN
> settings to my database instance on SQL Server 2005.
> The message I am recieving is as follows:
> "An error has occurred while establishing a connection to the server.
> When connecting to SQL Server 2005, this failure may be caused by the
> fact
> that under the default settings SQL Server does not allow remote
> connections. (provider: Named Pipes Provider, error: 40 - Could not
> open a connection to SQL Server
> Please check your database settings and credentials and confirm that
> the server is reachable."
>
> To my knowledge, I am able to see my database running, and that I have
> already set up the DAC Surface Area Configuration, and ensured that
> both "Named Pipes and TCP/IP protocols" have been enabled.
> Whats wrong here guys...am I missing something?
>
Did you enable Remote Connections in the Surface Area Configuration tool?
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||Yep...used the Surface Area Configuration and enabled remote logins
with Named Pipes and Support.
But just so that I didn't do anything wrong..what would be the
essential steps here (if you were in my shoes)..?|||Mohd Al Junaibi wrote:
> Yep...used the Surface Area Configuration and enabled remote logins
> with Named Pipes and Support.
> But just so that I didn't do anything wrong..what would be the
> essential steps here (if you were in my shoes)..?
>
Is SQL running on your local workstation, or on a remote server? Can
you ping that remote server, via hostname and via IP address? Is there
a firewall involved?
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||Yes, both MSSQL Service is running, and the agent is on as well. I
don't recall having the firewall running.
I'm beginning to think it has to do with credentials.
I'm running a command to create my WEBFORMS on a virtual directory,
it's experimental and called "Blinq" from Microsoft.
Anyways...I'll try to check things here..
thanks a million
Sunday, February 26, 2012
Error connecting
Login failed for user <DOMAINNAME\User>.
Please help."Viktor Zadro" <viktor.zadro@.tel.net.ba> wrote in message
news:ukzXI7IcEHA.3016@.tk2msftngp13.phx.gbl...
> Cannot open database requested in login <DatabaseName>. Login fails.
> Login failed for user <DOMAINNAME\User>.
>
How are you attempting to connect? Can you reproduce this using Query
Analyzer? What login and database permissions have you defined for this
user?
Steve|||Hello, Steve,
How can I manage SQL Server's users, for example, how to change the 'sa' pas
sword?
Is it can only be done by using 'Enterprise Manager'?
LLF
--
There's an unfinished grid inside my head...
"Steve Thompson" wrote:
> "Viktor Zadro" <viktor.zadro@.tel.net.ba> wrote in message
> news:ukzXI7IcEHA.3016@.tk2msftngp13.phx.gbl...
> How are you attempting to connect? Can you reproduce this using Query
> Analyzer? What login and database permissions have you defined for this
> user?
> Steve
>
>|||LLF,
You can use Enterprise Manager if you wish. Enterprise
Manager is really just executing T-SQL commands for you so
you can manage these through Query Analyzer or any other
tool that can connect to and execute queries on SQL Server.
Passwords are changed using sp_password.
You can add logins using sp_grantlogin for Windows logins or
sp_addlogin for SQL logins.
You can add users to a database using sp_grantdbaccess.
You can find all of these system stored procedures
documented in SQL Server Books Online.
-Sue
On Tue, 27 Jul 2004 10:01:37 -0700, LLF
<LLF@.discussions.microsoft.com> wrote:
>Hello, Steve,
>How can I manage SQL Server's users, for example, how to change the 'sa' pa
ssword?
>Is it can only be done by using 'Enterprise Manager'?
>LLF|||Thanks a lot !
LLF
There's an unfinished grid inside my head...
"Sue Hoegemeier" wrote:
> LLF,
> You can use Enterprise Manager if you wish. Enterprise
> Manager is really just executing T-SQL commands for you so
> you can manage these through Query Analyzer or any other
> tool that can connect to and execute queries on SQL Server.
> Passwords are changed using sp_password.
> You can add logins using sp_grantlogin for Windows logins or
> sp_addlogin for SQL logins.
> You can add users to a database using sp_grantdbaccess.
> You can find all of these system stored procedures
> documented in SQL Server Books Online.
> -Sue
> On Tue, 27 Jul 2004 10:01:37 -0700, LLF
> <LLF@.discussions.microsoft.com> wrote:
>
>
Error connecting
Login failed for user <DOMAINNAME\User>.
Please help.
"Viktor Zadro" <viktor.zadro@.tel.net.ba> wrote in message
news:ukzXI7IcEHA.3016@.tk2msftngp13.phx.gbl...
> Cannot open database requested in login <DatabaseName>. Login fails.
> Login failed for user <DOMAINNAME\User>.
>
How are you attempting to connect? Can you reproduce this using Query
Analyzer? What login and database permissions have you defined for this
user?
Steve
|||Hello, Steve,
How can I manage SQL Server's users, for example, how to change the 'sa' password?
Is it can only be done by using 'Enterprise Manager'?
LLF
There's an unfinished grid inside my head...
"Steve Thompson" wrote:
> "Viktor Zadro" <viktor.zadro@.tel.net.ba> wrote in message
> news:ukzXI7IcEHA.3016@.tk2msftngp13.phx.gbl...
> How are you attempting to connect? Can you reproduce this using Query
> Analyzer? What login and database permissions have you defined for this
> user?
> Steve
>
>
|||LLF,
You can use Enterprise Manager if you wish. Enterprise
Manager is really just executing T-SQL commands for you so
you can manage these through Query Analyzer or any other
tool that can connect to and execute queries on SQL Server.
Passwords are changed using sp_password.
You can add logins using sp_grantlogin for Windows logins or
sp_addlogin for SQL logins.
You can add users to a database using sp_grantdbaccess.
You can find all of these system stored procedures
documented in SQL Server Books Online.
-Sue
On Tue, 27 Jul 2004 10:01:37 -0700, LLF
<LLF@.discussions.microsoft.com> wrote:
>Hello, Steve,
>How can I manage SQL Server's users, for example, how to change the 'sa' password?
>Is it can only be done by using 'Enterprise Manager'?
>LLF
|||Thanks a lot !
LLF
There's an unfinished grid inside my head...
"Sue Hoegemeier" wrote:
> LLF,
> You can use Enterprise Manager if you wish. Enterprise
> Manager is really just executing T-SQL commands for you so
> you can manage these through Query Analyzer or any other
> tool that can connect to and execute queries on SQL Server.
> Passwords are changed using sp_password.
> You can add logins using sp_grantlogin for Windows logins or
> sp_addlogin for SQL logins.
> You can add users to a database using sp_grantdbaccess.
> You can find all of these system stored procedures
> documented in SQL Server Books Online.
> -Sue
> On Tue, 27 Jul 2004 10:01:37 -0700, LLF
> <LLF@.discussions.microsoft.com> wrote:
>
>
Wednesday, February 15, 2012
Error Adding SQL Server Login Properties
I have SQL 200 SP3 box that has a web app with a hard coded user; I
tried to re-add the user after it was deleted.
I now get the following error when trying to add the database access:
"Error 21002 [SQL-DMO] user 'unsername' already exists."
Any help would be greatly appreciated.
I fixed my issue by running the following:
use my_db;
go
sp_change_users_login AUTO_FIX, 'my_user'
go
Hulicat wrote:
> Hello,
> I have SQL 200 SP3 box that has a web app with a hard coded user; I
> tried to re-add the user after it was deleted.
> I now get the following error when trying to add the database access:
> "Error 21002 [SQL-DMO] user 'unsername' already exists."
>
> Any help would be greatly appreciated.
Error Adding SQL Server Login Properties
I have SQL 200 SP3 box that has a web app with a hard coded user; I
tried to re-add the user after it was deleted.
I now get the following error when trying to add the database access:
"Error 21002 [SQL-DMO] user 'unsername' already exists."
Any help would be greatly appreciated.I fixed my issue by running the following:
use my_db;
go
sp_change_users_login AUTO_FIX, 'my_user'
go
Hulicat wrote:
> Hello,
> I have SQL 200 SP3 box that has a web app with a hard coded user; I
> tried to re-add the user after it was deleted.
> I now get the following error when trying to add the database access:
> "Error 21002 [SQL-DMO] user 'unsername' already exists."
>
> Any help would be greatly appreciated.