Showing posts with label helloi. Show all posts
Showing posts with label helloi. Show all posts

Tuesday, March 20, 2012

could not upload sqljdbc driver

Hello;
I failed to connect with my database, it give me the massage as following;

Cannot load the SQL driver. Include it in your classpath

Could anyone tell me why? Thanks

And i am using the Microsoft SQL server 2000, Java 2 runtime enviroment and Microsoft SQL Server 2005 JDBC Driver now.

In the user varible, i set a path for the java run time as "c:\Program Files\Java\j2re1.4.2\javaws"
and CLASSPATH =.;C:\Program Files\Microsoft SQL Server 2005 JDBC Driver\sqljdbc_1.1\enu\sqljdbc.jar for the JDBC Driver.

and i also tried
1)
-classpath =.;"C:\Program Files\Microsoft SQL Server 2005 JDBC Driver\sqljdbc_1.1\enu\sqljdbc.jar"

2)i moved the file of the sqljdbc.jar to a path as c:\temp

then i try it again as following;

varible name: -classpath
value: ",;C\temp\sqljdbc.jar"

They are still not work

but it does not work

and my code as following;

public MyTest()
{


//information of our connection
//the url of the database: protocol:subprotocol:subname:computer_name:port:database_name
String strUrl = "jdbc:sqlserver://localhost;user=xx;password=xxxx";


//user name and password
String strUser = "xx";
String strPass = "xxx";

//try to load the driver
try {

Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
}
catch (ClassNotFoundException e) {
System.out.println( "Cannot load the SQL driver. Include it in your classpath.");
System.exit( -1);
}

//a null reference to a Connection object
c = null;
try {
//open a connection to the database
c = DriverManager.getConnection( strUrl);

}
catch (SQLException e) {
System.out.println("Cannot connect to the database. Here is the error:");
e.printStackTrace();
System.exit( -1);
}
//create a statement object to execute sql statements

displayInformation();
}

By the way, how i can delete a system variable?
i set the classpath for the sqljdbc in system variable section, but i want to delete it, but when i click the delete button, it does not has reaction. Do you known i i can solve this problem? ThanksCan you give me the whole string you are using to execute this. Have you tried running this with Eclipse?

Sunday, March 11, 2012

Could not get the column information from the OLE DB provider IBMDA400

Hello

I'm trying to get data from as400 server to sql server, trough a job.
The job executes a stored procedure that retrieves data from a view in an other database on the same server. That view gets the data from as400.
Now, when i run the mentioned stored procedure in the query analyzer, everything works fine, but when the stored procedure is executed from the scheduled job, it fails each time giving the error

"Could not get the column information from the OLE DB provider 'IBMDA400'. [SQLSTATE 42000] (Error 7350). The step failed."

on random points during that process (by that i mean the lenght of time it runs)

does anyone know what the diffrence is between executing an sp in query analyzer or using a job, keeping in mind retrieving data from as400?

thanksSQLAgent service account should have the same permissions as yours. If you're piping data from AS/400 using linked server, make sure mapping entry exists for SQLAgent account as well.

Friday, February 17, 2012

Corrupting database

Hello:
I am using SQL 2005 on a W2K3 Standard server. The database is being
installed to a external HP disk cage called an MSA 30. After the database
installs it become corrupt almost right away. Does anyone have any
experience with SQL databases on external disk cages.
Harrison MidkiffHarrison,
There is no logical difference between an internal disk and an external disk
array as far as SQL Server is concerned. I would bet your problem is caused
by some hardware anomaly. I copied this from my prior post on another group:
I've seen similar things happen with intermittent h/w failures. In one
specific case it was a newer Perc card that was supposed to be backward
compatible with an older disk array. It wasn't, and would cause the server
to shut down intermittently. It did leave bread crumbs in the Event Log, so
we were able to work our way through it. You might want to check the Event
Log.
Check the SQL Server Log and the Windows Event Log. I bet there is a
reference to some sort of I/O or other hardware error. Possibly, you have a
version compatibility issue with your SCSI controller or drivers as I did.
Or, you may have some sort of fatal hardware issue with the array itself. If
there is no error there, I would suspect faulty write cacheing on the array
side. Turn off write cacheing if it is on.
-- Bill
"Harrison Midkiff" <HMidkiff@.aviinc.com> wrote in message
news:%23H7vfI%23SHHA.5100@.TK2MSFTNGP06.phx.gbl...
> Hello:
> I am using SQL 2005 on a W2K3 Standard server. The database is being
> installed to a external HP disk cage called an MSA 30. After the database
> installs it become corrupt almost right away. Does anyone have any
> experience with SQL databases on external disk cages.
> Harrison Midkiff
>|||Hi
Use SQLIOSim, available from http://support.microsoft.com/kb/231619 to test
your disk subsystem.
It sounds like you have an IO system that is not performing correctly.
Regards
Michel Epprecht [MSFT]
This posting is provided "AS IS" with no warranties, and confers no rights.
"AlterEgo" <alterego55@.dslextreme.com> wrote in message
news:OWK%238o%23SHHA.4252@.TK2MSFTNGP05.phx.gbl...
> Harrison,
> There is no logical difference between an internal disk and an external
> disk array as far as SQL Server is concerned. I would bet your problem is
> caused by some hardware anomaly. I copied this from my prior post on
> another group:
> I've seen similar things happen with intermittent h/w failures. In one
> specific case it was a newer Perc card that was supposed to be backward
> compatible with an older disk array. It wasn't, and would cause the server
> to shut down intermittently. It did leave bread crumbs in the Event Log,
> so
> we were able to work our way through it. You might want to check the Event
> Log.
> Check the SQL Server Log and the Windows Event Log. I bet there is a
> reference to some sort of I/O or other hardware error. Possibly, you have
> a version compatibility issue with your SCSI controller or drivers as I
> did. Or, you may have some sort of fatal hardware issue with the array
> itself. If there is no error there, I would suspect faulty write cacheing
> on the array side. Turn off write cacheing if it is on.
> -- Bill
>
> "Harrison Midkiff" <HMidkiff@.aviinc.com> wrote in message
> news:%23H7vfI%23SHHA.5100@.TK2MSFTNGP06.phx.gbl...
>