Showing posts with label systems. Show all posts
Showing posts with label systems. Show all posts

Monday, March 12, 2012

integrated authentication

Hi,

I am writing project in asp .net with sql server 2005. But I need support him by some applications like deamon in linux systems.(but it will be in windows) So i write it in java. I download jdbc driver and install it. I wrote simple project:

package MainW;

//import javax.mail.*;

//import javax.mail.internet.*;

//import com.sun.mail.smtp.*;

//import javax.swing.*;

//import java.awt.*;

//import java.awt.event.*;

//import java.io.*;

import java.sql.*;

//import java.text.DateFormat;

//import java.text.SimpleDateFormat;

//import java.util.*;

//import java.util.Date;

class Main

{

public static void main(String[] args)

{

String connectionUrl = "jdbc:" + "sqlserver://localhost;databaseName=ASPNETDB.MDF;IntegratedSecurity=True";

Connection con = null;

Statement stmt = null;

ResultSet rs = null;

try

{

Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");

con = DriverManager.getConnection(connectionUrl);

String SQL = "SELECT * FROM aspnet_Users";

stmt = con.createStatement();

rs = stmt.executeQuery(SQL);

// Iterate through the data in the result set and display it.

while (rs.next())

{

System.out.println(rs.getString(4) + " " + rs.getString(6));

}

}

catch (Exception e)

{

e.printStackTrace();

}

finally

{

if (rs != null) try { rs.close(); } catch(Exception e) {}

if (stmt != null) try { stmt.close(); } catch(Exception e) {}

if (con != null) try { con.close(); } catch(Exception e) {}

}

}

}

But i have error:

2007-08-20 15:20:59 com.microsoft.sqlserver.jdbc.AuthenticationJNI SNISecGenClientContext

WARNING: Initialize context failed

2007-08-20 15:20:59 com.microsoft.sqlserver.jdbc.SQLServerConnection SSPIData

WARNING: ConnectionID:1 TransactionID:0x0000000000000000 Authentication failed code-2146893052

com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication.

at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(Unknown Source)

at com.microsoft.sqlserver.jdbc.SQLServerConnection.SSPIData(Unknown Source)

at com.microsoft.sqlserver.jdbc.SQLServerConnection.sendLogon(Unknown Source)

at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(Unknown Source)

at com.microsoft.sqlserver.jdbc.SQLServerConnection.access$000(Unknown Source)

at com.microsoft.sqlserver.jdbc.SQLServerConnection$LogonCommand.doExecute(Unknown Source)

at com.microsoft.sqlserver.jdbc.TDSCommand.execute(Unknown Source)

at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(Unknown Source)

at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(Unknown Source)

at com.microsoft.sqlserver.jdbc.SQLServerConnection.loginWithoutFailover(Unknown Source)

at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(Unknown Source)

at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(Unknown Source)

at java.sql.DriverManager.getConnection(Unknown Source)

at java.sql.DriverManager.getConnection(Unknown Source)

at MainW.Main.main(Main.java:29)

I am googling about this error second day but i cannot find solve.

Please help.

The failure code -2146893052 is 0x80090304. Some results on the Internet mentions firewall blocking the SQL Server TCP port, but since you are connecting to the local machine it should not be a problem. I also heard of out of memory scenarios causing this error to be raised.

I think it would be helpful if you can mention the environment setup you are running the app under. Also, which SQL Server 2005 edition on you using?

Some things you may consider trying:

On the same machine, try running the "sqlcmd" tool that comes with SQL Server 2005 to see if you get the same error

sqlcmd -Slocalhost -E

Friday, February 24, 2012

Installing SQL 2005 onto a drive other than C:

Our systems have a server set up that we're planning to put Sharepoint
and SQL 2005 on.
We've run into a problem installing SQL - trying to force it to the D
drive (where we've got plenty of space), will not complete. It gives an
error about the time it gets to the Reporting Services notice (it does
this whether Reporting services is going to be installed or not) and
just quits.
The C drive has just a limited amount of space on it.
How can you force SQL 2005 to install entirely on a second drive?
BC
During the install you will have a screen that allows you to choose what
you want to install. There is an Advanced button - click it and you
can change the drive there. I just did that for the same reason.
Blasting Cap wrote:
> Our systems have a server set up that we're planning to put Sharepoint
> and SQL 2005 on.
> We've run into a problem installing SQL - trying to force it to the D
> drive (where we've got plenty of space), will not complete. It gives an
> error about the time it gets to the Reporting Services notice (it does
> this whether Reporting services is going to be installed or not) and
> just quits.
> The C drive has just a limited amount of space on it.
> How can you force SQL 2005 to install entirely on a second drive?
> BC
Brett I. Holcomb
brettholcomb@.R777bellsouth.net
Remove R777 to email
|||I thought we had tried that, but it gets to a certain point where it
just gives an error message & quits, even though I recall looking at the
info flying by and seeing D:\.... next to it.
BC
Brett I. Holcomb wrote:
> During the install you will have a screen that allows you to choose what
> you want to install. There is an Advanced button - click it and you
> can change the drive there. I just did that for the same reason.
> Blasting Cap wrote:
>
|||Do you have enough space on D? It's on one of the earlier screens and
you have go go to the advanced and change it for all the items you are
installing.
Blasting Cap wrote:[vbcol=seagreen]
> I thought we had tried that, but it gets to a certain point where it
> just gives an error message & quits, even though I recall looking at the
> info flying by and seeing D:\.... next to it.
> BC
>
> Brett I. Holcomb wrote:
Brett I. Holcomb
brettholcomb@.R777bellsouth.net
Remove R777 to email
|||The D drive has around 30 gigs on it or more, the C drive has about 6-10
gigs on it, about half of which is used by the OS.
If its on one of the earlier screens, I know we changed it there, and it
gets to Reporting Services, and gives an error, and won't continue.
BC
Brett I. Holcomb wrote:
> Do you have enough space on D? It's on one of the earlier screens and
> you have go go to the advanced and change it for all the items you are
> installing.
>
> Blasting Cap wrote:
>
|||BC,
Could you be more precise on the amount of "FREE" space on your drives?
You say your C drive has about 6-10 gigs on it and then goes on and say half
of which is used by the OS. Does this mean it has 3 gigs of FREE space? If
so, it has enough free space to install SQL 2005.
"Blasting Cap" wrote:

> The D drive has around 30 gigs on it or more, the C drive has about 6-10
> gigs on it, about half of which is used by the OS.
> If its on one of the earlier screens, I know we changed it there, and it
> gets to Reporting Services, and gives an error, and won't continue.
> BC
> Brett I. Holcomb wrote:
>
|||Jeff -
The amount of free space on the C drive is around 3-4 gigs (I think it
is only a 6 GB partition). The D drive is around a 30 gig partition,
which has between 25-28GB free.
The problem is that we are trying to put both SQL 2005 AND Sharepoint
2007 on the same server, and we cannot make SQL 2005 install completely
to the D drive - the install quits with an error message (500000 I
believe). The problem with having SQL 2005 on the C drive is that we
cannot make Sharepoint 2007 go to the D drive either - it insists on
installing on C too - and there's not enough space on C for both.
BC
Jeff Tu wrote:[vbcol=seagreen]
> BC,
> Could you be more precise on the amount of "FREE" space on your drives?
> You say your C drive has about 6-10 gigs on it and then goes on and say half
> of which is used by the OS. Does this mean it has 3 gigs of FREE space? If
> so, it has enough free space to install SQL 2005.
> "Blasting Cap" wrote:

Installing SQL 2005 onto a drive other than C:

Our systems have a server set up that we're planning to put Sharepoint
and SQL 2005 on.
We've run into a problem installing SQL - trying to force it to the D
drive (where we've got plenty of space), will not complete. It gives an
error about the time it gets to the Reporting Services notice (it does
this whether Reporting services is going to be installed or not) and
just quits.
The C drive has just a limited amount of space on it.
How can you force SQL 2005 to install entirely on a second drive?
BCDuring the install you will have a screen that allows you to choose what
you want to install. There is an Advanced button - click it and you
can change the drive there. I just did that for the same reason.
Blasting Cap wrote:
> Our systems have a server set up that we're planning to put Sharepoint
> and SQL 2005 on.
> We've run into a problem installing SQL - trying to force it to the D
> drive (where we've got plenty of space), will not complete. It gives an
> error about the time it gets to the Reporting Services notice (it does
> this whether Reporting services is going to be installed or not) and
> just quits.
> The C drive has just a limited amount of space on it.
> How can you force SQL 2005 to install entirely on a second drive?
> BC
Brett I. Holcomb
brettholcomb@.R777bellsouth.net
Remove R777 to email|||I thought we had tried that, but it gets to a certain point where it
just gives an error message & quits, even though I recall looking at the
info flying by and seeing D:\.... next to it.
BC
Brett I. Holcomb wrote:
> During the install you will have a screen that allows you to choose what
> you want to install. There is an Advanced button - click it and you
> can change the drive there. I just did that for the same reason.
> Blasting Cap wrote:
>|||Do you have enough space on D? It's on one of the earlier screens and
you have go go to the advanced and change it for all the items you are
installing.
Blasting Cap wrote:[vbcol=seagreen]
> I thought we had tried that, but it gets to a certain point where it
> just gives an error message & quits, even though I recall looking at the
> info flying by and seeing D:\.... next to it.
> BC
>
> Brett I. Holcomb wrote:
Brett I. Holcomb
brettholcomb@.R777bellsouth.net
Remove R777 to email|||The D drive has around 30 gigs on it or more, the C drive has about 6-10
gigs on it, about half of which is used by the OS.
If its on one of the earlier screens, I know we changed it there, and it
gets to Reporting Services, and gives an error, and won't continue.
BC
Brett I. Holcomb wrote:
> Do you have enough space on D? It's on one of the earlier screens and
> you have go go to the advanced and change it for all the items you are
> installing.
>
> Blasting Cap wrote:
>|||BC,
Could you be more precise on the amount of "FREE" space on your drives?
You say your C drive has about 6-10 gigs on it and then goes on and say half
of which is used by the OS. Does this mean it has 3 gigs of FREE space? If
so, it has enough free space to install SQL 2005.
"Blasting Cap" wrote:

> The D drive has around 30 gigs on it or more, the C drive has about 6-10
> gigs on it, about half of which is used by the OS.
> If its on one of the earlier screens, I know we changed it there, and it
> gets to Reporting Services, and gives an error, and won't continue.
> BC
> Brett I. Holcomb wrote:
>|||Jeff -
The amount of free space on the C drive is around 3-4 gigs (I think it
is only a 6 GB partition). The D drive is around a 30 gig partition,
which has between 25-28GB free.
The problem is that we are trying to put both SQL 2005 AND Sharepoint
2007 on the same server, and we cannot make SQL 2005 install completely
to the D drive - the install quits with an error message (500000 I
believe). The problem with having SQL 2005 on the C drive is that we
cannot make Sharepoint 2007 go to the D drive either - it insists on
installing on C too - and there's not enough space on C for both.
BC
Jeff Tu wrote:[vbcol=seagreen]
> BC,
> Could you be more precise on the amount of "FREE" space on your drives?
> You say your C drive has about 6-10 gigs on it and then goes on and say ha
lf
> of which is used by the OS. Does this mean it has 3 gigs of FREE space? If
> so, it has enough free space to install SQL 2005.
> "Blasting Cap" wrote:
>

Installing SQL 2005 onto a drive other than C:

Our systems have a server set up that we're planning to put Sharepoint
and SQL 2005 on.
We've run into a problem installing SQL - trying to force it to the D
drive (where we've got plenty of space), will not complete. It gives an
error about the time it gets to the Reporting Services notice (it does
this whether Reporting services is going to be installed or not) and
just quits.
The C drive has just a limited amount of space on it.
How can you force SQL 2005 to install entirely on a second drive?
BCDuring the install you will have a screen that allows you to choose what
you want to install. There is an Advanced button - click it and you
can change the drive there. I just did that for the same reason.
Blasting Cap wrote:
> Our systems have a server set up that we're planning to put Sharepoint
> and SQL 2005 on.
> We've run into a problem installing SQL - trying to force it to the D
> drive (where we've got plenty of space), will not complete. It gives an
> error about the time it gets to the Reporting Services notice (it does
> this whether Reporting services is going to be installed or not) and
> just quits.
> The C drive has just a limited amount of space on it.
> How can you force SQL 2005 to install entirely on a second drive?
> BC
--
Brett I. Holcomb
brettholcomb@.R777bellsouth.net
Remove R777 to email|||I thought we had tried that, but it gets to a certain point where it
just gives an error message & quits, even though I recall looking at the
info flying by and seeing D:\.... next to it.
BC
Brett I. Holcomb wrote:
> During the install you will have a screen that allows you to choose what
> you want to install. There is an Advanced button - click it and you
> can change the drive there. I just did that for the same reason.
> Blasting Cap wrote:
>> Our systems have a server set up that we're planning to put Sharepoint
>> and SQL 2005 on.
>> We've run into a problem installing SQL - trying to force it to the D
>> drive (where we've got plenty of space), will not complete. It gives
>> an error about the time it gets to the Reporting Services notice (it
>> does this whether Reporting services is going to be installed or not)
>> and just quits.
>> The C drive has just a limited amount of space on it.
>> How can you force SQL 2005 to install entirely on a second drive?
>> BC
>|||Do you have enough space on D? It's on one of the earlier screens and
you have go go to the advanced and change it for all the items you are
installing.
Blasting Cap wrote:
> I thought we had tried that, but it gets to a certain point where it
> just gives an error message & quits, even though I recall looking at the
> info flying by and seeing D:\.... next to it.
> BC
>
> Brett I. Holcomb wrote:
>> During the install you will have a screen that allows you to choose
>> what you want to install. There is an Advanced button - click it and
>> you can change the drive there. I just did that for the same reason.
>> Blasting Cap wrote:
>> Our systems have a server set up that we're planning to put
>> Sharepoint and SQL 2005 on.
>> We've run into a problem installing SQL - trying to force it to the D
>> drive (where we've got plenty of space), will not complete. It gives
>> an error about the time it gets to the Reporting Services notice (it
>> does this whether Reporting services is going to be installed or not)
>> and just quits.
>> The C drive has just a limited amount of space on it.
>> How can you force SQL 2005 to install entirely on a second drive?
>> BC
--
Brett I. Holcomb
brettholcomb@.R777bellsouth.net
Remove R777 to email|||The D drive has around 30 gigs on it or more, the C drive has about 6-10
gigs on it, about half of which is used by the OS.
If its on one of the earlier screens, I know we changed it there, and it
gets to Reporting Services, and gives an error, and won't continue.
BC
Brett I. Holcomb wrote:
> Do you have enough space on D? It's on one of the earlier screens and
> you have go go to the advanced and change it for all the items you are
> installing.
>
> Blasting Cap wrote:
>> I thought we had tried that, but it gets to a certain point where it
>> just gives an error message & quits, even though I recall looking at
>> the info flying by and seeing D:\.... next to it.
>> BC
>>
>> Brett I. Holcomb wrote:
>> During the install you will have a screen that allows you to choose
>> what you want to install. There is an Advanced button - click it
>> and you can change the drive there. I just did that for the same
>> reason.
>> Blasting Cap wrote:
>> Our systems have a server set up that we're planning to put
>> Sharepoint and SQL 2005 on.
>> We've run into a problem installing SQL - trying to force it to the
>> D drive (where we've got plenty of space), will not complete. It
>> gives an error about the time it gets to the Reporting Services
>> notice (it does this whether Reporting services is going to be
>> installed or not) and just quits.
>> The C drive has just a limited amount of space on it.
>> How can you force SQL 2005 to install entirely on a second drive?
>> BC
>|||BC,
Could you be more precise on the amount of "FREE" space on your drives?
You say your C drive has about 6-10 gigs on it and then goes on and say half
of which is used by the OS. Does this mean it has 3 gigs of FREE space? If
so, it has enough free space to install SQL 2005.
"Blasting Cap" wrote:
> The D drive has around 30 gigs on it or more, the C drive has about 6-10
> gigs on it, about half of which is used by the OS.
> If its on one of the earlier screens, I know we changed it there, and it
> gets to Reporting Services, and gives an error, and won't continue.
> BC
> Brett I. Holcomb wrote:
> > Do you have enough space on D? It's on one of the earlier screens and
> > you have go go to the advanced and change it for all the items you are
> > installing.
> >
> >
> > Blasting Cap wrote:
> >> I thought we had tried that, but it gets to a certain point where it
> >> just gives an error message & quits, even though I recall looking at
> >> the info flying by and seeing D:\.... next to it.
> >>
> >> BC
> >>
> >>
> >> Brett I. Holcomb wrote:
> >> During the install you will have a screen that allows you to choose
> >> what you want to install. There is an Advanced button - click it
> >> and you can change the drive there. I just did that for the same
> >> reason.
> >>
> >> Blasting Cap wrote:
> >> Our systems have a server set up that we're planning to put
> >> Sharepoint and SQL 2005 on.
> >>
> >> We've run into a problem installing SQL - trying to force it to the
> >> D drive (where we've got plenty of space), will not complete. It
> >> gives an error about the time it gets to the Reporting Services
> >> notice (it does this whether Reporting services is going to be
> >> installed or not) and just quits.
> >>
> >> The C drive has just a limited amount of space on it.
> >>
> >> How can you force SQL 2005 to install entirely on a second drive?
> >>
> >> BC
> >>
> >
>|||Jeff -
The amount of free space on the C drive is around 3-4 gigs (I think it
is only a 6 GB partition). The D drive is around a 30 gig partition,
which has between 25-28GB free.
The problem is that we are trying to put both SQL 2005 AND Sharepoint
2007 on the same server, and we cannot make SQL 2005 install completely
to the D drive - the install quits with an error message (500000 I
believe). The problem with having SQL 2005 on the C drive is that we
cannot make Sharepoint 2007 go to the D drive either - it insists on
installing on C too - and there's not enough space on C for both.
BC
Jeff Tu wrote:
> BC,
> Could you be more precise on the amount of "FREE" space on your drives?
> You say your C drive has about 6-10 gigs on it and then goes on and say half
> of which is used by the OS. Does this mean it has 3 gigs of FREE space? If
> so, it has enough free space to install SQL 2005.
> "Blasting Cap" wrote:
>> The D drive has around 30 gigs on it or more, the C drive has about 6-10
>> gigs on it, about half of which is used by the OS.
>> If its on one of the earlier screens, I know we changed it there, and it
>> gets to Reporting Services, and gives an error, and won't continue.
>> BC
>> Brett I. Holcomb wrote:
>> Do you have enough space on D? It's on one of the earlier screens and
>> you have go go to the advanced and change it for all the items you are
>> installing.
>>
>> Blasting Cap wrote:
>> I thought we had tried that, but it gets to a certain point where it
>> just gives an error message & quits, even though I recall looking at
>> the info flying by and seeing D:\.... next to it.
>> BC
>>
>> Brett I. Holcomb wrote:
>> During the install you will have a screen that allows you to choose
>> what you want to install. There is an Advanced button - click it
>> and you can change the drive there. I just did that for the same
>> reason.
>> Blasting Cap wrote:
>> Our systems have a server set up that we're planning to put
>> Sharepoint and SQL 2005 on.
>> We've run into a problem installing SQL - trying to force it to the
>> D drive (where we've got plenty of space), will not complete. It
>> gives an error about the time it gets to the Reporting Services
>> notice (it does this whether Reporting services is going to be
>> installed or not) and just quits.
>> The C drive has just a limited amount of space on it.
>> How can you force SQL 2005 to install entirely on a second drive?
>> BC