Showing posts with label failed. Show all posts
Showing posts with label failed. Show all posts

Thursday, March 22, 2012

Count ?

Hi, below tells me all of the students who have failed an exam

select emark, surname, forenames from result, student
where emark=0
and result.netid = student.netid;

im looking for the person who has failed six exams
ive tried:

select emark, surname, forenames from result, student
where emark=0
(select count( surname) where surname >6)
and result.netid = student.netid;

but no luck. Iv'e also tried distinct surname as well.
Can someone point me in the right direction.

Thanxselect student.netid, count(*)
from result, student
where emark=0
and result.netid = student.netid
group by student.netid
having count(*) >= 6;|||that does the trick,
thanx alot.sql

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?

Monday, March 19, 2012

Could not open FCB for invalid file ID 46336 in database 'Production'..

For about two hours last evening our database started producing these errors
and various jobs failed.
This morning all seems quiet. However we do rebuild our indexes overnight.
Should we worry about this?
The jobs that failed do not process any text columns (the only mention I
found on microsofts site).
The File ID cannot relate to sysfiles. Does anyone know what is does relate
to?
SQL Server 2000 SP3A.
Hi,
Please run DBCC checktable to see if there are any corruption related errors on this table. Take full database backup before you execute dbcc checktable.
If the output come clear then you do not want to worry any more.
Thanks
Hari
MCDBA
-- Paul Cahill wrote: --
For about two hours last evening our database started producing these errors
and various jobs failed.
This morning all seems quiet. However we do rebuild our indexes overnight.
Should we worry about this?
The jobs that failed do not process any text columns (the only mention I
found on microsofts site).
The File ID cannot relate to sysfiles. Does anyone know what is does relate
to?
SQL Server 2000 SP3A.
|||Thanks Hari
How do I tell which table. I tried offering up the number above as an ID to
sysobjects but nothing came back.
Paul
"Hari" <hari_prasad_k@.hotmail.com> wrote in message
news:F3226200-D6DC-4939-8773-4E5CFC0FA567@.microsoft.com...
> Hi,
> Please run DBCC checktable to see if there are any corruption related
errors on this table. Take full database backup before you execute dbcc
checktable.
> If the output come clear then you do not want to worry any more.
> Thanks
> Hari
> MCDBA
>
> -- Paul Cahill wrote: --
> For about two hours last evening our database started producing these
errors
> and various jobs failed.
> This morning all seems quiet. However we do rebuild our indexes
overnight.
> Should we worry about this?
> The jobs that failed do not process any text columns (the only
mention I
> found on microsofts site).
> The File ID cannot relate to sysfiles. Does anyone know what is does
relate
> to?
> SQL Server 2000 SP3A.
>
>
|||Hi,
I feel that it should be a problem with tempdb. If it is the case no issues.
Anyway can you execute DBCC CHECKDB('dbname') for that database and ensure
no errors.
Thanks
Hari
MCDBA
"Paul Cahill" <XYZpaul.cahillXYZ@.blueyonder.co.uk> wrote in message
news:O0Ga6aBNEHA.2844@.tk2msftngp13.phx.gbl...
> Thanks Hari
> How do I tell which table. I tried offering up the number above as an ID
to[vbcol=seagreen]
> sysobjects but nothing came back.
> Paul
>
> "Hari" <hari_prasad_k@.hotmail.com> wrote in message
> news:F3226200-D6DC-4939-8773-4E5CFC0FA567@.microsoft.com...
> errors on this table. Take full database backup before you execute dbcc
> checktable.
these[vbcol=seagreen]
> errors
> overnight.
> mention I
does
> relate
>
|||I was starting to suspect as much.
Let's just assume this never happened
Paul
"Hari" <hari_prasad_k@.hotmail.com> wrote in message
news:Oom$kfBNEHA.3420@.TK2MSFTNGP11.phx.gbl...
> Hi,
> I feel that it should be a problem with tempdb. If it is the case no
issues.
> Anyway can you execute DBCC CHECKDB('dbname') for that database and ensure
> no errors.
> Thanks
> Hari
> MCDBA
>
> "Paul Cahill" <XYZpaul.cahillXYZ@.blueyonder.co.uk> wrote in message
> news:O0Ga6aBNEHA.2844@.tk2msftngp13.phx.gbl...
> to
> these
> does
>

Could not open FCB for invalid file ID 46336 in database 'Production'..

For about two hours last evening our database started producing these errors
and various jobs failed.
This morning all seems quiet. However we do rebuild our indexes overnight.
Should we worry about this?
The jobs that failed do not process any text columns (the only mention I
found on microsofts site).
The File ID cannot relate to sysfiles. Does anyone know what is does relate
to?
SQL Server 2000 SP3A.Hi
Please run DBCC checktable to see if there are any corruption related errors on this table. Take full database backup before you execute dbcc checktable.
If the output come clear then you do not want to worry any more
Thank
Har
MCDB
-- Paul Cahill wrote: --
For about two hours last evening our database started producing these error
and various jobs failed
This morning all seems quiet. However we do rebuild our indexes overnight
Should we worry about this
The jobs that failed do not process any text columns (the only mention
found on microsofts site)
The File ID cannot relate to sysfiles. Does anyone know what is does relat
to
SQL Server 2000 SP3A|||Thanks Hari
How do I tell which table. I tried offering up the number above as an ID to
sysobjects but nothing came back.
Paul
"Hari" <hari_prasad_k@.hotmail.com> wrote in message
news:F3226200-D6DC-4939-8773-4E5CFC0FA567@.microsoft.com...
> Hi,
> Please run DBCC checktable to see if there are any corruption related
errors on this table. Take full database backup before you execute dbcc
checktable.
> If the output come clear then you do not want to worry any more.
> Thanks
> Hari
> MCDBA
>
> -- Paul Cahill wrote: --
> For about two hours last evening our database started producing these
errors
> and various jobs failed.
> This morning all seems quiet. However we do rebuild our indexes
overnight.
> Should we worry about this?
> The jobs that failed do not process any text columns (the only
mention I
> found on microsofts site).
> The File ID cannot relate to sysfiles. Does anyone know what is does
relate
> to?
> SQL Server 2000 SP3A.
>
>|||Hi,
I feel that it should be a problem with tempdb. If it is the case no issues.
Anyway can you execute DBCC CHECKDB('dbname') for that database and ensure
no errors.
Thanks
Hari
MCDBA
"Paul Cahill" <XYZpaul.cahillXYZ@.blueyonder.co.uk> wrote in message
news:O0Ga6aBNEHA.2844@.tk2msftngp13.phx.gbl...
> Thanks Hari
> How do I tell which table. I tried offering up the number above as an ID
to
> sysobjects but nothing came back.
> Paul
>
> "Hari" <hari_prasad_k@.hotmail.com> wrote in message
> news:F3226200-D6DC-4939-8773-4E5CFC0FA567@.microsoft.com...
> > Hi,
> >
> > Please run DBCC checktable to see if there are any corruption related
> errors on this table. Take full database backup before you execute dbcc
> checktable.
> > If the output come clear then you do not want to worry any more.
> >
> > Thanks
> > Hari
> > MCDBA
> >
> >
> > -- Paul Cahill wrote: --
> >
> > For about two hours last evening our database started producing
these
> errors
> > and various jobs failed.
> > This morning all seems quiet. However we do rebuild our indexes
> overnight.
> > Should we worry about this?
> >
> > The jobs that failed do not process any text columns (the only
> mention I
> > found on microsofts site).
> >
> > The File ID cannot relate to sysfiles. Does anyone know what is
does
> relate
> > to?
> >
> > SQL Server 2000 SP3A.
> >
> >
> >
>|||I was starting to suspect as much.
Let's just assume this never happened :)
Paul
"Hari" <hari_prasad_k@.hotmail.com> wrote in message
news:Oom$kfBNEHA.3420@.TK2MSFTNGP11.phx.gbl...
> Hi,
> I feel that it should be a problem with tempdb. If it is the case no
issues.
> Anyway can you execute DBCC CHECKDB('dbname') for that database and ensure
> no errors.
> Thanks
> Hari
> MCDBA
>
> "Paul Cahill" <XYZpaul.cahillXYZ@.blueyonder.co.uk> wrote in message
> news:O0Ga6aBNEHA.2844@.tk2msftngp13.phx.gbl...
> > Thanks Hari
> >
> > How do I tell which table. I tried offering up the number above as an ID
> to
> > sysobjects but nothing came back.
> >
> > Paul
> >
> >
> >
> > "Hari" <hari_prasad_k@.hotmail.com> wrote in message
> > news:F3226200-D6DC-4939-8773-4E5CFC0FA567@.microsoft.com...
> > > Hi,
> > >
> > > Please run DBCC checktable to see if there are any corruption related
> > errors on this table. Take full database backup before you execute dbcc
> > checktable.
> > > If the output come clear then you do not want to worry any more.
> > >
> > > Thanks
> > > Hari
> > > MCDBA
> > >
> > >
> > > -- Paul Cahill wrote: --
> > >
> > > For about two hours last evening our database started producing
> these
> > errors
> > > and various jobs failed.
> > > This morning all seems quiet. However we do rebuild our indexes
> > overnight.
> > > Should we worry about this?
> > >
> > > The jobs that failed do not process any text columns (the only
> > mention I
> > > found on microsofts site).
> > >
> > > The File ID cannot relate to sysfiles. Does anyone know what is
> does
> > relate
> > > to?
> > >
> > > SQL Server 2000 SP3A.
> > >
> > >
> > >
> >
> >
>

Could not open FCB for invalid file ID 46336 in database 'Production'..

For about two hours last evening our database started producing these errors
and various jobs failed.
This morning all seems quiet. However we do rebuild our indexes overnight.
Should we worry about this?
The jobs that failed do not process any text columns (the only mention I
found on microsofts site).
The File ID cannot relate to sysfiles. Does anyone know what is does relate
to?
SQL Server 2000 SP3A.Hi,
Please run DBCC checktable to see if there are any corruption related errors
on this table. Take full database backup before you execute dbcc checktable
.
If the output come clear then you do not want to worry any more.
Thanks
Hari
MCDBA
-- Paul Cahill wrote: --
For about two hours last evening our database started producing these errors
and various jobs failed.
This morning all seems quiet. However we do rebuild our indexes overnight.
Should we worry about this?
The jobs that failed do not process any text columns (the only mention I
found on microsofts site).
The File ID cannot relate to sysfiles. Does anyone know what is does relate
to?
SQL Server 2000 SP3A.|||Thanks Hari
How do I tell which table. I tried offering up the number above as an ID to
sysobjects but nothing came back.
Paul
"Hari" <hari_prasad_k@.hotmail.com> wrote in message
news:F3226200-D6DC-4939-8773-4E5CFC0FA567@.microsoft.com...
> Hi,
> Please run DBCC checktable to see if there are any corruption related
errors on this table. Take full database backup before you execute dbcc
checktable.
> If the output come clear then you do not want to worry any more.
> Thanks
> Hari
> MCDBA
>
> -- Paul Cahill wrote: --
> For about two hours last evening our database started producing these
errors
> and various jobs failed.
> This morning all seems quiet. However we do rebuild our indexes
overnight.
> Should we worry about this?
> The jobs that failed do not process any text columns (the only
mention I
> found on microsofts site).
> The File ID cannot relate to sysfiles. Does anyone know what is does
relate
> to?
> SQL Server 2000 SP3A.
>
>|||Hi,
I feel that it should be a problem with tempdb. If it is the case no issues.
Anyway can you execute DBCC CHECKDB('dbname') for that database and ensure
no errors.
Thanks
Hari
MCDBA
"Paul Cahill" <XYZpaul.cahillXYZ@.blueyonder.co.uk> wrote in message
news:O0Ga6aBNEHA.2844@.tk2msftngp13.phx.gbl...
> Thanks Hari
> How do I tell which table. I tried offering up the number above as an ID
to
> sysobjects but nothing came back.
> Paul
>
> "Hari" <hari_prasad_k@.hotmail.com> wrote in message
> news:F3226200-D6DC-4939-8773-4E5CFC0FA567@.microsoft.com...
> errors on this table. Take full database backup before you execute dbcc
> checktable.
these[vbcol=seagreen]
> errors
> overnight.
> mention I
does[vbcol=seagreen]
> relate
>|||I was starting to suspect as much.
Let's just assume this never happened
Paul
"Hari" <hari_prasad_k@.hotmail.com> wrote in message
news:Oom$kfBNEHA.3420@.TK2MSFTNGP11.phx.gbl...
> Hi,
> I feel that it should be a problem with tempdb. If it is the case no
issues.
> Anyway can you execute DBCC CHECKDB('dbname') for that database and ensure
> no errors.
> Thanks
> Hari
> MCDBA
>
> "Paul Cahill" <XYZpaul.cahillXYZ@.blueyonder.co.uk> wrote in message
> news:O0Ga6aBNEHA.2844@.tk2msftngp13.phx.gbl...
> to
> these
> does
>

Thursday, March 8, 2012

Could not find stored procedure 'sp_MSin_<TableName>'

Hi,
Just completed the transactional replication and when tried to test the
changes made in the publisher data it (Distribution Agent) failed with the
following error:
Could not find stored procedure 'sp_MSupd_ACCOUNT'.
(Source: PARISDB2 (Data source); Error number: 2812)
Checked the sysobjects and all these procedures (sp_MSins, sp_MSupd etc) are
present in the database.
Current Configuration is: 1 Publisher, 1 Subscriber, Distributor database is
on the Publisher server, SQLServer 2000 (SP4), Windows 2003)
Please help me out....need to know the reason and the solution
Thanks & Regards
Sangra
Hi Sangra
This problem will happen when the snapshot schema is not applied on the
subscriber.
You can generate the scripts manually using the following procedure
exec sp_scriptinsproc 'articleid'
exec sp_scriptdelproc 'articleid'
exec sp_scriptmappedupdproc 'articleid'
Apply this script on the subscriber.
For getting the articleid check sysarticles table.
P. Srinivasan MCDBA
Consultant
C-13/1,GF,Tulip Garden, Ardee City,
Sector-52,
Gurgaon-122003
India
Mobile:+91-9810321551
"Sangra" <Sangra@.discussions.microsoft.com> wrote in message
news:1A700079-F991-4D00-82A6-756AF23CC16E@.microsoft.com...
> Hi,
> Just completed the transactional replication and when tried to test the
> changes made in the publisher data it (Distribution Agent) failed with the
> following error:
> Could not find stored procedure 'sp_MSupd_ACCOUNT'.
> (Source: PARISDB2 (Data source); Error number: 2812)
> Checked the sysobjects and all these procedures (sp_MSins, sp_MSupd etc)
> are
> present in the database.
> Current Configuration is: 1 Publisher, 1 Subscriber, Distributor database
> is
> on the Publisher server, SQLServer 2000 (SP4), Windows 2003)
> Please help me out....need to know the reason and the solution
> Thanks & Regards
> Sangra