Tuesday, March 27, 2012
can not generate SSPI Context
I have a VB6 app using Trusted Connection to a SQL Server 2000.
This application can also run when creating a VPN Connection and using a
TCP/IP Connectionstring
I upgrade my MDAC installation (2.8) and now when I tried to run my app over
VPN, I obtain: "cannot generate SSPI Context"
It runs without problem in LAN using Trusted but not anymore over VPN.
Can anyone help me ?!?
Have a look at
HOW TO: Troubleshoot the "Cannot Generate SSPI Context" Error Message
http://support.microsoft.com/default...b;en-us;811889
HTH
Jasper Smith (SQL Server MVP)
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"Chambonneau" <g.chambonneau@.castsoftware.com> wrote in message
news:%23xis2GBPEHA.3744@.TK2MSFTNGP11.phx.gbl...
> Hello everybody
> I have a VB6 app using Trusted Connection to a SQL Server 2000.
> This application can also run when creating a VPN Connection and using a
> TCP/IP Connectionstring
>
> I upgrade my MDAC installation (2.8) and now when I tried to run my app
over
> VPN, I obtain: "cannot generate SSPI Context"
> It runs without problem in LAN using Trusted but not anymore over VPN.
> Can anyone help me ?!?
>
|||Also don't forget to look at the hosts and lmhosts files in your system32
folder.
You need the correct hosts configuration in there. There are a variety of
problems that can cause the SSPI error and a change of hosts file config
sorted mine out on most client machines but I still have the problem on two
of them where it drops off after 45 mins for no apparent rhyme or reason.
The hosts file that works for me looks like this (bar the IBM manufactured
PC's)
127.0.0.1 localhost.uk-resources.net
127.0.0.1 mypc.uk-resources.net
192.168.16.2 ourserver.uk-resources.net
Don't forget to backup the original hosts and lmhost file before changing
anything.
There is some issue I recall seeing when researching the problem a few
months ago about the way the DNS resolves when using vpn and it may be
router related.
Regards,
Paul
"Chambonneau" <g.chambonneau@.castsoftware.com> wrote in message
news:%23xis2GBPEHA.3744@.TK2MSFTNGP11.phx.gbl...
> Hello everybody
> I have a VB6 app using Trusted Connection to a SQL Server 2000.
> This application can also run when creating a VPN Connection and using a
> TCP/IP Connectionstring
>
> I upgrade my MDAC installation (2.8) and now when I tried to run my app
over
> VPN, I obtain: "cannot generate SSPI Context"
> It runs without problem in LAN using Trusted but not anymore over VPN.
> Can anyone help me ?!?
>
can not generate SSPI Context
I have a VB6 app using Trusted Connection to a SQL Server 2000.
This application can also run when creating a VPN Connection and using a
TCP/IP Connectionstring
I upgrade my MDAC installation (2.8) and now when I tried to run my app over
VPN, I obtain: "cannot generate SSPI Context"
It runs without problem in LAN using Trusted but not anymore over VPN.
Can anyone help me ?!?Try switching the protocol using the Client Network Utility to Named Pipes.
See if the problem goes away.
Instead of using your vb app, you can test with the following command line
tool.
-To test Named Pipes
ISQL -Snp:ServerNameHere -E -Q"select @.@.version"
-To test TCP/IP
ISQL -Stcp:ServerNameHere -E -Q"select @.@.version"
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.|||Hello
i don't want to use name pipes because i want to supply an access over
internet.
My connectionstring look likes
.Properties("Network address").value = "MyPublicIPAdress"
.Provider = "sqloledb"
.ConnectionTimeout = 15
.CommandTimeout = 300
.CursorLocation = adUseClient
.Properties("Application Name") = "MyApp"
.Properties("Network Library").value = "DBMSSOCN"
.Properties("Integrated Security").value = "SSPI"
I made a few others Test:
*I try to configure (via cliconfg.exe) the SQL access from my client: I set
"Enabled protocols" only to TCP/IP
I didn't sove my problems.
* I make a Rollback of MDAC 2.8 (dasetup -u), It rollbacks to MDAC 2.7 (the
one supplies with XP) -> It RUNS again;
Is there any know bugs in the MDAC 2.8 when accessing a SQL Server with
TCP/IP and in a Trusted Mode ?!?
"Kevin McDonnell [MSFT]" <kevmc@.online.microsoft.com> wrote in message
news:qaI9eeCPEHA.304@.cpmsftngxa10.phx.gbl...
> Try switching the protocol using the Client Network Utility to Named
Pipes.
> See if the problem goes away.
> Instead of using your vb app, you can test with the following command line
> tool.
> -To test Named Pipes
> ISQL -Snp:ServerNameHere -E -Q"select @.@.version"
> -To test TCP/IP
> ISQL -Stcp:ServerNameHere -E -Q"select @.@.version"
>
> Thanks,
> Kevin McDonnell
> Microsoft Corporation
> This posting is provided AS IS with no warranties, and confers no rights.
>
>|||One of the goals of MDAC 2.8 was to tighten security .
SSPI (Security Support Provider Interface ) is used when you are using
Windows Authentication to connect to the SQL server. That is to say the
domain account of the interactive user trying to connect to SQL server is
used.
Sounds like the authentication token is lost or corrupted or something over
the VPN and SQL Server does not see the user as a valid domain account.
Here are some links that I hope help:
http://support.microsoft.com/defaul...kb;en-us;820761
http://support.microsoft.com/defaul...kb;en-us;814401
http://support.microsoft.com/defaul...kb;en-us;821373
Good luck,
Mike
"Chambonneau" <g.chambonneau@.castsoftware.com> wrote in message
news:ez6RRaBPEHA.3476@.tk2msftngp13.phx.gbl...
> Hello everybody
> I have a VB6 app using Trusted Connection to a SQL Server 2000.
> This application can also run when creating a VPN Connection and using a
> TCP/IP Connectionstring
>
> I upgrade my MDAC installation (2.8) and now when I tried to run my app
over
> VPN, I obtain: "cannot generate SSPI Context"
> It runs without problem in LAN using Trusted but not anymore over VPN.
> Can anyone help me ?!?
>
>
can not generate SSPI Context
I have a VB6 app using Trusted Connection to a SQL Server 2000.
This application can also run when creating a VPN Connection and using a
TCP/IP Connectionstring
I upgrade my MDAC installation (2.8) and now when I tried to run my app over
VPN, I obtain: "cannot generate SSPI Context"
It runs without problem in LAN using Trusted but not anymore over VPN.
Can anyone help me ?!?Have a look at
HOW TO: Troubleshoot the "Cannot Generate SSPI Context" Error Message
http://support.microsoft.com/defaul...kb;en-us;811889
HTH
Jasper Smith (SQL Server MVP)
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"Chambonneau" <g.chambonneau@.castsoftware.com> wrote in message
news:%23xis2GBPEHA.3744@.TK2MSFTNGP11.phx.gbl...
> Hello everybody
> I have a VB6 app using Trusted Connection to a SQL Server 2000.
> This application can also run when creating a VPN Connection and using a
> TCP/IP Connectionstring
>
> I upgrade my MDAC installation (2.8) and now when I tried to run my app
over
> VPN, I obtain: "cannot generate SSPI Context"
> It runs without problem in LAN using Trusted but not anymore over VPN.
> Can anyone help me ?!?
>|||Also don't forget to look at the hosts and lmhosts files in your system32
folder.
You need the correct hosts configuration in there. There are a variety of
problems that can cause the SSPI error and a change of hosts file config
sorted mine out on most client machines but I still have the problem on two
of them where it drops off after 45 mins for no apparent rhyme or reason.
The hosts file that works for me looks like this (bar the IBM manufactured
PC's)
127.0.0.1 localhost.uk-resources.net
127.0.0.1 mypc.uk-resources.net
192.168.16.2 ourserver.uk-resources.net
Don't forget to backup the original hosts and lmhost file before changing
anything.
There is some issue I recall seeing when researching the problem a few
months ago about the way the DNS resolves when using vpn and it may be
router related.
Regards,
Paul
"Chambonneau" <g.chambonneau@.castsoftware.com> wrote in message
news:%23xis2GBPEHA.3744@.TK2MSFTNGP11.phx.gbl...
> Hello everybody
> I have a VB6 app using Trusted Connection to a SQL Server 2000.
> This application can also run when creating a VPN Connection and using a
> TCP/IP Connectionstring
>
> I upgrade my MDAC installation (2.8) and now when I tried to run my app
over
> VPN, I obtain: "cannot generate SSPI Context"
> It runs without problem in LAN using Trusted but not anymore over VPN.
> Can anyone help me ?!?
>sql
Monday, March 19, 2012
Can no longer get dataset fill method to work after directory copy
create serveral tables in the database and added it as the datasource for th
e
project. I created several forms, created several datagrids and regular
design views. After I got several of the forms running, I decided to backup
my directory and copied the entire directory to a backup directory on my har
d
drive.
While continuing to work on my project, the IDE lost some of the data
adapters and and datasets while I was switching between the design view and
code view. So I decided to delete the directory and copy the backup I had
saved and start from there. But a Big Problem occured. Once I opned the
project and tried to execute it, I could no longer get the app to connect to
the database. I am the only user and administrator account but every time th
e
app tries to fill a table now I get on of these two erors:
System.Data.SqlClient.SqlException was unhandled
Message="Unable to open the physical file -- ". Operating system error
5: \"5(Access is denied.)\".\r\nUnable to open the physical file
or
System.Data.SqlClient.SqlException was unhandled
Message="Cannot open user default database. Login failed.\r\nLogin failed
for user
Source=".Net SqlClient Data Provider"
ErrorCode=-2146232060
Class=11
LineNumber=65536
Number=4064
Procedure=""
Server=".\\SQLEXPRESS"
State=1
StackTrace:
I can no longer connect to the database even thou I can see and work with it
in the IDE. Help
HWDotNetDeveloperSeveral possible reasons for this:
1) you did not restore your original LDF file with your matching MDF
2) you have not re-attached the database
3) you are trying to connect using an sql user account and it is not config
ured the same with the "backed" up version
4) you are trying to connect without the correct user instance reference (i
e. the backed up version is different from the one you deleted)
If you can see the database from the IDE, then using query analyzer and run
a test query. You can also start OSQL and run a simple query against the da
tabase. If these queries work, then there is something not synchronized wit
hin your code versus the database that was restored.
Check out
http://msdn.microsoft.com/library/d...>
userinst.asp
Hope this helps...
-Eric
Can more than one database be queried
Can more than one database be queried when creating a report in SQL Server 2005 if they are from the same data source?
Our company is going to SQL Server 2005 for a bunch of Access databases and a C++ system. Would like to be able to query these different database at the same time to create the report. Is it possible to do this or do we need another reporting service?
Thank you for any help,
Jennifer
Yes, you can have multiple datasets based on one data source, or multiple datasets based on multiple data sources. See this page for more information on this http://msdn2.microsoft.com/en-us/library/ms160324.aspx
Saturday, February 25, 2012
Can I Use If Condition In View
I AM CREATING A VIEW AND USE IN THIS IF AND ELSE CONDITION.
THIS SYNTAX IS NOT WORKING PROPERLY..CAN USE OR NOT??No, you can not use IF condition in a view.
There are so many other ways to do it.
Thank you.|||
Quote:
Originally Posted by iburyak
No, you can not use IF condition in a view.
There are so many other ways to do it.
Thank you.
thank u sir for reply
u say that there is many ways.
so sir what is the other way..|||1. You can create a table function.
2. You can return result of a stored procedure.
3. You can use where condition on existing view.
4. You can use Case in select statements of a view which is in many cases is almost the same as IF ELSE.
5. You can create different views and use them depend on a conditions like.
Create view View_StoredProcs
AS
select name from sysobjects where type like 'p'
Create view View_Tables
AS
select name from sysobjects where type like 'u'
and more....|||Hi iburyak,
I've used the case statement and it is working as expected here.
Thanks for the excellent explanation.|||
Quote:
Originally Posted by leniel
Hi iburyak,
I've used the case statement and it is working as expected here.
Thanks for the excellent explanation.
You are welcome.
For generic question I had a generic answer.
I am glad you were able to get some info out of it... :)
Good Luck.
Tuesday, February 14, 2012
Can I release temp SQL Tables?
simple example:
Select abc.def into #tmptable from ABCTable.
If I make changes to the query and then rerun it, it tells me that the
object (which is the temp table) already exist in the database. I have to
close my Query Analyzer window and then reopen it.
So my question is this: Is there a command that I can include in the Query
Analyzer window that will release the Temp Table without having to close the
window?
DROP TABLE #TABLENAME
"Preacher Man" <nospam> wrote in message
news:OaUixWGRGHA.4952@.TK2MSFTNGP09.phx.gbl...
> In Query Analyzer I am creating a Select statement using temp tables. For
> a simple example:
> Select abc.def into #tmptable from ABCTable.
> If I make changes to the query and then rerun it, it tells me that the
> object (which is the temp table) already exist in the database. I have to
> close my Query Analyzer window and then reopen it.
> So my question is this: Is there a command that I can include in the
> Query Analyzer window that will release the Temp Table without having to
> close the window?
>
|||drop table #tmptable
"Preacher Man" <nospam> wrote in message
news:OaUixWGRGHA.4952@.TK2MSFTNGP09.phx.gbl...
> In Query Analyzer I am creating a Select statement using temp tables. For
> a simple example:
> Select abc.def into #tmptable from ABCTable.
> If I make changes to the query and then rerun it, it tells me that the
> object (which is the temp table) already exist in the database. I have to
> close my Query Analyzer window and then reopen it.
> So my question is this: Is there a command that I can include in the
> Query Analyzer window that will release the Temp Table without having to
> close the window?
>
|||Thanks everyone for the quick response.
"Aaron Bertrand [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:ejKaNaGRGHA.4920@.tk2msftngp13.phx.gbl...
> drop table #tmptable
>
> "Preacher Man" <nospam> wrote in message
> news:OaUixWGRGHA.4952@.TK2MSFTNGP09.phx.gbl...
>
|||and u can put a check in too :
IF OBJECT_ID ('tempdb..#testtemp') IS NOT NULL
BEGIN
DROP TABLE #testtemp
END
CREATE TABLE #testtemp (numb int)
INSERT #testtemp VALUES (1)
INSERT #testtemp VALUES (1)
"Preacher Man" <nospam> wrote in message
news:OaUixWGRGHA.4952@.TK2MSFTNGP09.phx.gbl...
> In Query Analyzer I am creating a Select statement using temp tables. For
> a simple example:
> Select abc.def into #tmptable from ABCTable.
> If I make changes to the query and then rerun it, it tells me that the
> object (which is the temp table) already exist in the database. I have to
> close my Query Analyzer window and then reopen it.
> So my question is this: Is there a command that I can include in the
> Query Analyzer window that will release the Temp Table without having to
> close the window?
>
Can I release temp SQL Tables?
simple example:
Select abc.def into #tmptable from ABCTable.
If I make changes to the query and then rerun it, it tells me that the
object (which is the temp table) already exist in the database. I have to
close my Query Analyzer window and then reopen it.
So my question is this: Is there a command that I can include in the Query
Analyzer window that will release the Temp Table without having to close the
window?DROP TABLE #TABLENAME
"Preacher Man" <nospam> wrote in message
news:OaUixWGRGHA.4952@.TK2MSFTNGP09.phx.gbl...
> In Query Analyzer I am creating a Select statement using temp tables. For
> a simple example:
> Select abc.def into #tmptable from ABCTable.
> If I make changes to the query and then rerun it, it tells me that the
> object (which is the temp table) already exist in the database. I have to
> close my Query Analyzer window and then reopen it.
> So my question is this: Is there a command that I can include in the
> Query Analyzer window that will release the Temp Table without having to
> close the window?
>|||drop table #tmptable
"Preacher Man" <nospam> wrote in message
news:OaUixWGRGHA.4952@.TK2MSFTNGP09.phx.gbl...
> In Query Analyzer I am creating a Select statement using temp tables. For
> a simple example:
> Select abc.def into #tmptable from ABCTable.
> If I make changes to the query and then rerun it, it tells me that the
> object (which is the temp table) already exist in the database. I have to
> close my Query Analyzer window and then reopen it.
> So my question is this: Is there a command that I can include in the
> Query Analyzer window that will release the Temp Table without having to
> close the window?
>|||Thanks everyone for the quick response.
"Aaron Bertrand [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:ejKaNaGRGHA.4920@.tk2msftngp13.phx.gbl...
> drop table #tmptable
>
> "Preacher Man" <nospam> wrote in message
> news:OaUixWGRGHA.4952@.TK2MSFTNGP09.phx.gbl...
>|||and u can put a check in too :
IF OBJECT_ID ('tempdb..#testtemp') IS NOT NULL
BEGIN
DROP TABLE #testtemp
END
CREATE TABLE #testtemp (numb int)
INSERT #testtemp VALUES (1)
INSERT #testtemp VALUES (1)
"Preacher Man" <nospam> wrote in message
news:OaUixWGRGHA.4952@.TK2MSFTNGP09.phx.gbl...
> In Query Analyzer I am creating a Select statement using temp tables. For
> a simple example:
> Select abc.def into #tmptable from ABCTable.
> If I make changes to the query and then rerun it, it tells me that the
> object (which is the temp table) already exist in the database. I have to
> close my Query Analyzer window and then reopen it.
> So my question is this: Is there a command that I can include in the
> Query Analyzer window that will release the Temp Table without having to
> close the window?
>
Can I release temp SQL Tables?
simple example:
Select abc.def into #tmptable from ABCTable.
If I make changes to the query and then rerun it, it tells me that the
object (which is the temp table) already exist in the database. I have to
close my Query Analyzer window and then reopen it.
So my question is this: Is there a command that I can include in the Query
Analyzer window that will release the Temp Table without having to close the
window?DROP TABLE #TABLENAME
"Preacher Man" <nospam> wrote in message
news:OaUixWGRGHA.4952@.TK2MSFTNGP09.phx.gbl...
> In Query Analyzer I am creating a Select statement using temp tables. For
> a simple example:
> Select abc.def into #tmptable from ABCTable.
> If I make changes to the query and then rerun it, it tells me that the
> object (which is the temp table) already exist in the database. I have to
> close my Query Analyzer window and then reopen it.
> So my question is this: Is there a command that I can include in the
> Query Analyzer window that will release the Temp Table without having to
> close the window?
>|||drop table #tmptable
"Preacher Man" <nospam> wrote in message
news:OaUixWGRGHA.4952@.TK2MSFTNGP09.phx.gbl...
> In Query Analyzer I am creating a Select statement using temp tables. For
> a simple example:
> Select abc.def into #tmptable from ABCTable.
> If I make changes to the query and then rerun it, it tells me that the
> object (which is the temp table) already exist in the database. I have to
> close my Query Analyzer window and then reopen it.
> So my question is this: Is there a command that I can include in the
> Query Analyzer window that will release the Temp Table without having to
> close the window?
>|||Thanks everyone for the quick response.
"Aaron Bertrand [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in mess
age
news:ejKaNaGRGHA.4920@.tk2msftngp13.phx.gbl...
> drop table #tmptable
>
> "Preacher Man" <nospam> wrote in message
> news:OaUixWGRGHA.4952@.TK2MSFTNGP09.phx.gbl...
>|||and u can put a check in too :
IF OBJECT_ID ('tempdb..#testtemp') IS NOT NULL
BEGIN
DROP TABLE #testtemp
END
CREATE TABLE #testtemp (numb int)
INSERT #testtemp VALUES (1)
INSERT #testtemp VALUES (1)
"Preacher Man" <nospam> wrote in message
news:OaUixWGRGHA.4952@.TK2MSFTNGP09.phx.gbl...
> In Query Analyzer I am creating a Select statement using temp tables. For
> a simple example:
> Select abc.def into #tmptable from ABCTable.
> If I make changes to the query and then rerun it, it tells me that the
> object (which is the temp table) already exist in the database. I have to
> close my Query Analyzer window and then reopen it.
> So my question is this: Is there a command that I can include in the
> Query Analyzer window that will release the Temp Table without having to
> close the window?
>
can i read ldf file in sql server
While creating database in sql server it automatically create 2 files
one is.mdf which is data file and another is .ldf which is log file.
I wann to read this .ldf filepls be more specific. what is a ldf file.
:(|||RE: Q1 Is there is any way to read ldf file in sql server?
While creating database in sql server it automatically create 2 files
one is.mdf which is data file and another is .ldf which is log file.
Q2 I want to read this .ldf file
A1 Yes.
A2 For user purposes it would be exceedingly rare to need or want to do so (or have any particular reason to). DBA troubleshooting and development efforts are the main reasons to want to read Log files directly. If you are still curious, there is a third party tool (Lumigent Log Explorer), and dbcc Log (ala ver 6.x) still works as well e.g.{dbcc Log (Pubs), or optinally use a result set type parameter, but the sybase type multiparameter form is no longer supported}.
Friday, February 10, 2012
Can I install the db In a different location rather than default?
Hi,
When creating a new database I would like this db to be created on my D drive rather than the default place.How do you do this in sql server 2005 ? I could not find a dialog box or something similar to point to a folder for the data and log file.
Any suggestions?
Hi,scroll abit right on the datafiles grid, you will find the Path column there.
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
|||
Thanks !
I feel so silly now ,In sql 2000 is right in front of you .I totally missed the scrollbar.
Thanks
|||Good that this helped, could you please mark the post as solved then ?
Jens Suessmeyer.
http://www.sqlserver2005.de