Showing posts with label connect. Show all posts
Showing posts with label connect. Show all posts

Tuesday, March 27, 2012

DR Question

We are planning for DR setup. Currently the database is located on shared disk storage. During DR, if we connect the database in the shared disk storage to the DR server. Will we be able to start up the SQL server at DR server? The IP address of the DR server will be different from the production since on different network segment. Is there any other things we need to take care of, such as user logins? Please comment.

If what is on the shared disk is your user(application) database, then you'll need to manually sync up all other data such as logins, stored procedures, maintenance jobs, etc.

They you would need to attach the database to the instance on the new node.

Monday, March 19, 2012

Doubt about connections to sql server.

Hi, i have some applications that use a sql server user to connect to
databases. Sometimes i Check the las batch time in enterprise manager to
see if the connection is active, and the date is expressed like this:
"01/01/1900 12:00 am"
Do somebody know why this happen?
Thanks a lot for your help.
*** Sent via Developersdex http://www.codecomments.com ***
See if this helps:
http://support.microsoft.com/default...b;en-us;306625
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"MariaGuzman" <marisa@.devdex.com> wrote in message
news:OF18nL3dFHA.3808@.TK2MSFTNGP14.phx.gbl...
Hi, i have some applications that use a sql server user to connect to
databases. Sometimes i Check the las batch time in enterprise manager to
see if the connection is active, and the date is expressed like this:
"01/01/1900 12:00 am"
Do somebody know why this happen?
Thanks a lot for your help.
*** Sent via Developersdex http://www.codecomments.com ***

Doubt about connections to sql server.

Hi, i have some applications that use a sql server user to connect to
databases. Sometimes i Check the las batch time in enterprise manager to
see if the connection is active, and the date is expressed like this:
"01/01/1900 12:00 am"
Do somebody know why this happen'
Thanks a lot for your help.
*** Sent via Developersdex http://www.codecomments.com ***See if this helps:
http://support.microsoft.com/defaul...kb;en-us;306625
--
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"MariaGuzman" <marisa@.devdex.com> wrote in message
news:OF18nL3dFHA.3808@.TK2MSFTNGP14.phx.gbl...
Hi, i have some applications that use a sql server user to connect to
databases. Sometimes i Check the las batch time in enterprise manager to
see if the connection is active, and the date is expressed like this:
"01/01/1900 12:00 am"
Do somebody know why this happen'
Thanks a lot for your help.
*** Sent via Developersdex http://www.codecomments.com ***

Sunday, February 26, 2012

domain\user cannot log on SQL server 2005

Hi All,

I have an issue to connect to SQL 2005. My user is also declared in SQL 2005 as sysadmin.

C:\>ECHO %USERDOMAIN%\%USERNAME%
CMVAL\damien

C:\>sqlcmd -S CM-DB
1> quit

C:\>sqlcmd -S CM-DB -U "CMVAL\damien" -P "ThePassword"
Msg 18456, Level 14, State 1, Server CM-DB, Line 1
Login failed for user 'CMVAL\damien'.

C:\>

Seems that the system reject the domain I've provided. Some of my service failed to log to SQL Server due to this issue.

Thanks for your help.

Damien

By default, sqlcmd uses Windows Authentication. If you are using windows system, then you automatically get authenticated through windows authentication mode by not using -U options.

While if you do use -U, then it means you will be authenticated using Sql login mode, you need to use the sql server logins, not windows logins.

You may refer to http://msdn2.microsoft.com/en-us/library/ms165702.aspx for more information.

|||

Thanks LY.J for your answer.

In fact, my original issue is that I have a lot of this error in the event viewer :

Event Type: Failure Audit
Event Source: MSSQLSERVER
Event Category: (4)
Event ID: 18456
Date: 13/12/2006
Time: 09:42:29
User: CMVAL\damien
Computer: CM-DB
Description:
Login failed for user 'CMVAL\damien'. [CLIENT: 10.194.94.8]

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Data:
0000: 18 48 00 00 0e 00 00 00 .H......
0008: 06 00 00 00 43 00 4d 00 ....C.M.
0010: 2d 00 44 00 42 00 00 00 -.D.B...
0018: 07 00 00 00 6d 00 61 00 ....m.a.
0020: 73 00 74 00 65 00 72 00 s.t.e.r.
0028: 00 00 ..

Then I suppose that if I can't connect to the DB with sqlcmd providing -U "CMVAL\damien", my service could not either connect.
But according to what you said, it seems that the issue is elsewhere.

Do you have an idea on how I can investigate on it?

Thanks
Damien

|||

Has the account CMVAL\damien expired?

This happens when you create an account specifically for a service and forget to set the 'does not expire' attribute.

If so, change the password, and logoff/logon

Also I had a case where a user could not be authenticated to SQL because he used a German keyboard which typed 'y' in some applications and 'z' in other applications... :)

|||

Try running a command prompt under the damien credentials, then connect using -E option. Also, have a look at the SQL Server ERRORLOG file and let us know what is the state of the error printed there (it will be different from the one printed by the client tool).

Thanks
Laurentiu

Friday, February 24, 2012

Domain group members cannot connect [SQL Server 2k5 Workgroup Ed.]

We have a brand new out-of-the-box SQL Server 2005 Workgroup Edition install
.
We are using Windows Authentication, and have created SQL logins for about
40 different groups on our domain. We've given those logins the appropriate
permissions on the databases they're supposed to be able to access.
The problem is that when users try to connect to the SQL server, they cannot
connect. An error 18456 is thrown, and logged in the Application event log
stating "Login failed for user OURDOMAIN\theuser" (example values). The
user is properly a member of group added as a login to SQL Server, and we've
confirmed that there are not conflicting permissions that would deny those
users access via another route.
This is only a problem for domain-based groups. If we create a local group
on the SQL server machine, through Computer Management -> Local Users and
Groups, then make the same users a member of THAT group, and finally then
follow the same process to add that local group to SQL Server Logins and set
the database privileges, it works!!
Our group memberships change frequently, and are used for a lot more than
just SQL server permissions. So, using local groups and maintaining
membership in both places is not really feasible. Any ideas why a local
machine group containing domain user accounts would work fine, but a domain
group containing the same accounts would not?
Thanks in advance.
~JimIs the server that SQL is on joined to the domain?
Jim Kilmer wrote:
> We have a brand new out-of-the-box SQL Server 2005 Workgroup Edition insta
ll.
> We are using Windows Authentication, and have created SQL logins for about
> 40 different groups on our domain. We've given those logins the appropria
te
> permissions on the databases they're supposed to be able to access.
> The problem is that when users try to connect to the SQL server, they cann
ot
> connect. An error 18456 is thrown, and logged in the Application event lo
g
> stating "Login failed for user OURDOMAIN\theuser" (example values). The
> user is properly a member of group added as a login to SQL Server, and we'
ve
> confirmed that there are not conflicting permissions that would deny those
> users access via another route.
> This is only a problem for domain-based groups. If we create a local grou
p
> on the SQL server machine, through Computer Management -> Local Users and
> Groups, then make the same users a member of THAT group, and finally the
n
> follow the same process to add that local group to SQL Server Logins and s
et
> the database privileges, it works!!
> Our group memberships change frequently, and are used for a lot more than
> just SQL server permissions. So, using local groups and maintaining
> membership in both places is not really feasible. Any ideas why a local
> machine group containing domain user accounts would work fine, but a domai
n
> group containing the same accounts would not?
> Thanks in advance.
> ~Jim

Domain Authentication

Hello all,

I'm looking to force a user to input their uid & pwd, to let them connect to a database.

My connection string is currently:

data source=SERVERNAME;initial catalog=DATABASENAME;uid=USER;pwd=Pas$wORd

If I do
data source=SERVERNAME;initial catalog=DATABASENAME;uid=;pwd=

then it says it can't find the <null> user. How do I make it so they HAVE to enter their domain account? I know it probably has something to do with web.config's
<authentication mode="Windows" />
and impersonation. But I do NOT want to use the ASPNET account. I need to implement Active Directory roles with this. Any info regarding this? Thanks a ton for anything!

-Matthew TaylorWhat kind of authentication are you using on your site?|||You need to use integrated security if you do not want to pass in a username and password.

"Data Source=Aron1;Initial Catalog=pubs;Integrated Security=SSPI;"
- or -
"Server=Aron1;Database=pubs;Trusted_Connection=True;"
(both connection strings produces the same result)

From www.connectionstrings.com

Sunday, February 19, 2012

Domain and windows authentication

Hi,
We have a application that uses windows authentication to connect to sql
server. We have a domain and simply just create a login in sql server for
each user in the domain.
We have setup this application in the company that doesn't have domain.
We're not going to change the source of the application to accept sql server
authentication.
Can we still use the windows authentication to allow the users to log in?
Suppose that each user logs in his computer as administrator of that
computer. Can we prefix these administrators with the name of their
computers to create login in sql server and still use windows
authentication?
Any help would be greatly appreciated.
Amin
Microsoft SQL Server support only Domain Authentification, no Machine
Account Authentification (except the local machine of the sql server),
because Workgroups are not trustable.
Hope this helps,
Jens Smeyer
"Amin Sobati" <amins@.morva.net> schrieb im Newsbeitrag
news:%23ahXq45gEHA.1764@.TK2MSFTNGP10.phx.gbl...
> Hi,
> We have a application that uses windows authentication to connect to sql
> server. We have a domain and simply just create a login in sql server for
> each user in the domain.
> We have setup this application in the company that doesn't have domain.
> We're not going to change the source of the application to accept sql
server
> authentication.
> Can we still use the windows authentication to allow the users to log in?
> Suppose that each user logs in his computer as administrator of that
> computer. Can we prefix these administrators with the name of their
> computers to create login in sql server and still use windows
> authentication?
> Any help would be greatly appreciated.
> Amin
>
|||Jens,
Therefore in workgroups there's no other solution except using sql server
authentication?
"Jens Smeyer" <MrIgel[RejectSpam|RemoveBracket]@.gmx.de> wrote in message
news:OCvmQg7gEHA.2764@.TK2MSFTNGP11.phx.gbl...[vbcol=seagreen]
> Microsoft SQL Server support only Domain Authentification, no Machine
> Account Authentification (except the local machine of the sql server),
> because Workgroups are not trustable.
> Hope this helps,
> Jens Smeyer
>
> "Amin Sobati" <amins@.morva.net> schrieb im Newsbeitrag
> news:%23ahXq45gEHA.1764@.TK2MSFTNGP10.phx.gbl...
for[vbcol=seagreen]
> server
in?
>
|||You should be able to use NT authentication by doing the following:
1. Create a local account on the SQL Server machine that matches each
individual users local machine account. Make sure the password is the same
for both accounts.
2. Create a login within SQL Server for each of these logins.
3. NT authentication should now work.
This could be difficult to administer becaues each time a user changes his
local opassword the pasword has to be changed at the SQL Server machine as
well.
Rand
This posting is provided "as is" with no warranties and confers no rights.
|||Rand,
What if users log into their computer with administrator account?
Necessarily they must use different user names?
Amin
"Rand Boyd [MSFT]" <rboyd@.onlinemicrosoft.com> wrote in message
news:Qxq9sH9gEHA.3340@.cpmsftngxa06.phx.gbl...
> You should be able to use NT authentication by doing the following:
> 1. Create a local account on the SQL Server machine that matches each
> individual users local machine account. Make sure the password is the same
> for both accounts.
> 2. Create a login within SQL Server for each of these logins.
> 3. NT authentication should now work.
> This could be difficult to administer becaues each time a user changes his
> local opassword the pasword has to be changed at the SQL Server machine as
> well.
> Rand
>
> This posting is provided "as is" with no warranties and confers no rights.
>

Domain and windows authentication

Hi,
We have a application that uses windows authentication to connect to sql
server. We have a domain and simply just create a login in sql server for
each user in the domain.
We have setup this application in the company that doesn't have domain.
We're not going to change the source of the application to accept sql server
authentication.
Can we still use the windows authentication to allow the users to log in?
Suppose that each user logs in his computer as administrator of that
computer. Can we prefix these administrators with the name of their
computers to create login in sql server and still use windows
authentication?
Any help would be greatly appreciated.
AminMicrosoft SQL Server support only Domain Authentification, no Machine
Account Authentification (except the local machine of the sql server),
because Workgroups are not trustable.
Hope this helps,
Jens Süßmeyer
"Amin Sobati" <amins@.morva.net> schrieb im Newsbeitrag
news:%23ahXq45gEHA.1764@.TK2MSFTNGP10.phx.gbl...
> Hi,
> We have a application that uses windows authentication to connect to sql
> server. We have a domain and simply just create a login in sql server for
> each user in the domain.
> We have setup this application in the company that doesn't have domain.
> We're not going to change the source of the application to accept sql
server
> authentication.
> Can we still use the windows authentication to allow the users to log in?
> Suppose that each user logs in his computer as administrator of that
> computer. Can we prefix these administrators with the name of their
> computers to create login in sql server and still use windows
> authentication?
> Any help would be greatly appreciated.
> Amin
>|||Jens,
Therefore in workgroups there's no other solution except using sql server
authentication?
"Jens Süßmeyer" <MrIgel[RejectSpam|RemoveBracket]@.gmx.de> wrote in message
news:OCvmQg7gEHA.2764@.TK2MSFTNGP11.phx.gbl...
> Microsoft SQL Server support only Domain Authentification, no Machine
> Account Authentification (except the local machine of the sql server),
> because Workgroups are not trustable.
> Hope this helps,
> Jens Süßmeyer
>
> "Amin Sobati" <amins@.morva.net> schrieb im Newsbeitrag
> news:%23ahXq45gEHA.1764@.TK2MSFTNGP10.phx.gbl...
> > Hi,
> > We have a application that uses windows authentication to connect to sql
> > server. We have a domain and simply just create a login in sql server
for
> > each user in the domain.
> > We have setup this application in the company that doesn't have domain.
> > We're not going to change the source of the application to accept sql
> server
> > authentication.
> > Can we still use the windows authentication to allow the users to log
in?
> > Suppose that each user logs in his computer as administrator of that
> > computer. Can we prefix these administrators with the name of their
> > computers to create login in sql server and still use windows
> > authentication?
> > Any help would be greatly appreciated.
> > Amin
> >
> >
>|||You should be able to use NT authentication by doing the following:
1. Create a local account on the SQL Server machine that matches each
individual users local machine account. Make sure the password is the same
for both accounts.
2. Create a login within SQL Server for each of these logins.
3. NT authentication should now work.
This could be difficult to administer becaues each time a user changes his
local opassword the pasword has to be changed at the SQL Server machine as
well.
Rand
This posting is provided "as is" with no warranties and confers no rights.|||Rand,
What if users log into their computer with administrator account?
Necessarily they must use different user names?
Amin
"Rand Boyd [MSFT]" <rboyd@.onlinemicrosoft.com> wrote in message
news:Qxq9sH9gEHA.3340@.cpmsftngxa06.phx.gbl...
> You should be able to use NT authentication by doing the following:
> 1. Create a local account on the SQL Server machine that matches each
> individual users local machine account. Make sure the password is the same
> for both accounts.
> 2. Create a login within SQL Server for each of these logins.
> 3. NT authentication should now work.
> This could be difficult to administer becaues each time a user changes his
> local opassword the pasword has to be changed at the SQL Server machine as
> well.
> Rand
>
> This posting is provided "as is" with no warranties and confers no rights.
>

Domain and windows authentication

Hi,
We have a application that uses windows authentication to connect to sql
server. We have a domain and simply just create a login in sql server for
each user in the domain.
We have setup this application in the company that doesn't have domain.
We're not going to change the source of the application to accept sql server
authentication.
Can we still use the windows authentication to allow the users to log in?
Suppose that each user logs in his computer as administrator of that
computer. Can we prefix these administrators with the name of their
computers to create login in sql server and still use windows
authentication?
Any help would be greatly appreciated.
AminMicrosoft SQL Server support only Domain Authentification, no Machine
Account Authentification (except the local machine of the sql server),
because Workgroups are not trustable.
Hope this helps,
Jens Smeyer
"Amin Sobati" <amins@.morva.net> schrieb im Newsbeitrag
news:%23ahXq45gEHA.1764@.TK2MSFTNGP10.phx.gbl...
> Hi,
> We have a application that uses windows authentication to connect to sql
> server. We have a domain and simply just create a login in sql server for
> each user in the domain.
> We have setup this application in the company that doesn't have domain.
> We're not going to change the source of the application to accept sql
server
> authentication.
> Can we still use the windows authentication to allow the users to log in?
> Suppose that each user logs in his computer as administrator of that
> computer. Can we prefix these administrators with the name of their
> computers to create login in sql server and still use windows
> authentication?
> Any help would be greatly appreciated.
> Amin
>|||Jens,
Therefore in workgroups there's no other solution except using sql server
authentication?
"Jens Smeyer" <MrIgel[RejectSpam|RemoveBracket]@.gmx.de> wrote in messa
ge
news:OCvmQg7gEHA.2764@.TK2MSFTNGP11.phx.gbl...
> Microsoft SQL Server support only Domain Authentification, no Machine
> Account Authentification (except the local machine of the sql server),
> because Workgroups are not trustable.
> Hope this helps,
> Jens Smeyer
>
> "Amin Sobati" <amins@.morva.net> schrieb im Newsbeitrag
> news:%23ahXq45gEHA.1764@.TK2MSFTNGP10.phx.gbl...
for[vbcol=seagreen]
> server
in?[vbcol=seagreen]
>|||You should be able to use NT authentication by doing the following:
1. Create a local account on the SQL Server machine that matches each
individual users local machine account. Make sure the password is the same
for both accounts.
2. Create a login within SQL Server for each of these logins.
3. NT authentication should now work.
This could be difficult to administer becaues each time a user changes his
local opassword the pasword has to be changed at the SQL Server machine as
well.
Rand
This posting is provided "as is" with no warranties and confers no rights.|||Rand,
What if users log into their computer with administrator account?
Necessarily they must use different user names?
Amin
"Rand Boyd [MSFT]" <rboyd@.onlinemicrosoft.com> wrote in message
news:Qxq9sH9gEHA.3340@.cpmsftngxa06.phx.gbl...
> You should be able to use NT authentication by doing the following:
> 1. Create a local account on the SQL Server machine that matches each
> individual users local machine account. Make sure the password is the same
> for both accounts.
> 2. Create a login within SQL Server for each of these logins.
> 3. NT authentication should now work.
> This could be difficult to administer becaues each time a user changes his
> local opassword the pasword has to be changed at the SQL Server machine as
> well.
> Rand
>
> This posting is provided "as is" with no warranties and confers no rights.
>

domain administrator password and sql services startup

A reality check please...
After changing the domain administrator password, we are no longer
able to connect to databases on a MS SQL Server 2000 server when
attempting to use ODBC drivers from W2K workstations.
The MSSQLSERVER and SQLSERVERAGENT services both show DomainName
\Administrator under the "Logon under This Account" in the 'Logon' tab
in services.msc. The server name inside the SQL server are set to
mixed mode.
Am I correct in thinking that changing the password field shown in the
"Login under This account:DomainName\Administrator to match the new
domain administrator password will bring Joy?
Thanks!
Benoit
(Cross-posted to microsoft.public.sqlserver.server,
microsoft.public.sqlserver.setup, microsoft.public.sqlserver.odbc)
Hello,
Yes, if the Windows account used by the SQL Server services has a new
password you should update it here or by using Enterprise Manager.
Also, it would be better if you use a dedicated Windows account for SQL
Server instead of the domain administrator account.
Hope this helps,
Ben Nevarez
Senior Database Administrator
AIG SunAmerica
"bntgoogle@.yahoo.com" wrote:

> A reality check please...
> After changing the domain administrator password, we are no longer
> able to connect to databases on a MS SQL Server 2000 server when
> attempting to use ODBC drivers from W2K workstations.
> The MSSQLSERVER and SQLSERVERAGENT services both show DomainName
> \Administrator under the "Logon under This Account" in the 'Logon' tab
> in services.msc. The server name inside the SQL server are set to
> mixed mode.
> Am I correct in thinking that changing the password field shown in the
> "Login under This account:DomainName\Administrator to match the new
> domain administrator password will bring Joy?
> Thanks!
> Benoit
> (Cross-posted to microsoft.public.sqlserver.server,
> microsoft.public.sqlserver.setup, microsoft.public.sqlserver.odbc)
>

domain administrator password and sql services startup

A reality check please...
After changing the domain administrator password, we are no longer
able to connect to databases on a MS SQL Server 2000 server when
attempting to use ODBC drivers from W2K workstations.
The MSSQLSERVER and SQLSERVERAGENT services both show DomainName
\Administrator under the "Logon under This Account" in the 'Logon' tab
in services.msc. The server name inside the SQL server are set to
mixed mode.
Am I correct in thinking that changing the password field shown in the
"Login under This account:DomainName\Administrator to match the new
domain administrator password will bring Joy?
Thanks!
Benoit
(Cross-posted to microsoft.public.sqlserver.server,
microsoft.public.sqlserver.setup, microsoft.public.sqlserver.odbc)
Are you saying that your SQL Server service is running under domain admin
user account? That is bad, that means SQL Server service can do anything
with the domain, which is really needed.
If the SQL Server service has to access something in the domain (say, you
added some extended procedures that require access files on other
computers), you can use a domain account that is only given proper
permission for just that purpose, using a domain admin account is an
overkill and dangerous.
With that said, the change you described should not affect how SQL Server is
accessed, as long as it still runs.
<bntgoogle@.yahoo.com> wrote in message
news:1194626641.221081.264340@.e34g2000pro.googlegr oups.com...
>A reality check please...
> After changing the domain administrator password, we are no longer
> able to connect to databases on a MS SQL Server 2000 server when
> attempting to use ODBC drivers from W2K workstations.
> The MSSQLSERVER and SQLSERVERAGENT services both show DomainName
> \Administrator under the "Logon under This Account" in the 'Logon' tab
> in services.msc. The server name inside the SQL server are set to
> mixed mode.
> Am I correct in thinking that changing the password field shown in the
> "Login under This account:DomainName\Administrator to match the new
> domain administrator password will bring Joy?
> Thanks!
> Benoit
> (Cross-posted to microsoft.public.sqlserver.server,
> microsoft.public.sqlserver.setup, microsoft.public.sqlserver.odbc)
>
|||Have both servers been rebooted since the domain name and password change?
Regards,
Jamie
"bntgoogle@.yahoo.com" wrote:

> A reality check please...
> After changing the domain administrator password, we are no longer
> able to connect to databases on a MS SQL Server 2000 server when
> attempting to use ODBC drivers from W2K workstations.
> The MSSQLSERVER and SQLSERVERAGENT services both show DomainName
> \Administrator under the "Logon under This Account" in the 'Logon' tab
> in services.msc. The server name inside the SQL server are set to
> mixed mode.
> Am I correct in thinking that changing the password field shown in the
> "Login under This account:DomainName\Administrator to match the new
> domain administrator password will bring Joy?
> Thanks!
> Benoit
> (Cross-posted to microsoft.public.sqlserver.server,
> microsoft.public.sqlserver.setup, microsoft.public.sqlserver.odbc)
>
|||Jamie
No, the SQL servers were not rebooted, a realization I had only after
we backed off and returned to the previous pwd. That seems to the
other likely reason why it breaks after this.
Put another way, my question is whether the username\password for the
account responsible for the server startup needs to be changed
*separately* after having changed the AD user password...
And oh yeah, I certainly know that is a bad user to use. That is why I
need to change it...
B
On Nov 9, 12:02 pm, thejamie <theja...@.discussions.microsoft.com>
wrote:[vbcol=seagreen]
> Have both servers been rebooted since the domain name and password change?
> --
> Regards,
> Jamie
> "bntgoo...@.yahoo.com" wrote:
>
>
>

domain administrator password and sql services startup

A reality check please...
After changing the domain administrator password, we are no longer
able to connect to databases on a MS SQL Server 2000 server when
attempting to use ODBC drivers from W2K workstations.
The MSSQLSERVER and SQLSERVERAGENT services both show DomainName
\Administrator under the "Logon under This Account" in the 'Logon' tab
in services.msc. The server name inside the SQL server are set to
mixed mode.
Am I correct in thinking that changing the password field shown in the
"Login under This account:DomainName\Administrator to match the new
domain administrator password will bring Joy?
Thanks!
Benoit
(Cross-posted to microsoft.public.sqlserver.server,
microsoft.public.sqlserver.setup, microsoft.public.sqlserver.odbc)Are you saying that your SQL Server service is running under domain admin
user account? That is bad, that means SQL Server service can do anything
with the domain, which is really needed.
If the SQL Server service has to access something in the domain (say, you
added some extended procedures that require access files on other
computers), you can use a domain account that is only given proper
permission for just that purpose, using a domain admin account is an
overkill and dangerous.
With that said, the change you described should not affect how SQL Server is
accessed, as long as it still runs.
<bntgoogle@.yahoo.com> wrote in message
news:1194626641.221081.264340@.e34g2000pro.googlegroups.com...
>A reality check please...
> After changing the domain administrator password, we are no longer
> able to connect to databases on a MS SQL Server 2000 server when
> attempting to use ODBC drivers from W2K workstations.
> The MSSQLSERVER and SQLSERVERAGENT services both show DomainName
> \Administrator under the "Logon under This Account" in the 'Logon' tab
> in services.msc. The server name inside the SQL server are set to
> mixed mode.
> Am I correct in thinking that changing the password field shown in the
> "Login under This account:DomainName\Administrator to match the new
> domain administrator password will bring Joy?
> Thanks!
> Benoit
> (Cross-posted to microsoft.public.sqlserver.server,
> microsoft.public.sqlserver.setup, microsoft.public.sqlserver.odbc)
>|||Have both servers been rebooted since the domain name and password change?
--
Regards,
Jamie
"bntgoogle@.yahoo.com" wrote:

> A reality check please...
> After changing the domain administrator password, we are no longer
> able to connect to databases on a MS SQL Server 2000 server when
> attempting to use ODBC drivers from W2K workstations.
> The MSSQLSERVER and SQLSERVERAGENT services both show DomainName
> \Administrator under the "Logon under This Account" in the 'Logon' tab
> in services.msc. The server name inside the SQL server are set to
> mixed mode.
> Am I correct in thinking that changing the password field shown in the
> "Login under This account:DomainName\Administrator to match the new
> domain administrator password will bring Joy?
> Thanks!
> Benoit
> (Cross-posted to microsoft.public.sqlserver.server,
> microsoft.public.sqlserver.setup, microsoft.public.sqlserver.odbc)
>|||Jamie
No, the SQL servers were not rebooted, a realization I had only after
we backed off and returned to the previous pwd. That seems to the
other likely reason why it breaks after this.
Put another way, my question is whether the username\password for the
account responsible for the server startup needs to be changed
*separately* after having changed the AD user password...
And oh yeah, I certainly know that is a bad user to use. That is why I
need to change it...
B
On Nov 9, 12:02 pm, thejamie <theja...@.discussions.microsoft.com>
wrote:[vbcol=seagreen]
> Have both servers been rebooted since the domain name and password change?
> --
> Regards,
> Jamie
> "bntgoo...@.yahoo.com" wrote:
>
>
>
>
>
>

domain administrator password and sql services startup

A reality check please...
After changing the domain administrator password, we are no longer
able to connect to databases on a MS SQL Server 2000 server when
attempting to use ODBC drivers from W2K workstations.
The MSSQLSERVER and SQLSERVERAGENT services both show DomainName
\Administrator under the "Logon under This Account" in the 'Logon' tab
in services.msc. The server name inside the SQL server are set to
mixed mode.
Am I correct in thinking that changing the password field shown in the
"Login under This account:DomainName\Administrator to match the new
domain administrator password will bring Joy?
Thanks!
Benoit
(Cross-posted to microsoft.public.sqlserver.server,
microsoft.public.sqlserver.setup, microsoft.public.sqlserver.odbc)Hello,
Yes, if the Windows account used by the SQL Server services has a new
password you should update it here or by using Enterprise Manager.
Also, it would be better if you use a dedicated Windows account for SQL
Server instead of the domain administrator account.
Hope this helps,
Ben Nevarez
Senior Database Administrator
AIG SunAmerica
"bntgoogle@.yahoo.com" wrote:

> A reality check please...
> After changing the domain administrator password, we are no longer
> able to connect to databases on a MS SQL Server 2000 server when
> attempting to use ODBC drivers from W2K workstations.
> The MSSQLSERVER and SQLSERVERAGENT services both show DomainName
> \Administrator under the "Logon under This Account" in the 'Logon' tab
> in services.msc. The server name inside the SQL server are set to
> mixed mode.
> Am I correct in thinking that changing the password field shown in the
> "Login under This account:DomainName\Administrator to match the new
> domain administrator password will bring Joy?
> Thanks!
> Benoit
> (Cross-posted to microsoft.public.sqlserver.server,
> microsoft.public.sqlserver.setup, microsoft.public.sqlserver.odbc)
>

domain administrator password and sql services startup

A reality check please...
After changing the domain administrator password, we are no longer
able to connect to databases on a MS SQL Server 2000 server when
attempting to use ODBC drivers from W2K workstations.
The MSSQLSERVER and SQLSERVERAGENT services both show DomainName
\Administrator under the "Logon under This Account" in the 'Logon' tab
in services.msc. The server name inside the SQL server are set to
mixed mode.
Am I correct in thinking that changing the password field shown in the
"Login under This account:DomainName\Administrator to match the new
domain administrator password will bring Joy?
Thanks!
Benoit
(Cross-posted to microsoft.public.sqlserver.server,
microsoft.public.sqlserver.setup, microsoft.public.sqlserver.odbc)
Hello,
Yes, if the Windows account used by the SQL Server services has a new
password you should update it here or by using Enterprise Manager.
Also, it would be better if you use a dedicated Windows account for SQL
Server instead of the domain administrator account.
Hope this helps,
Ben Nevarez
Senior Database Administrator
AIG SunAmerica
"bntgoogle@.yahoo.com" wrote:

> A reality check please...
> After changing the domain administrator password, we are no longer
> able to connect to databases on a MS SQL Server 2000 server when
> attempting to use ODBC drivers from W2K workstations.
> The MSSQLSERVER and SQLSERVERAGENT services both show DomainName
> \Administrator under the "Logon under This Account" in the 'Logon' tab
> in services.msc. The server name inside the SQL server are set to
> mixed mode.
> Am I correct in thinking that changing the password field shown in the
> "Login under This account:DomainName\Administrator to match the new
> domain administrator password will bring Joy?
> Thanks!
> Benoit
> (Cross-posted to microsoft.public.sqlserver.server,
> microsoft.public.sqlserver.setup, microsoft.public.sqlserver.odbc)
>

domain administrator password and sql services startup

A reality check please...
After changing the domain administrator password, we are no longer
able to connect to databases on a MS SQL Server 2000 server when
attempting to use ODBC drivers from W2K workstations.
The MSSQLSERVER and SQLSERVERAGENT services both show DomainName
\Administrator under the "Logon under This Account" in the 'Logon' tab
in services.msc. The server name inside the SQL server are set to
mixed mode.
Am I correct in thinking that changing the password field shown in the
"Login under This account:DomainName\Administrator to match the new
domain administrator password will bring Joy?
Thanks!
Benoit
(Cross-posted to microsoft.public.sqlserver.server,
microsoft.public.sqlserver.setup, microsoft.public.sqlserver.odbc)
Are you saying that your SQL Server service is running under domain admin
user account? That is bad, that means SQL Server service can do anything
with the domain, which is really needed.
If the SQL Server service has to access something in the domain (say, you
added some extended procedures that require access files on other
computers), you can use a domain account that is only given proper
permission for just that purpose, using a domain admin account is an
overkill and dangerous.
With that said, the change you described should not affect how SQL Server is
accessed, as long as it still runs.
<bntgoogle@.yahoo.com> wrote in message
news:1194626641.221081.264340@.e34g2000pro.googlegr oups.com...
>A reality check please...
> After changing the domain administrator password, we are no longer
> able to connect to databases on a MS SQL Server 2000 server when
> attempting to use ODBC drivers from W2K workstations.
> The MSSQLSERVER and SQLSERVERAGENT services both show DomainName
> \Administrator under the "Logon under This Account" in the 'Logon' tab
> in services.msc. The server name inside the SQL server are set to
> mixed mode.
> Am I correct in thinking that changing the password field shown in the
> "Login under This account:DomainName\Administrator to match the new
> domain administrator password will bring Joy?
> Thanks!
> Benoit
> (Cross-posted to microsoft.public.sqlserver.server,
> microsoft.public.sqlserver.setup, microsoft.public.sqlserver.odbc)
>
|||Have both servers been rebooted since the domain name and password change?
Regards,
Jamie
"bntgoogle@.yahoo.com" wrote:

> A reality check please...
> After changing the domain administrator password, we are no longer
> able to connect to databases on a MS SQL Server 2000 server when
> attempting to use ODBC drivers from W2K workstations.
> The MSSQLSERVER and SQLSERVERAGENT services both show DomainName
> \Administrator under the "Logon under This Account" in the 'Logon' tab
> in services.msc. The server name inside the SQL server are set to
> mixed mode.
> Am I correct in thinking that changing the password field shown in the
> "Login under This account:DomainName\Administrator to match the new
> domain administrator password will bring Joy?
> Thanks!
> Benoit
> (Cross-posted to microsoft.public.sqlserver.server,
> microsoft.public.sqlserver.setup, microsoft.public.sqlserver.odbc)
>
|||Jamie
No, the SQL servers were not rebooted, a realization I had only after
we backed off and returned to the previous pwd. That seems to the
other likely reason why it breaks after this.
Put another way, my question is whether the username\password for the
account responsible for the server startup needs to be changed
*separately* after having changed the AD user password...
And oh yeah, I certainly know that is a bad user to use. That is why I
need to change it...
B
On Nov 9, 12:02 pm, thejamie <theja...@.discussions.microsoft.com>
wrote:[vbcol=seagreen]
> Have both servers been rebooted since the domain name and password change?
> --
> Regards,
> Jamie
> "bntgoo...@.yahoo.com" wrote:
>
>
>

domain administrator password and sql services startup

A reality check please...
After changing the domain administrator password, we are no longer
able to connect to databases on a MS SQL Server 2000 server when
attempting to use ODBC drivers from W2K workstations.
The MSSQLSERVER and SQLSERVERAGENT services both show DomainName
\Administrator under the "Logon under This Account" in the 'Logon' tab
in services.msc. The server name inside the SQL server are set to
mixed mode.
Am I correct in thinking that changing the password field shown in the
"Login under This account:DomainName\Administrator to match the new
domain administrator password will bring Joy?
Thanks!
Benoit
(Cross-posted to microsoft.public.sqlserver.server,
microsoft.public.sqlserver.setup, microsoft.public.sqlserver.odbc)Hello,
Yes, if the Windows account used by the SQL Server services has a new
password you should update it here or by using Enterprise Manager.
Also, it would be better if you use a dedicated Windows account for SQL
Server instead of the domain administrator account.
Hope this helps,
Ben Nevarez
Senior Database Administrator
AIG SunAmerica
"bntgoogle@.yahoo.com" wrote:
> A reality check please...
> After changing the domain administrator password, we are no longer
> able to connect to databases on a MS SQL Server 2000 server when
> attempting to use ODBC drivers from W2K workstations.
> The MSSQLSERVER and SQLSERVERAGENT services both show DomainName
> \Administrator under the "Logon under This Account" in the 'Logon' tab
> in services.msc. The server name inside the SQL server are set to
> mixed mode.
> Am I correct in thinking that changing the password field shown in the
> "Login under This account:DomainName\Administrator to match the new
> domain administrator password will bring Joy?
> Thanks!
> Benoit
> (Cross-posted to microsoft.public.sqlserver.server,
> microsoft.public.sqlserver.setup, microsoft.public.sqlserver.odbc)
>

domain administrator password and sql services startup

A reality check please...
After changing the domain administrator password, we are no longer
able to connect to databases on a MS SQL Server 2000 server when
attempting to use ODBC drivers from W2K workstations.
The MSSQLSERVER and SQLSERVERAGENT services both show DomainName
\Administrator under the "Logon under This Account" in the 'Logon' tab
in services.msc. The server name inside the SQL server are set to
mixed mode.
Am I correct in thinking that changing the password field shown in the
"Login under This account:DomainName\Administrator to match the new
domain administrator password will bring Joy?
Thanks!
Benoit
(Cross-posted to microsoft.public.sqlserver.server,
microsoft.public.sqlserver.setup, microsoft.public.sqlserver.odbc)Are you saying that your SQL Server service is running under domain admin
user account? That is bad, that means SQL Server service can do anything
with the domain, which is really needed.
If the SQL Server service has to access something in the domain (say, you
added some extended procedures that require access files on other
computers), you can use a domain account that is only given proper
permission for just that purpose, using a domain admin account is an
overkill and dangerous.
With that said, the change you described should not affect how SQL Server is
accessed, as long as it still runs.
<bntgoogle@.yahoo.com> wrote in message
news:1194626641.221081.264340@.e34g2000pro.googlegroups.com...
>A reality check please...
> After changing the domain administrator password, we are no longer
> able to connect to databases on a MS SQL Server 2000 server when
> attempting to use ODBC drivers from W2K workstations.
> The MSSQLSERVER and SQLSERVERAGENT services both show DomainName
> \Administrator under the "Logon under This Account" in the 'Logon' tab
> in services.msc. The server name inside the SQL server are set to
> mixed mode.
> Am I correct in thinking that changing the password field shown in the
> "Login under This account:DomainName\Administrator to match the new
> domain administrator password will bring Joy?
> Thanks!
> Benoit
> (Cross-posted to microsoft.public.sqlserver.server,
> microsoft.public.sqlserver.setup, microsoft.public.sqlserver.odbc)
>|||Have both servers been rebooted since the domain name and password change?
--
Regards,
Jamie
"bntgoogle@.yahoo.com" wrote:
> A reality check please...
> After changing the domain administrator password, we are no longer
> able to connect to databases on a MS SQL Server 2000 server when
> attempting to use ODBC drivers from W2K workstations.
> The MSSQLSERVER and SQLSERVERAGENT services both show DomainName
> \Administrator under the "Logon under This Account" in the 'Logon' tab
> in services.msc. The server name inside the SQL server are set to
> mixed mode.
> Am I correct in thinking that changing the password field shown in the
> "Login under This account:DomainName\Administrator to match the new
> domain administrator password will bring Joy?
> Thanks!
> Benoit
> (Cross-posted to microsoft.public.sqlserver.server,
> microsoft.public.sqlserver.setup, microsoft.public.sqlserver.odbc)
>|||Jamie
No, the SQL servers were not rebooted, a realization I had only after
we backed off and returned to the previous pwd. That seems to the
other likely reason why it breaks after this.
Put another way, my question is whether the username\password for the
account responsible for the server startup needs to be changed
*separately* after having changed the AD user password...
And oh yeah, I certainly know that is a bad user to use. That is why I
need to change it... :)
B
On Nov 9, 12:02 pm, thejamie <theja...@.discussions.microsoft.com>
wrote:
> Have both servers been rebooted since the domain name and password change?
> --
> Regards,
> Jamie
> "bntgoo...@.yahoo.com" wrote:
> > A reality check please...
> > After changing the domain administrator password, we are no longer
> > able to connect to databases on a MS SQL Server 2000 server when
> > attempting to use ODBC drivers from W2K workstations.
> > The MSSQLSERVER and SQLSERVERAGENT services both show DomainName
> > \Administrator under the "Logon under This Account" in the 'Logon' tab
> > in services.msc. The server name inside the SQL server are set to
> > mixed mode.
> > Am I correct in thinking that changing the password field shown in the
> > "Login under This account:DomainName\Administrator to match the new
> > domain administrator password will bring Joy?
> > Thanks!
> > Benoit
> > (Cross-posted to microsoft.public.sqlserver.server,
> > microsoft.public.sqlserver.setup, microsoft.public.sqlserver.odbc)

Friday, February 17, 2012

Doesnt see DB Table

I'm having a tough time understanding my current problem and why I'm having it.
I'm using an ODBC db connection to connect to my sql server and tryingto insert data into a table I've created, but I keep getting an errorsaying that the table doesn't exist. This is the first time I'veever used ODBC and DSN to connect to a db so I don't konw if there areqerks associated with this, but I've tried everything I can thinkof. I've changed the name of the table, placed it in brackets,placed "dbo" infront of the name, and still I get the same error aboutthe table not existing. My "Intial Catalog" in my connectionstring is the correct db, I just can't seem to get it going.
Any suggestions?
This is usually due to a table ownership discrepancy. If youqualify your table name with the owner do you have better success? E.g.instead of myTable use huffmaster.myTable (substitute the owner name forhuffmaster).
|||No, the owner is "dbo" and that doesn't seem to help.
|||OK, can you post the DSN (obfuscate the password), the connection string, and the exact error message?
|||Here's my Error:
ERROR [42S02] [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name 'dbo.Application'.
And here's my Connection String:
<addkey="LiquorLiabilityConnection_Local" value="Server=macdaddy;InitialCatalog=LiqourLiability;User ID=***;Password=***;" />

|||

It doesn't look like your connection string is incorrect. What about your code? Can you share some?

|||Here's my code that creates the connection and tries to push the insert:
******Segment From Web Page Code Behind************
Dim sql As String
sql = "INSERT INTO [dbo].[Application] " & insert & "VALUES " & values
'insert & values are string variables I create based on what was filled out.
Try
ll.InsertApplication(sql)
Catch
pnlIntro.Visible = False
pnlError.Visible = True
divError.Controls.Add(New LiteralControl(Err.Description.ToString &"<br><br>"))
End Try

******Segment From Class File***************
Public Sub InsertApplication(ByVal sql As String)
Dim connection As New OdbcConnection()
connection = New OdbcConnection()
connection.ConnectionString= ConfigurationSettings.AppSettings.Get("LiquorLiabilityConnection")
Dim command As New OdbcCommand(sql, connection)
connection.Open()
command.ExecuteNonQuery()
connection.Close()
End Sub

I think if the connection was bad itwould throw an error on Opening the connection, but it waits until thequery executes. And it's not until it looks for my 'Application'table. I'm just confused.

|||
It seems you may have misspelt the name of the database specified inthe Initial Catalog, but I agree that your problem does not lookconnection-related. Also, I would stick with the attributesoutlined for SQL Server - ODBC athttp://www.connectionstrings.com.
Can you supply us the value contained in command.CommandText immediately before your ExecuteNonQuery?
|||My CommandText looks like this:
INSERT INTO [dbo].[Application] ('4_state', '5_state', '9_state','10_state', '11_state', '14_years', '14_months', '14_man_years','14_man_months', '15_years', '15_months', '15_stories', '21_sqft','21_apl_sqft', '21_apt_sqft', '21_units', '21_lro_sqft','22_mon_thurs_o', '22_mon_thurs_c', '22_fri_o', '22_fri_c', '22_sat_o','22_sat_c', '22_sun_o', '22_sun_c', '23a_open', '23b_open', '23c_open','23d_open', '24', '25', '26', '27', '28', '29', '30', '31', '32', '33','34', '35', '36', '37', '38', '39', '40', '41', '42a', '42b', '42e','42f', '42g', '44', '45_food_p', '45_food_n', '45_alch_p', '45_alch_n','45_alch_tr_p', '45_alch_tr_n', '45_cc_p', '45_cc_n', '45_opc_p','45_opc_n', '45_other_p', '45_other_n', '48_gen', '48_fire', '48_prod','48_med', '48_eac', '48_pers') VALUES ('Alabama', 'Georgia', 'Alabama','Alabama', 'Alabama', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0','0', '0', 'Closed', 'Closed', 'Closed', 'Closed', 'Closed', 'Closed','Closed', 'Closed', 'Open', 'Open', 'Open', 'Open', 'No', 'No', 'No','No', 'No', 'No', 'No', 'No', 'No', 'No', 'No', 'No', 'No', 'No', 'No','No', 'No', 'Average age 21-25', 'No', 'Yes', 'No', 'No', 'No', 'Yes','0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '654','654', '654', '654', '654', '654')
Please ignore the funny values and field names, this is about as short as I could go with it without deleting any of it.
|||FWIW I made a simple page based on your code and it is working OK for me:
I had to enclose the field names beginning with a numeric character insquare brackets, and I used one of the connection string formats fromhttp://www.connectionstrings.com.
<%@. Page Language="VB"%>
<%@. Import Namespace="System.Data.ODBC"%>
<script runat="server">
    Sub Page_Load(Sender As Object, E As EventArgs)

Dim sql As String
        sql = "INSERT INTO [dbo].[Application] ([4_state], [5_state]) VALUES ('Alabama','Pennsylvania')"

Try
            InsertApplication(sql)
        Catch
            divError.Controls.Add(New LiteralControl(Err.Description.ToString & "<br><br>"))
        End Try
    End Sub

    Public Sub InsertApplication(ByVal sql As String)
        Dim connection As New OdbcConnection()
        connection = New OdbcConnection()
        connection.ConnectionString = "Driver={SQL Server};Server=(local);Database=test;Trusted_Connection=yes;"
        Dim command As New OdbcCommand(sql, connection)

connection.Open()
        command.ExecuteNonQuery()
        connection.Close()
    End Sub
</script>
<html>
<head>
</head>
<body>
    <form runat="server">
        <div id="divError" runat="server">
        Any errors will appear here
        </div>
    </form>
</body>
</html>


|||I put all my column names in "[]" & that seems to have got thingssolved for me now. I'm no longer getting an error concerning thetable, just data conversion errors (ex. varchar to money). Thanksfor all the help.
|||I still don't understand why you were receiving that "invalid objectname dbo.Application" error message. The error I received aboutthe column names was:
ERROR [42000] [Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near '_state
Had that been the message to begin with we would have had this figuredout long ago. In any case, I am glad you got this problem sortedand are moving on to the next. :-)
|||Now that I've moved to my next problem, let me ask a question. Isthere a way to INSERT Null values into a table. For instance ifI'm preparing parameters for a stored procedure:
Dim param as New OdbcParameter("@.name", OdbcType.Varchar)
How would I make the above parameter of value NULL? Do you justnot specify a value (ie, para.Value = ?)? Or it there some otherway of doing this?

|||Dinakar has a nice blog post on how to do this:
Entering NULL values into SQL Server 2000 using Parameterized Queries (including date columns)

|||Now that I've got the DBNull.Value in place, I run my stored proocedure and get a new error:
ERROR [42000] [Microsoft][ODBC SQL Server Driver][SQL Server]Procedure 'InsertApplication' expects parameter '@.1', which was not supplied.
This is the first parameter that has DBNull.Value assigned to it. soI'm not sure exactly what is going on. It doesn't have anythingto do with expecting nulls in the stored procedure does it?