Showing posts with label connect. Show all posts
Showing posts with label connect. Show all posts

Thursday, March 29, 2012

Database in project

I'm using C#.Net 1.1 and i have a sample database inside my project (the actual database is in a folder in the project) and I simply want to connect tot the database inside the project and select and process data. i'm normally connecting to external databases so i'm kind of at a loss as to how i should connect to the database in the project (it's the Northwind Database and I'm using sql server 200).

any advice greatly appreciated.

In asp.net 2.0 you would add the database to the app_code folder

In asp.net 1.1 youll need to attach the db to sql server and query using a connection string.

Do you need help in attaching the db to sql server?

Cheers
Gregor

|||Yes, how do I attach the database to sql server?|||

Hi Myron

Do you have the database as an mdf file or do you have database scripts?

Cheers
Gregor

|||i have the database as an mdf file (Northwind.mdf)|||

The latest on this: in VS 2003 i went to Server Explorer to "Add Connection" . I am entering the following values (please not <addconnection> tags indicate start and end:

<ADDConnection>

Select or enter server name: (localhost)

Enter information to log onto server: chose "Use Windows NT integrated security)

Select the database on the server:

Attach a db file...: Northwind

Using the filename: C:\SQL Server 2000 Sample Databases\NORTHWND.MDF

</AddConnection>

But when i go to test the connection I am getting the following error:

<ERROR>

Test connection failed because of an error in initializing provider. [DBNETLIB].[ConnectionOpen (Connect()).]SqlServer does not exist or access denied.

</ERROR>

do you know that this means? the db exists so i now assume that I have to check the rights on the database...

Any help on this greatly appreciated

Wednesday, March 21, 2012

database engine giving problems

i installed sql server 2005 but i am unable to connect to the database engine. An error message appears saying :

===================================

Cannot connect to mssqlserver.

===================================

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (.Net SqlClient Data Provider)


For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=53&LinkId=20476


Error Number: 53
Severity: 20
State: 0

Program Location:

at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Connect(Boolean& useFailoverPartner, Boolean& failoverDemandDone, String host, String failoverPartner, String protocol, SqlInternalConnectionTds connHandler, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject, Boolean aliasLookup)
at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.ObjectExplorer.ValidateConnection(UIConnectionInfo ci, IServerType server)
at Microsoft.SqlServer.Management.UI.ConnectionDlg.Connector.ConnectionThreadUser()

I am using win xp x64 edition

Hi,

sounds like the old proble, you either have a typo in your connectionstring / server name (and eventually port or instance name) or you have to enable remote connections to access your server.

http://www.sqlserver2005.de/SharedFiles/remoteconnection.jpg

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de

Monday, March 19, 2012

Database Engine Connection Error.

I got the sql2005 std edition at the msdn rollout, and the vs2005 studio. I uninstalled sql2000 and now, cannot connect to the database engine.

I get the following error message with a link to an page that offers no info. What's up and how can I get it to work? Please, help.

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 2)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=2&LinkId=20476

Some questions which can help troubleshoot the real cause:

1) because uninstalalation of SQL2000, could you connect to SQL2005 STD?

2) Check the remote connection setting in SQL Server Surface Area Configuration for Services and Connections, note you need to restart SQL after changing the remote connection settings there.

3) Do you installed as named instance, if you could you check if the sqlbrowser service is enabled and running?

|||

Hi hungfut

I am also getting the same error.

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 2)

When I try to connect to SQL Server Surface Area Configuration I am getting the following error.

Specified argument was out of the range of valid values.
Parameter name: index (System.Windows.Forms)

Because of this I could not verify the remote connection setting.

My named pipe instance are set to default (\\.\pipe\sql\query). Aslo IP1 & IP2 is enabled.

The SQL erver was running well. Until I installed the SP1. My SQl server is standard version. Please help me in this regard.

-Nitu

Database Engine Connection Error.

I got the sql2005 std edition at the msdn rollout, and the vs2005 studio. I uninstalled sql2000 and now, cannot connect to the database engine.

I get the following error message with a link to an page that offers no info. What's up and how can I get it to work? Please, help.

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 2)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=2&LinkId=20476

Some questions which can help troubleshoot the real cause:

1) because uninstalalation of SQL2000, could you connect to SQL2005 STD?

2) Check the remote connection setting in SQL Server Surface Area Configuration for Services and Connections, note you need to restart SQL after changing the remote connection settings there.

3) Do you installed as named instance, if you could you check if the sqlbrowser service is enabled and running?

|||

Hi hungfut

I am also getting the same error.

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 2)

When I try to connect to SQL Server Surface Area Configuration I am getting the following error.

Specified argument was out of the range of valid values.
Parameter name: index (System.Windows.Forms)

Because of this I could not verify the remote connection setting.

My named pipe instance are set to default (\\.\pipe\sql\query). Aslo IP1 & IP2 is enabled.

The SQL erver was running well. Until I installed the SP1. My SQl server is standard version. Please help me in this regard.

-Nitu

Database Engine Connection Error.

I got the sql2005 std edition at the msdn rollout, and the vs2005 studio. I uninstalled sql2000 and now, cannot connect to the database engine.

I get the following error message with a link to an page that offers no info. What's up and how can I get it to work? Please, help.

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 2)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=2&LinkId=20476

Some questions which can help troubleshoot the real cause:

1) because uninstalalation of SQL2000, could you connect to SQL2005 STD?

2) Check the remote connection setting in SQL Server Surface Area Configuration for Services and Connections, note you need to restart SQL after changing the remote connection settings there.

3) Do you installed as named instance, if you could you check if the sqlbrowser service is enabled and running?

|||

Hi hungfut

I am also getting the same error.

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 2)

When I try to connect to SQL Server Surface Area Configuration I am getting the following error.

Specified argument was out of the range of valid values.
Parameter name: index (System.Windows.Forms)

Because of this I could not verify the remote connection setting.

My named pipe instance are set to default (\\.\pipe\sql\query). Aslo IP1 & IP2 is enabled.

The SQL erver was running well. Until I installed the SP1. My SQl server is standard version. Please help me in this regard.

-Nitu

Thursday, March 8, 2012

Database Diagram in VS 2005 for SQL Express 2005

I have installed VS 2005 (Beta 2.050215-4400) and SQL Server 2005 CTP (File Version 9.00.1187.07).

I can connect to the SQLEXPRESS database and created tables from the VS 2005. But when I try to click the + to expand the database diagram folder I get the following window:
Microsoft Visual Studio

This server does not have one or more of the database objects required to use database diagramming. Do you wish to create them?

Yes No Help
After I select yes, I get the following error message:

Microsoft Visual Studio

Could not obtain information about windows NT group/user 'xxxx/xxxx', error code 0x5.

OK

The + next to the database diagrams folder disappears. I select the "Add new diagram" menu item from the database diagram folder. I able to add tables to the database diagram. But when I try to save the database diagram, I get the following error message:


Microsoft Visual Studio

(Exception from HRESULT: 0x80131904)

OK
Does any one know why?

This is a pretty old build of VS (Feb) and I believe we still had some issues back then.

Tuesday, February 14, 2012

Database crashed its very urgent

Hi All,
one of my database is suddenly crashed with power fluctuation and when i
started the server it is showing "not able to connect database". I have take
n
backup and i was trying to attach database in other system. It has given me
the following error.
Microsoft SQL-DMO (ODBC SQLState: HY000)
--
Error 9003: The LSN (375:9588:1) passed to log scan in database
'QVLMSCASPARES' is invalid.
--
OK
--
Please any one can help me out.
With Regards,
AHARIHari
>I have taken
> backup and i was trying to attach database in other system. It has given m
e
> the following error.
You can recover the data wont attach it. You will attach only if you
have.mdf files with you.
When did you take back up.waht kind of back up( full,differential,log) what
is your recovery model.when did you take master back up.
above information is needed to suggest you right one.
Regards
R.D
--
Regards
R.D
--Knowledge gets doubled when shared
"Srihari" wrote:

> Hi All,
> one of my database is suddenly crashed with power fluctuation and when i
> started the server it is showing "not able to connect database". I have ta
ken
> backup and i was trying to attach database in other system. It has given m
e
> the following error.
> --
> Microsoft SQL-DMO (ODBC SQLState: HY000)
> --
> Error 9003: The LSN (375:9588:1) passed to log scan in database
> 'QVLMSCASPARES' is invalid.
> --
> OK
> --
>
> Please any one can help me out.
> With Regards,
> AHARI|||once the database has crashed i have stopped sqlserver and took the copy of
the microsoft sqlserver directory under program files and kept it in other
location.
I think i am having master back up also.
How can i retrieve the data.
With Regards,
AHARI
"R.D" wrote:
> Hari
> You can recover the data wont attach it. You will attach only if you
> have.mdf files with you.
> When did you take back up.waht kind of back up( full,differential,log) wha
t
> is your recovery model.when did you take master back up.
> above information is needed to suggest you right one.
> Regards
> R.D
> --
> Regards
> R.D
> --Knowledge gets doubled when shared
>
> "Srihari" wrote:
>|||Only God should save you . Back up is different from taking copy of file
after crash.
what kind of crash did you observe.
In the folder you wil find .mdf files
go to enterprise manager, and try to attach it, If you are lucky then you
should get your data.
At least hereafter, take back up in appropriate times. do read BOL
--
Regards
R.D
--Knowledge gets doubled when shared
"Srihari" wrote:
> once the database has crashed i have stopped sqlserver and took the copy o
f
> the microsoft sqlserver directory under program files and kept it in other
> location.
> I think i am having master back up also.
> How can i retrieve the data.
> With Regards,
> AHARI
> "R.D" wrote:
>|||Hi R D
God Helped me!... I had backup of one days prior and i have re entered the
data for one day. some how system is up but in these situations is there an
y
other way to resolve instead of re entering.
With Regards,
AHARI
"R.D" wrote:
> Only God should save you . Back up is different from taking copy of file
> after crash.
> what kind of crash did you observe.
> In the folder you wil find .mdf files
> go to enterprise manager, and try to attach it, If you are lucky then you
> should get your data.
> At least hereafter, take back up in appropriate times. do read BOL
> --
> Regards
> R.D
> --Knowledge gets doubled when shared
>
> "Srihari" wrote:
>|||Yes, that's what transaction log backups are for. Do you have log
backups? If not, then consider implementing them for next time. Read
about transaction log backups in Books Online.
Also, invest in a UPS if you haven't already done so. A database server
needs to be protected from power fluctuations.
David Portas
SQL Server MVP
--|||thanks for you suggestion. I am trying to get the procedure to retrieve data
from crashed database. No one is helping me in that way. Actually this
incident had happend at one of our client place.
At least now can any one tell me how to retrieve data from crashed database.
I tried in google i got some article which is not so clear. if i get the
master also along with crashed database that is LDF and MDF how to retrieve
the data tell me the procedure in detail.
Clients are using UPS too. The database is running from past 4 years.
I felt that News group MVPs will respond quickly and take the matter
serious. Hear i am seeing they are taking it lite and making fun of me.
with Regards,
AHARI
"David Portas" wrote:

> Yes, that's what transaction log backups are for. Do you have log
> backups? If not, then consider implementing them for next time. Read
> about transaction log backups in Books Online.
> Also, invest in a UPS if you haven't already done so. A database server
> needs to be protected from power fluctuations.
> --
> David Portas
> SQL Server MVP
> --
>|||I am not making fun of you. You said in a previous post that you had
already recovered the database so I understood that you didn't need
more help on that. I was answering your specific question about how to
recover additional data by asking for more information on whether you
have a log backup. You didn't answer that question unfortunately.
As I understand it you have restored an old database backup to another
server but you still have a copy of the latest MDF and LDF files
available. It isn't possible to apply the transaction log to a database
that is online and in a recovered state. To apply the transaction log
you first have to restore from a full database backup with the
NORECOVERY option. Only then can you start to restore transaction log
backups, assuming you have them.
To restore the master database you have to first put the database into
single user mode. Only attempt to restore master on either the server
that the backup was originally taken from or on a clean install of SQL
Server.
Have you tried re-attaching the MDF and LDF files as suggested by RD?
That should be your first course of action. There is an example of how
to re-attach under the sp_attach_db topic in Books Online. If you can
attach the database successfully then you are in luck. Take a backup
immediately, run DBCC CHECKDB and then you are back in business
hopefully.
If you re-attach your database but it is marked as "suspect" then
things are bit less rosy to say the least. I recommend you contact
Microsoft support directly as there are no documented solutions and the
possible fixes are not without their own risks. I don't want to suggest
anything that may make things worse.
Relevant articles in Books Online:
"sp_attach_db"
"Restoring the master Database"
"How to restore to the point of failure"
Hope this helps.
David Portas
SQL Server MVP
--|||Hello David portas,
Thanks you for your quick response.
If you see my first posting I have clearly mentioned that, i am attaching
database in other system and mentioned the error message too.
Ok. According to your reply if i get this error i cant retrieve data back.
"David Portas" wrote:

> I am not making fun of you. You said in a previous post that you had
> already recovered the database so I understood that you didn't need
> more help on that. I was answering your specific question about how to
> recover additional data by asking for more information on whether you
> have a log backup. You didn't answer that question unfortunately.
> As I understand it you have restored an old database backup to another
> server but you still have a copy of the latest MDF and LDF files
> available. It isn't possible to apply the transaction log to a database
> that is online and in a recovered state. To apply the transaction log
> you first have to restore from a full database backup with the
> NORECOVERY option. Only then can you start to restore transaction log
> backups, assuming you have them.
> To restore the master database you have to first put the database into
> single user mode. Only attempt to restore master on either the server
> that the backup was originally taken from or on a clean install of SQL
> Server.
> Have you tried re-attaching the MDF and LDF files as suggested by RD?
> That should be your first course of action. There is an example of how
> to re-attach under the sp_attach_db topic in Books Online. If you can
> attach the database successfully then you are in luck. Take a backup
> immediately, run DBCC CHECKDB and then you are back in business
> hopefully.
> If you re-attach your database but it is marked as "suspect" then
> things are bit less rosy to say the least. I recommend you contact
> Microsoft support directly as there are no documented solutions and the
> possible fixes are not without their own risks. I don't want to suggest
> anything that may make things worse.
> Relevant articles in Books Online:
> "sp_attach_db"
> "Restoring the master Database"
> "How to restore to the point of failure"
> Hope this helps.
> --
> David Portas
> SQL Server MVP
> --
>

Database crashed its very urgent

Hi All,
one of my database is suddenly crashed with power fluctuation and when i
started the server it is showing "not able to connect database". I have taken
backup and i was trying to attach database in other system. It has given me
the following error.
--
Microsoft SQL-DMO (ODBC SQLState: HY000)
--
Error 9003: The LSN (375:9588:1) passed to log scan in database
'QVLMSCASPARES' is invalid.
--
OK
--
Please any one can help me out.
With Regards,
AHARIWhat does your SQL Server log say? Looks like you have corruption.
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Srihari" <Srihari@.discussions.microsoft.com> wrote in message
news:3479DD26-661B-48DD-BE5C-DFFAA0DB5EE2@.microsoft.com...
> Hi All,
> one of my database is suddenly crashed with power fluctuation and when i
> started the server it is showing "not able to connect database". I have
> taken
> backup and i was trying to attach database in other system. It has given
> me
> the following error.
> --
> Microsoft SQL-DMO (ODBC SQLState: HY000)
> --
> Error 9003: The LSN (375:9588:1) passed to log scan in database
> 'QVLMSCASPARES' is invalid.
> --
> OK
> --
>
> Please any one can help me out.
> With Regards,
> AHARI|||It says
"Error 9003: The LSN (375:9588:1) passed to log scan in database
'QVLMSCASPARES' is invalid."
With Reagards,
AHARI
"Mike Epprecht (SQL MVP)" wrote:
> What does your SQL Server log say? Looks like you have corruption.
> Regards
> --
> Mike Epprecht, Microsoft SQL Server MVP
> Zurich, Switzerland
> IM: mike@.epprecht.net
> MVP Program: http://www.microsoft.com/mvp
> Blog: http://www.msmvps.com/epprecht/
> "Srihari" <Srihari@.discussions.microsoft.com> wrote in message
> news:3479DD26-661B-48DD-BE5C-DFFAA0DB5EE2@.microsoft.com...
> > Hi All,
> >
> > one of my database is suddenly crashed with power fluctuation and when i
> > started the server it is showing "not able to connect database". I have
> > taken
> > backup and i was trying to attach database in other system. It has given
> > me
> > the following error.
> >
> > --
> > Microsoft SQL-DMO (ODBC SQLState: HY000)
> > --
> > Error 9003: The LSN (375:9588:1) passed to log scan in database
> > 'QVLMSCASPARES' is invalid.
> > --
> > OK
> > --
> >
> >
> > Please any one can help me out.
> >
> > With Regards,
> > AHARI
>
>

Database crashed its very urgent

Hi All,
one of my database is suddenly crashed with power fluctuation and when i
started the server it is showing "not able to connect database". I have taken
backup and i was trying to attach database in other system. It has given me
the following error.
--
Microsoft SQL-DMO (ODBC SQLState: HY000)
--
Error 9003: The LSN (375:9588:1) passed to log scan in database
'QVLMSCASPARES' is invalid.
--
OK
--
Please any one can help me out.
With Regards,
AHARISrihari
Sounds like you are trying to reattach the data and log files. AM I correct/
Do you have a backup of the the db if so restore it on another server
--
Paul Zanbaka
DBA, Programmer Analyst
"Srihari" wrote:
> Hi All,
> one of my database is suddenly crashed with power fluctuation and when i
> started the server it is showing "not able to connect database". I have taken
> backup and i was trying to attach database in other system. It has given me
> the following error.
> --
> Microsoft SQL-DMO (ODBC SQLState: HY000)
> --
> Error 9003: The LSN (375:9588:1) passed to log scan in database
> 'QVLMSCASPARES' is invalid.
> --
> OK
> --
>
> Please any one can help me out.
> With Regards,
> AHARI|||I am attaching in other system then only i got this error.
With Regards
AHARI
"Paul Zanbaka" wrote:
> Srihari
> Sounds like you are trying to reattach the data and log files. AM I correct/
> Do you have a backup of the the db if so restore it on another server
> --
> Paul Zanbaka
> DBA, Programmer Analyst
>
> "Srihari" wrote:
> > Hi All,
> >
> > one of my database is suddenly crashed with power fluctuation and when i
> > started the server it is showing "not able to connect database". I have taken
> > backup and i was trying to attach database in other system. It has given me
> > the following error.
> >
> > --
> > Microsoft SQL-DMO (ODBC SQLState: HY000)
> > --
> > Error 9003: The LSN (375:9588:1) passed to log scan in database
> > 'QVLMSCASPARES' is invalid.
> > --
> > OK
> > --
> >
> >
> > Please any one can help me out.
> >
> > With Regards,
> > AHARI|||Srihari
Instead of attaching the db on other system try to restore it
RESTORE DATABASE
--
Paul Zanbaka
DBA, Programmer Analyst
"Srihari" wrote:
> I am attaching in other system then only i got this error.
> With Regards
> AHARI
> "Paul Zanbaka" wrote:
> > Srihari
> > Sounds like you are trying to reattach the data and log files. AM I correct/
> > Do you have a backup of the the db if so restore it on another server
> > --
> > Paul Zanbaka
> > DBA, Programmer Analyst
> >
> >
> > "Srihari" wrote:
> >
> > > Hi All,
> > >
> > > one of my database is suddenly crashed with power fluctuation and when i
> > > started the server it is showing "not able to connect database". I have taken
> > > backup and i was trying to attach database in other system. It has given me
> > > the following error.
> > >
> > > --
> > > Microsoft SQL-DMO (ODBC SQLState: HY000)
> > > --
> > > Error 9003: The LSN (375:9588:1) passed to log scan in database
> > > 'QVLMSCASPARES' is invalid.
> > > --
> > > OK
> > > --
> > >
> > >
> > > Please any one can help me out.
> > >
> > > With Regards,
> > > AHARI

Database crashed its very urgent

Hi All,
one of my database is suddenly crashed with power fluctuation and when i
started the server it is showing "not able to connect database". I have take
n
backup and i was trying to attach database in other system. It has given me
the following error.
Microsoft SQL-DMO (ODBC SQLState: HY000)
--
Error 9003: The LSN (375:9588:1) passed to log scan in database
'QVLMSCASPARES' is invalid.
--
OK
--
Please any one can help me out.
With Regards,
AHARIYou should use sp_detach_db to explicitly detach the files,
copy then and then try attaching on another system. You also
need to make sure you have all files from the original
database.
However, if your original database is corrupted you
shouldn't be using sp_detach/sp_attach. You should check all
logs and determine the cause of the corruption and address
that issue. Often you need to restore from your last known
good backup.
-Sue
On Mon, 3 Oct 2005 03:03:03 -0700, "Srihari"
<Srihari@.discussions.microsoft.com> wrote:

>Hi All,
>one of my database is suddenly crashed with power fluctuation and when i
>started the server it is showing "not able to connect database". I have tak
en
>backup and i was trying to attach database in other system. It has given me
>the following error.
>--
>Microsoft SQL-DMO (ODBC SQLState: HY000)
>--
>Error 9003: The LSN (375:9588:1) passed to log scan in database
>'QVLMSCASPARES' is invalid.
>--
>OK
>--
>
>Please any one can help me out.
>With Regards,
>AHARI

Database crashed its very urgent

Hi All,
one of my database is suddenly crashed with power fluctuation and when i
started the server it is showing "not able to connect database". I have taken
backup and i was trying to attach database in other system. It has given me
the following error.
Microsoft SQL-DMO (ODBC SQLState: HY000)
Error 9003: The LSN (375:9588:1) passed to log scan in database
'QVLMSCASPARES' is invalid.
OK
Please any one can help me out.
With Regards,
AHARI
Srihari wrote:
> Hi All,
> one of my database is suddenly crashed with power fluctuation and
> when i started the server it is showing "not able to connect
> database". I have taken backup and i was trying to attach database in
> other system. It has given me the following error.
> --
> Microsoft SQL-DMO (ODBC SQLState: HY000)
> --
> Error 9003: The LSN (375:9588:1) passed to log scan in database
> 'QVLMSCASPARES' is invalid.
What do you mean by "I have taken backup"? Do you mean you took a copy
of the database file(s) from the original server when SQL Server was
either off-line or the database was detached. Or do you mean you
performed a backup using BACKUP DATABASE? If you are trying to restore a
backup, then use RESTORE DATABASE. If you are using a copy of the
database files and log files, then use sp_attach_db or
sp_attach_single_file_db.
See if this helps.
http://support.microsoft.com/kb/328354
David Gugick
Quest Software
www.imceda.com
www.quest.com
|||I have taken files offline and trying to attach in other system.
With Regards,
AHARI
"David Gugick" wrote:

> Srihari wrote:
>
> What do you mean by "I have taken backup"? Do you mean you took a copy
> of the database file(s) from the original server when SQL Server was
> either off-line or the database was detached. Or do you mean you
> performed a backup using BACKUP DATABASE? If you are trying to restore a
> backup, then use RESTORE DATABASE. If you are using a copy of the
> database files and log files, then use sp_attach_db or
> sp_attach_single_file_db.
> See if this helps.
> http://support.microsoft.com/kb/328354
>
> --
> David Gugick
> Quest Software
> www.imceda.com
> www.quest.com
>
|||Srihari wrote:
> I have taken files offline and trying to attach in other system.
> With Regards,
> AHARI
>
According to BOL:
"sp_attach_db should only be executed on databases that were previously
detached from the database server using an explicit sp_detach_db
operation. If more than 16 files must be specified, use CREATE DATABASE
with the FOR ATTACH clause.
If you attach a database to a server other than the server from which
the database was detached, and the detached database was enabled for
replication, you should run sp_removedbreplication to remove replication
from the database."
I'm not sure what will happen if you try to attach a copy of the
database files without first using the detach function. Are you
attaching the log files as well? If so, have to tried to not attach the
log file.
See if using the CREATE DATABASE with the FOR ATTACH clause works
instead:
http://support.microsoft.com/?kbid=885712
David Gugick
Quest Software
www.imceda.com
www.quest.com

Database crashed its very urgent

Hi All,
one of my database is suddenly crashed with power fluctuation and when i
started the server it is showing "not able to connect database". I have taken
backup and i was trying to attach database in other system. It has given me
the following error.
Microsoft SQL-DMO (ODBC SQLState: HY000)
Error 9003: The LSN (375:9588:1) passed to log scan in database
'QVLMSCASPARES' is invalid.
OK
Please any one can help me out.
With Regards,
AHARI
What does your SQL Server log say? Looks like you have corruption.
Regards
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Srihari" <Srihari@.discussions.microsoft.com> wrote in message
news:3479DD26-661B-48DD-BE5C-DFFAA0DB5EE2@.microsoft.com...
> Hi All,
> one of my database is suddenly crashed with power fluctuation and when i
> started the server it is showing "not able to connect database". I have
> taken
> backup and i was trying to attach database in other system. It has given
> me
> the following error.
> --
> Microsoft SQL-DMO (ODBC SQLState: HY000)
> --
> Error 9003: The LSN (375:9588:1) passed to log scan in database
> 'QVLMSCASPARES' is invalid.
> --
> OK
> --
>
> Please any one can help me out.
> With Regards,
> AHARI
|||It says
"Error 9003: The LSN (375:9588:1) passed to log scan in database
'QVLMSCASPARES' is invalid."
With Reagards,
AHARI
"Mike Epprecht (SQL MVP)" wrote:

> What does your SQL Server log say? Looks like you have corruption.
> Regards
> --
> Mike Epprecht, Microsoft SQL Server MVP
> Zurich, Switzerland
> IM: mike@.epprecht.net
> MVP Program: http://www.microsoft.com/mvp
> Blog: http://www.msmvps.com/epprecht/
> "Srihari" <Srihari@.discussions.microsoft.com> wrote in message
> news:3479DD26-661B-48DD-BE5C-DFFAA0DB5EE2@.microsoft.com...
>
>

Database crashed its very urgent

Hi All,
one of my database is suddenly crashed with power fluctuation and when i
started the server it is showing "not able to connect database". I have taken
backup and i was trying to attach database in other system. It has given me
the following error.
Microsoft SQL-DMO (ODBC SQLState: HY000)
Error 9003: The LSN (375:9588:1) passed to log scan in database
'QVLMSCASPARES' is invalid.
OK
Please any one can help me out.
With Regards,
AHARI
Srihari
Sounds like you are trying to reattach the data and log files. AM I correct/
Do you have a backup of the the db if so restore it on another server
Paul Zanbaka
DBA, Programmer Analyst
"Srihari" wrote:

> Hi All,
> one of my database is suddenly crashed with power fluctuation and when i
> started the server it is showing "not able to connect database". I have taken
> backup and i was trying to attach database in other system. It has given me
> the following error.
> --
> Microsoft SQL-DMO (ODBC SQLState: HY000)
> --
> Error 9003: The LSN (375:9588:1) passed to log scan in database
> 'QVLMSCASPARES' is invalid.
> --
> OK
> --
>
> Please any one can help me out.
> With Regards,
> AHARI
|||I am attaching in other system then only i got this error.
With Regards
AHARI
"Paul Zanbaka" wrote:
[vbcol=seagreen]
> Srihari
> Sounds like you are trying to reattach the data and log files. AM I correct/
> Do you have a backup of the the db if so restore it on another server
> --
> Paul Zanbaka
> DBA, Programmer Analyst
>
> "Srihari" wrote:
|||Srihari
Instead of attaching the db on other system try to restore it
RESTORE DATABASE
Paul Zanbaka
DBA, Programmer Analyst
"Srihari" wrote:
[vbcol=seagreen]
> I am attaching in other system then only i got this error.
> With Regards
> AHARI
> "Paul Zanbaka" wrote:

Database crashed its very urgent

Hi All,
one of my database is suddenly crashed with power fluctuation and when i
started the server it is showing "not able to connect database". I have take
n
backup and i was trying to attach database in other system. It has given me
the following error.
Microsoft SQL-DMO (ODBC SQLState: HY000)
--
Error 9003: The LSN (375:9588:1) passed to log scan in database
'QVLMSCASPARES' is invalid.
--
OK
--
Please any one can help me out.
With Regards,
AHARISrihari
Sounds like you are trying to reattach the data and log files. AM I correct/
Do you have a backup of the the db if so restore it on another server
--
Paul Zanbaka
DBA, Programmer Analyst
"Srihari" wrote:

> Hi All,
> one of my database is suddenly crashed with power fluctuation and when i
> started the server it is showing "not able to connect database". I have ta
ken
> backup and i was trying to attach database in other system. It has given m
e
> the following error.
> --
> Microsoft SQL-DMO (ODBC SQLState: HY000)
> --
> Error 9003: The LSN (375:9588:1) passed to log scan in database
> 'QVLMSCASPARES' is invalid.
> --
> OK
> --
>
> Please any one can help me out.
> With Regards,
> AHARI|||I am attaching in other system then only i got this error.
With Regards
AHARI
"Paul Zanbaka" wrote:
[vbcol=seagreen]
> Srihari
> Sounds like you are trying to reattach the data and log files. AM I correc
t/
> Do you have a backup of the the db if so restore it on another server
> --
> Paul Zanbaka
> DBA, Programmer Analyst
>
> "Srihari" wrote:
>|||Srihari
Instead of attaching the db on other system try to restore it
RESTORE DATABASE
Paul Zanbaka
DBA, Programmer Analyst
"Srihari" wrote:
[vbcol=seagreen]
> I am attaching in other system then only i got this error.
> With Regards
> AHARI
> "Paul Zanbaka" wrote:
>

Database crashed its very urgent

Hi All,
one of my database is suddenly crashed with power fluctuation and when i
started the server it is showing "not able to connect database". I have take
n
backup and i was trying to attach database in other system. It has given me
the following error.
Microsoft SQL-DMO (ODBC SQLState: HY000)
--
Error 9003: The LSN (375:9588:1) passed to log scan in database
'QVLMSCASPARES' is invalid.
--
OK
--
Please any one can help me out.
With Regards,
AHARIWhat does your SQL Server log say? Looks like you have corruption.
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Srihari" <Srihari@.discussions.microsoft.com> wrote in message
news:3479DD26-661B-48DD-BE5C-DFFAA0DB5EE2@.microsoft.com...
> Hi All,
> one of my database is suddenly crashed with power fluctuation and when i
> started the server it is showing "not able to connect database". I have
> taken
> backup and i was trying to attach database in other system. It has given
> me
> the following error.
> --
> Microsoft SQL-DMO (ODBC SQLState: HY000)
> --
> Error 9003: The LSN (375:9588:1) passed to log scan in database
> 'QVLMSCASPARES' is invalid.
> --
> OK
> --
>
> Please any one can help me out.
> With Regards,
> AHARI|||It says
"Error 9003: The LSN (375:9588:1) passed to log scan in database
'QVLMSCASPARES' is invalid."
With Reagards,
AHARI
"Mike Epprecht (SQL MVP)" wrote:

> What does your SQL Server log say? Looks like you have corruption.
> Regards
> --
> Mike Epprecht, Microsoft SQL Server MVP
> Zurich, Switzerland
> IM: mike@.epprecht.net
> MVP Program: http://www.microsoft.com/mvp
> Blog: http://www.msmvps.com/epprecht/
> "Srihari" <Srihari@.discussions.microsoft.com> wrote in message
> news:3479DD26-661B-48DD-BE5C-DFFAA0DB5EE2@.microsoft.com...
>
>