Database in Suspect Mode in SQL Server 2000 Log Shipping Environment
Hi All
We have movement of SQL Server 2000 at physical level. We have disable jobs and stop Agent and SQL Server services.
After moved the server we have started the server and then start SQL Server 2000 services.
All of databases in SUSPECT mode. Files are in correct folders as were before shutdown the server
What shall I do e.g. why databases come up in SUSPECT mode? what to check and how to get database live?
Pls help it is critical...
Thanks in Advance
All of databases in SUSPECT mode. Files are in correct folders as were before shutdown the server
What shall I do e.g. why databases come up in SUSPECT mode? what to check and how to get database live?
Pls help it is critical...
Thanks in Advance
Hello,
Did you made sure no transactions like restore logs were running when you stopped SQL server service or agent .I have seen in SQL 2000 an abrupt stop of SQL Server agent when its doing a process can sometimes force database in suspect mode.
I would like you to get your disk analyzed by vendor ASAP for any fault in disk at first go it seems to me an underlying hardware issue.
Please can you check errorlog and event viewer to find out any possible cause for database going into suspect mode
I always suggest to use Backup and restore method of recovery to get out from suspect database problem.If you dont have then you can move with DBCC Checkdb and various repair options but be sure
DATA LOSS might be possible when you use repair allow data loss and repair_rebuild removes constraints.
hope this helps
Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers
Similar Messages
-
Creation of database link from oracle to sql server 2000
Hi
I need to create a database link from oracle to sql server 2000.Assuming your Oracle database is running on Windows, you can set up a database link using ODBC using Heterogeneous Services and Generic Connectivity, but there are some functional limitations (i.e. no two-phase commits). If you can live with those limitations but aren't on Windows, you can generally purchase an ODBC driver for your operating system that will connect to SQL Server through someone like DataDirect and still use Generic Connectivity. If you cannot live with those limitations, you can purchase one of Oracle's Transparent Gateway products (though this can get somewhat pricey).
What version of Oracle are you on?
What operating system(s) are you using?
What are you going to use the database link for?
Justin -
When a database is last used in SQL Server 2000.
Hi,
Need to create one script by which I can get my any of the database lastly used, which is running on SQL Server 2000 lastly used.
Lets say if I have 100 databases running on SQL Server 2000, then using one query I can get all the databases last access date.
I dont want to implement audits because that will give only the result after audit setup.
Thanks In Advance
Regards, Ashish TripathiAgree with Erland.
There is no "column" in sys.databases till now. I would suggest you to vote for this feature.
https://connect.microsoft.com/SQLServer/feedback/details/659846/database-last-accessed-time
Balmukund Lakhani
Please mark solved if I've answered your question, vote for it as helpful to help other users find a solution quicker
This posting is provided "AS IS" with no warranties, and confers no rights.
My Blog |
Team Blog | @Twitter
| Facebook
Author: SQL Server 2012 AlwaysOn -
Paperback, Kindle -
Creating Database link from Oracle9i to SQL server 2000
Pls how do I create connectivity from Oracle9i database to query a table in an SQL server 2000 database.
Pls I need the necessary steps to take.
ThanxThere are 2 solutions that you can use:
1) Transparent Gateway for SQL Server
2) Generic Connectivity
Generic Connectivity is free with the database but has less features than the Gateway. For Generic Connectivity you will need to obtain an ODBC driver.
The steps for using the gateway are available in the gateway manual and the steps for using Generic Connectivity is available in Chap 7 of the Heterogeneous Connectivity Administrator's Guide. -
JSP, Sql Server 2000 Driver, classpath
Hello All,
I've got a really weird problem here.
I want to connect a JSP page to a SQL Server 2000 database.
I downloaded the SQL Server 2000 Driver for JDBC, and it seems to have installed fine.
Next I write a regular java program to test the connection. It works fine, I get a "Connection Successful message". Here' the code:
import java.sql.*;
public class MSSqlServerJDBCTest {
public static void main( String args[] ) {
Connection conn;
if ( args.length != 3 ) {
System.out.println( "Usage: java MSSqlServerJDBCTest "
+ "<server> <username> <password>" );
} else {
try {
String serverName = args[ 0 ];
String userName = args[ 1 ];
String password = args[ 2 ];
String connStr = "jdbc:microsoft:sqlserver://"
+ serverName + ":1433";
Class.forName( "com.microsoft.jdbc.sqlserver.SQLServerDriver" );
conn = DriverManager.getConnection(
connStr, userName, password );
System.out.println( "Connection successful" );
conn.close();
catch ( SQLException e ) {
System.err.println( "SQL Exception: " + e.getMessage() );
catch( ClassNotFoundException e ) {
System.err.println( "SQL Server JDBC Driver Not Found!!" );
}Now, when I include similar into a JavaBean, which is used in a JSP, I get a classNotFound exception:
Exception occured: java.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriverSo then I checked out the classpath a few times using echo %classpath%
Everything seemed okay, the driver jars are in the path, but the JSP can't find the driver.
I looked at the System.out file in the j2sdkee1.3.1\logs..... directory.
The start of the file contains this stuff:
Logging for J2EE Server Version: 1.3.1-b17 started at: Fri Nov 08 17:31:53 GMT 2002..
Using the Java HotSpot(TM) Client VM and the version number 1.3.1_02 from Sun Microsystems Inc..
VM is using the classpath: c:\j2sdkee1.3.1\lib\system\cloudscape.jar;c:\j2sdkee1.3.1\lib\system\tools.jar;c:\j2sdkee1.3.1\lib\cloudscape\RmiJdbc.jar;c:\j2sdkee1.3.1\lib\cloudscape\cloudclient.jar;c:\j2sdkee1.3.1\lib\classes;c:\j2sdkee1.3.1\classes;c:\j2sdkee1.3.1\lib\j2ee.jar;c:\j2sdkee1.3.1\lib\toolclasses;c:\j2sdkee1.3.1\lib\j2eetools.jar;c:\j2sdkee1.3.1\lib\locale;;c:\jdk1.3.1_02\lib\tools.jar;c:\j2sdkee1.3.1\lib\jhall.jar .
J2EE Home Directory has been set to: c:\j2sdkee1.3.1.Look at the classpath - its different from when I do an echo %classpath% from the command line. Notice also it DOESN'T contain the driver jars that I need. This is probably why I can connect from a regular java program, but not from within J2EE.
So where does this leave me? How can I change the classpath so that the changes are seen from within the J2EE container?
Please help,
Thanks in advance,
RuzerI modified the C:\j2sdkee1.3.1\bin\userconfig.bat file with the line:
set J2EE_CLASSPATH=c:\sqldriver\msutil.jar;c:\sqldriver\mssqlserver.jar;c:\sqldriver\msbase.jarI had to change the location of the MS SQLServer 2000 driver cos J2EE.bat wouldn't start with the original location. I don't think it liked the spaces.
Now I get a different exception:
java.security.AccessControlException: access denied (java.lang.RuntimePermission modifyThreadGroup)
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:272)
at java.security.AccessController.checkPermission(AccessController.java:399)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:545)
at com.sun.enterprise.J2EESecurityManager.checkAccess(J2EESecurityManager.java:46)
at java.lang.ThreadGroup.checkAccess(ThreadGroup.java:279)
at java.lang.Thread.init(Thread.java:265)
at java.lang.Thread.(Thread.java:330)
at com.microsoft.jdbc.base.BaseGarbageThread.(Unknown Source)
at com.microsoft.jdbc.base.BaseGarbageThread.EnsureRunning(Unknown Source)
at com.microsoft.jdbc.base.BaseConnection.open(Unknown Source)
at com.microsoft.jdbc.base.BaseDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(DriverManager.java:517)
at java.sql.DriverManager.getConnection(DriverManager.java:177)
at org.apache.jsp.databaseJSP$jsp._jspService(databaseJSP$jsp.java:70)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)not sure why!
Ruadhan -
How do i get a backed up db on sql server 2000 be restored on sql server 2014 express
Is there a way with this? I'm getting a message that it is not supported when i'm trying to restore it.
Is there a way that I could at least get the data on backed up db on sql server 2000 be transfer to sql server 2014 express if restoring is really not supported?
Any advice is highly appreciated.You can restore first on any SQL Server 2008 or SQL Server 2008 R2 instance. This will only be used to convert the database backups from the older SQL Server 2000
format which can’t be restored to SQL Server 2014 to the newer SQL Server 2008 / R2 format which can be.
http://sqlmag.com/sql-server-2014/sql-select-steps-migrate-sql-server-2000-sql-server-2014 -
Not able to connect to database(MS SQL Server 2000) through JSTL tag
Hi,
I just want to retrieve some data from the database through a JSP page.I am using JSTL tags the code is as shown below. Whenever i execute this code i get an error message like this
My Code:
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>
<%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql_rt" %>
<sql:setDataSource var="datasource"
driver="com.microsoft.jdbc.sqlserver.SQLServerDriver"
url="jdbc:mssqlserver:sqlserver://SYS57:1433;DatabaseName= sree"
user=" "
password=" "/>
<sql:query var="res" dataSource="${datasource}">
SELECT * FROM books
</sql:query>
<html>
<head>
<title>A First JSP Database</title>
</head>
<body>
<table border="1">
<tr>
<td>id</td><td>title</td><td>price</td>
</tr>
<c:forEach items="${res.rows}" var="row">
<tr>
<td><c:out value="${row.id}" /></td>
<td><c:out value="${row.name}" /></td>
<td><c:out value="${row.author}" /></td>
</tr>
</c:forEach>
</table>
</body>
</html>error is this:
javax.servlet.ServletException: Unable to get connection, DataSource invalid: "No suitable driver"
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:848)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:781)
org.apache.jsp.firstdb_jsp._jspService(org.apache.jsp.firstdb_jsp:93)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)root cause
javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: "No suitable driver"
org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.getConnection(QueryTagSupport.java:308)
org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.doStartTag(QueryTagSupport.java:192)
org.apache.jsp.firstdb_jsp._jspx_meth_sql_query_0(org.apache.jsp.firstdb_jsp:132)
org.apache.jsp.firstdb_jsp._jspService(org.apache.jsp.firstdb_jsp:68)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)I am not clear with url attribute of setDatasource tag... I feel the error is because of that line only..... Kindly tell me how to specify the jdbc URL for MS SQL Server 2000 while using JSTL tags for connection.
Thanks,
Akshathaunable to rectify the error........ tried lot but all in vain...still trying........
my current code is:
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>
<%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql_rt" %>
<sql:setDataSource var="datasource" driver="com.microsoft.jdbc.sqlserver.SQLServerDriver"
url="jdbc:microsoft:sqlserver://SYS57:1433;databaseName=sree" user="sa"
password="dfgdfg"/>
<sql:query var="res" dataSource="${datasource}">
SELECT * FROM books
</sql:query>
<html>
<head>
<title>A First JSP Database</title>
</head>
<body>
<table border="1">
<tr>
<td>id</td><td>title</td><td>price</td>
</tr>
<c:forEach items="${res.rows}" var="row">
<tr>
<td><c:out value="${row.id}" /></td>
<td><c:out value="${row.name}" /></td>
<td><c:out value="${row.author}" /></td>
</tr>
</c:forEach>
</table>
</body>
</html>Thanks,
Akshatha -
Problem of Teststand3.1 database and microsoft SQL Server 2000 personal edition
I have a problem when using teststand database function with Microsoft sql server 2000. the error(seen in attached screenshot3.jpg) is:
"An error occurred calling 'LogResults' in 'ITSDBLog' of 'DBLog 1.0 Type Library'
An error occurred executing a statement.
Schema: Generic Recordset (NI).
Statement: UUT_RESULT.
[Microsoft][ODBC SQL Server Driver][SQL Server]unable to insert NULL value to column "ID", table "test.dbo.UUT_RESULT";This column is not alowed to be blank. INSERT Failed. Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.
[Microsoft][ODBC SQL Server Driver][SQL Server]terminated.
Source: TSDBLog"
Here I listed my proceess.
1, Configure in SQL Sever, please see attached screenshot0.jpg
a, Open SQL
b, build a new database with the name of test
c, import the data from "C:\Program Files\National Instruments\TestStand 3.1\Components\NI\Models\TestStandModels\Database\TestStand Results.mdb"
2, Configure Microsoft SQL sever: please see attached screenshot1.jpg
a, Open windows Control Panel and select "Data Sources (ODBC). Under system DSN tab, add a SQL server data source
3, Configure teststand database option, see attached screenshot2.jpg
a, configure logging option, enable
b, configure datalink
c, select schemas of "Generic recordset (NI)
d, No change on the tabs of "statements" and "Columns/Parameters"
4, run an seqence file with the proess model of SequentialModel.Seq.
Attachments:
Screenshot.zip 425 KBThanks Scott,
The database function is OK now after I changed imported tables in SQL Sever.
Actually, I once tried anothor method that you refered by using the scripts
located at: <TestStand>\Components\NI\Models\TestStandModels\Database\SQL Server Create Generic Recordset Result Tables.sql. Attached is the error screenshots, please help me on this.
Thanks
Jacky
Attachments:
Error.jpg 59 KB -
Errors while Changing the Database to Mutli User Mode from Single user mode in SQL Server 2012
Hi,
Good Afternoon :). Need your help in resolving one of the issue with SQL Server 2012.
Today, we kept one of the database in the Single User mode and wanted to bring back to Multi User mode. But we are getting the below error. There are no user sessions connected to this database which are blocking each other. I see multiple
SYSTEM sessions are in blocked state. The blocking is not cleared even affter restarting the SQL services.
Verified the SQL Server Errorlog and couldnt get much useful information to troubleshoot the issue.
pasted the information from the sys.sysprocesses as well for your kind reference.
Msg 1205, Level 13, State 68, Line 1
Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
Msg 5069, Level 16, State 1, Line 1
ALTER DATABASE statement failed.
spid
kpid
blocked
waittype
waittime
dbid
login_time
status
cmd
18
1004
36
0x0005
144
5
4/9/2014 13:13
background
TASK MANAGER
35
1796
36
0x0005
35
5
4/9/2014 13:34
background
TASK MANAGER
36
2464
37
0x0005
363
5
4/9/2014 13:34
background
TASK MANAGER
37
5100
36
0x0005
254
5
4/9/2014 13:04
background
TASK MANAGERClearly 36 and 37 are causing deadlock.
see
https://www.simple-talk.com/sql/database-administration/handling-deadlocks-in-sql-server/
http://www.mssqltips.com/sqlservertip/1036/finding-and-troubleshooting-sql-server-deadlocks/
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs -
How can i connect to a SQL Server 2000 database usgin JSP?
I need (URGENT) to connect to SQL Server 2000 databse using JSP. I do not know how to program using JSP, so if anyone has any code snippet please let me see it. What i need is to give my site some login/password security.
Anyone?
Thx.just create an ODBC of your database from control pannel -> administrative tools -> data sources (ODBC) ,double click it .....
go to the tab SYstem DSN , click on ADD button. select the driver for your connection. it will be the last one in the list "SQL Server".
click Next then give ur DSN name there, description and Server Name , on next give your username and password of SQL server. when it will be connected to the server celect your database from there and hence there will be an ODBC bridge same as in case of MS Access.
code for connecting to ODBC is
// DSN-NAME same as in System DSN.
// username and password are of your databse
try
url = "jdbc:odbc:DSN-NAME";
Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver" );
connect = DriverManager.getConnection( url,"username","password" );
catch ( ClassNotFoundException cnfex ) {
setErrorMsg( cnfex.getMessage() );
catch ( SQLException sqlex ) {
setErrorMsg( sqlex.getMessage() );
catch ( Exception ex ) {
setErrorMsg( ex.getMessage() );
Now you are connected to the SQL Server ..... use connect object for further processing ......... -
Database Connection in SQL Server 2000
Hi All!
I would like to ask your expertise regarding JDBC-MS SQL Server 2000.
I have here a sample code in connecting to SQL Server 2000, AgriMrpPrd Database using the account "sa" and the password "092802". I have tried running the code in my local server at home and It successfully runs, but when I tried running it on my local server in the office, I was not able to create a connection object though I already have changed the HOST, PORT, DATABASE, USERNAME, and PASSWORD values.
I have tried logging in using my local account, removed the LAN connection, start my local server and tried connecting to it but still it does not work.
I have tried turning the firewall OFF and try reconnecting but it there was no improvement.
I do not know if there is a difference if there is my computer is on a DOMAIN (althought I am only connecting to my local server).
Source Code:
import javax.swing.*;
import java.sql.*;
import com.microsoft.jdbc.sqlserver.*;
public class SQLServerConnection{
public String un, pw, db, host, port, url, driver;
public Connection conn=null;
public void connectDB(){
String msg="",title="MS SQL Server - JDBC:ODBC Connection";
int msgType=0;
driver="com.microsoft.jdbc.sqlserver.SQLServerDriver";
host="206.101.216.95";
port="1433";
un="sa";
pw="092803";
db="AgriMrpPrd";
url="jdbc:microsoft:sqlserver://" + host + ":" + port + ";DatabaseName=" + db;
try{
Class.forName(driver);
conn=DriverManager.getConnection(url,un,pw);
System.out.println("Connected to Database!");
}catch(Exception ex){
msg="Unable to connect to MS SQL Server!";
msgType=JOptionPane.ERROR_MESSAGE;
JOptionPane.showMessageDialog(null,msg,title,msgType);
System.exit(0);
public static void main(String args[]){
SQLServerConnection ssc=new SQLServerConnection();
ssc.connectDB();
Please give me wisdom in handling this problem...
Take care always and God blesss
MADzHi All!
I would like to ask your expertise regarding JDBC-MS
SQL Server 2000.
I have here a sample code in connecting to SQL Server
2000, AgriMrpPrd Database using the account "sa" and
the password "092802". I have tried running the code
in my local server at home and It successfully runs,
but when I tried running it on my local server in the
office, I was not able to create a connection object
though I already have changed the HOST, PORT,
DATABASE, USERNAME, and PASSWORD values.If the code runs in one place and not the other, it's got to be a problem with seeing the host.
I have tried logging in using my local account,
removed the LAN connection, start my local server and
tried connecting to it but still it does not work.
I have tried turning the firewall OFF and try
reconnecting but it there was no improvement.
I do not know if there is a difference if there is my
computer is on a DOMAIN (althought I am only
connecting to my local server).I have no idea how to fix your problem, but there are several things to comment on about your code:
(1) You don't have to import the microsoft package. It's actually a bad idea.
(2) I'd name this class DbConnection, because if you wrote it properly it might have a chance of being useful wih other databases, too.
(3) You hardwire all the connection information. Better to pass it in so changing the database doesn't require a recompile.
(4) It's bad to mingle Swing and database code. Take those JOptionPane calls out.
(5) Print the stack trace out when you catch an exception. You're losing a lot of information by handling it that way.
% -
How to Migrate my database from SQL Server 2000 to Oracle
I want to transfer my database from SQL Server 2000 to Oracle, Can I do this without using Oracle Migration Workbench ??
Please help me.
Thanks in advance
Vicky... :-)Do you have a good technical reason for not wanting to use the Migration Workbench?
Given that it's free and does a hell of a lot of the work for you, why wouldn't you use it?
Other than that, I would say you would be on your own...
cheers,
Anthony -
SQL Server 2000 auditing on DML changes on user tables to user databases
Please let me know if you know if there is any procedure or steps to determine DML changes on user tables in database.
Hello,
You can use triggers as shown in the following article:
http://sqlserver2000.databases.aspfaq.com/how-do-i-audit-changes-to-sql-server-data.html
You may also consider third party tools that may still support SQL Server 2000. The following tool supported SQL Server 2000 a few years
ago, not sure about today:
http://www.apexsql.com/sql_tools_comply.aspx
Server side traces may be another option:
http://msdn.microsoft.com/en-us/library/cc293613.aspx
Hope this helps.
Regards,
Alberto Morillo
SQLCoffee.com -
How to transfer database tables from sql server 2000 to oracle 10g
Hi,
I have a database and tables in sql server 2000. I have to transfer those data to Oracle 10g. I have installed Oracle warehouse Builder ETL Tool. Using this how can i transfer data. Any help is vary helpful for me.
Thanks in advance.you have to do it using ODBC HS.
1. Configure ODBC connection through gateway.
2. Create a initxxx.ora file with HS config.
restart gateway listener services
3. on target o/s add entries to your tnsnames.ora
4. On your target o/s create a db link
restart listener on target
cheeck this out.Non-Oracle connection through HS issue
Edited by: Darthvader-647181 on Jan 29, 2009 2:02 AM -
SQL Server 2000 database GETDATE() default for field
I have a SQL Server 2000 database where the createDate field
has a default value of GETDATE() and the data type is datetime. It
is inserting the date just fine, but I do not want to capture the
time along with the date. I only want the date to be entered. How
can I accomplish this? Thanks!IF you only wanted to store the date, then yes you would use
that as the column default value.
createDate datetime default convert(datetime,
convert(varchar, getDate(), 102), 102)
However, as paross1 cautioned be sure you understand you will
only be capturing the date from now on. If you change your mind
later, and decide you need both the created date and time, you will
be seriously out of luck. A safer choice might be to keep the date
and time, and use convert in your queries instead.
Maybe you are looking for
-
I need to connect an external webcam to an iPad two, is this possible?
I need to connect an external webcam to my ipad two. Any idea if this is possible and how do you do it?
-
Issues about labview 2009 applicatio​n builder
first of all, sorry for my poor English ~~~i am not quite sure about whether i could make myself clear for you guys.here it is: SFX-ZIP archive is choosed as the file format for built-exe in labview 2009.when building any project into exe in labview
-
HD Not shown after "Others" set to "None"
Ok, i was setting up a new login for my sister to use my computer and i dont want her accessing my secondary hard drive, so i set the "Others" permission to "none" on the HD icon itself. Now my HD is not visible anywhere on any login and no files can
-
Hello, I went vacation and in the middle of this, in the hotel pc, i put my pictures on the ipad in order to empty my camera card. When I came back I`ve put the Ipad to sync with my home pc and the ipad deleted all the pictures. Is there a way to rec
-
systemd-fsck show message when boot evertime. What does meaning? And how to hidding them. systemd-fsck[145]: /dev/sda4: clean, 112977/9296096 files, 185427/21217024 blocks systemd-fsck[151]: /dev/sda1: clean, 345/26104 files, 34083/104388 blocks (che