Showing posts with label retrieve. Show all posts
Showing posts with label retrieve. Show all posts

Tuesday, March 27, 2012

Error: Cannot open database requested in login projectAllocations. Login fails. Login fail

Hi,
Im getting this error when attempting to retrieve data from an sql database.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Cannot open database requested in login 'projectAllocations'. Login fails. Login failed for user 'sa'.

Source Error:

Line 13: objConn = New SqlConnection( "Server=LAB303-066\NETSDK; Database=projectAllocations; User ID=sa;Password=mypassword")
Line 14: objCmd = New SqlCommand("SELECT * FROM project_descriptions", objConn)
Line 15: objConn.Open()
Line 16: objRdr = objCmd.ExecuteReader()
Line 17: While objRdr.Read()

Source File: C:\finalyearproject2\sample.aspx Line: 15

Please Help!! Im a beginner to this, so if anyone knows the answer, take baby steps when explaining. Thanksas the message says you prbly need to give permissions to the user to access the database. in your enterprise manager, if you xpand the databases tab and then the db you are working on, there's a Users tab. click on it and in the panel to your right you would see a list of users. You might need to add the user "projectAllocations" to the list here and give permissions to the user to access the tables/stored procs and other objects..

hth|||Hi,
Thanks for the response. When I login to the web data administrator and expad the database im workin on, there is no users tab. Does the database have to be empty to do this?|||>>in your enterprise manager, if you xpand the databases tab

Monday, March 26, 2012

Error: 625, Severity: 20, State: 3

We have this in sql error log.
spid 66, Getrow: rowoffset entry 35(0) out of range (pg (0x3:0x1ba53c), obj
0x6df7358c, db 11, stat b)
Cannot retrieve row from page (35:1811772) by RID because the slotid
(1699164968) is not valid..
Error: 625, Severity: 20, State: 3
Any idea.. what to check? or we can ignore it?
--soonyulook like you have database corruption. run dbcc checkdb to get the report.
it's best if you restore the database from a known good backup. if you do
not have a backup, contact ms support to have them walk you through
recovering (with some loss of data, more than likely).
--
-oj
"soonyu" <soonyu@.discussions.microsoft.com> wrote in message
news:31898E05-D2F6-4E77-A310-0F032255F2E7@.microsoft.com...
> We have this in sql error log.
> spid 66, Getrow: rowoffset entry 35(0) out of range (pg (0x3:0x1ba53c),
> obj
> 0x6df7358c, db 11, stat b)
> Cannot retrieve row from page (35:1811772) by RID because the slotid
> (1699164968) is not valid..
> Error: 625, Severity: 20, State: 3
> Any idea.. what to check? or we can ignore it?
> --soonyu|||how we know this is from which table or which index?
35:1811772
is that possible know from dbcc page. and what parameter should i put.
soonyu
"oj" wrote:
> look like you have database corruption. run dbcc checkdb to get the report.
> it's best if you restore the database from a known good backup. if you do
> not have a backup, contact ms support to have them walk you through
> recovering (with some loss of data, more than likely).
> --
> -oj
>
> "soonyu" <soonyu@.discussions.microsoft.com> wrote in message
> news:31898E05-D2F6-4E77-A310-0F032255F2E7@.microsoft.com...
> > We have this in sql error log.
> > spid 66, Getrow: rowoffset entry 35(0) out of range (pg (0x3:0x1ba53c),
> > obj
> > 0x6df7358c, db 11, stat b)
> > Cannot retrieve row from page (35:1811772) by RID because the slotid
> > (1699164968) is not valid..
> > Error: 625, Severity: 20, State: 3
> >
> > Any idea.. what to check? or we can ignore it?
> >
> > --soonyu
>
>|||run the 'dbcc checkdb(11)' first to see if there is any error report.
also, please update your sql2k to sp4 - there is actually a bug that would
raise the same error.
810026 (http://support.microsoft.com/kb/810026/) FIX: A DELETE statement
with a self-join may fail and you receive a 625 error
--
-oj
"soonyu" <soonyu@.discussions.microsoft.com> wrote in message
news:3D1EACAB-CB1B-477B-BA0A-A40B50887D98@.microsoft.com...
> how we know this is from which table or which index?
> 35:1811772
> is that possible know from dbcc page. and what parameter should i put.
> soonyu
> "oj" wrote:
>> look like you have database corruption. run dbcc checkdb to get the
>> report.
>> it's best if you restore the database from a known good backup. if you do
>> not have a backup, contact ms support to have them walk you through
>> recovering (with some loss of data, more than likely).
>> --
>> -oj
>>
>> "soonyu" <soonyu@.discussions.microsoft.com> wrote in message
>> news:31898E05-D2F6-4E77-A310-0F032255F2E7@.microsoft.com...
>> > We have this in sql error log.
>> > spid 66, Getrow: rowoffset entry 35(0) out of range (pg (0x3:0x1ba53c),
>> > obj
>> > 0x6df7358c, db 11, stat b)
>> > Cannot retrieve row from page (35:1811772) by RID because the slotid
>> > (1699164968) is not valid..
>> > Error: 625, Severity: 20, State: 3
>> >
>> > Any idea.. what to check? or we can ignore it?
>> >
>> > --soonyu
>>

Error: 625, Severity: 20, State: 3

We have this in sql error log.
spid 66, Getrow: rowoffset entry 35(0) out of range (pg (0x3:0x1ba53c), obj
0x6df7358c, db 11, stat b)
Cannot retrieve row from page (35:1811772) by RID because the slotid
(1699164968) is not valid..
Error: 625, Severity: 20, State: 3
Any idea.. what to check? or we can ignore it?
--soonyulook like you have database corruption. run dbcc checkdb to get the report.
it's best if you restore the database from a known good backup. if you do
not have a backup, contact ms support to have them walk you through
recovering (with some loss of data, more than likely).
-oj
"soonyu" <soonyu@.discussions.microsoft.com> wrote in message
news:31898E05-D2F6-4E77-A310-0F032255F2E7@.microsoft.com...
> We have this in sql error log.
> spid 66, Getrow: rowoffset entry 35(0) out of range (pg (0x3:0x1ba53c),
> obj
> 0x6df7358c, db 11, stat b)
> Cannot retrieve row from page (35:1811772) by RID because the slotid
> (1699164968) is not valid..
> Error: 625, Severity: 20, State: 3
> Any idea.. what to check? or we can ignore it?
> --soonyu|||how we know this is from which table or which index?
35:1811772
is that possible know from dbcc page. and what parameter should i put.
soonyu
"oj" wrote:

> look like you have database corruption. run dbcc checkdb to get the report
.
> it's best if you restore the database from a known good backup. if you do
> not have a backup, contact ms support to have them walk you through
> recovering (with some loss of data, more than likely).
> --
> -oj
>
> "soonyu" <soonyu@.discussions.microsoft.com> wrote in message
> news:31898E05-D2F6-4E77-A310-0F032255F2E7@.microsoft.com...
>
>|||run the 'dbcc checkdb(11)' first to see if there is any error report.
also, please update your sql2k to sp4 - there is actually a bug that would
raise the same error.
810026 (http://support.microsoft.com/kb/810026/) FIX: A DELETE statement
with a self-join may fail and you receive a 625 error
-oj
"soonyu" <soonyu@.discussions.microsoft.com> wrote in message
news:3D1EACAB-CB1B-477B-BA0A-A40B50887D98@.microsoft.com...[vbcol=seagreen]
> how we know this is from which table or which index?
> 35:1811772
> is that possible know from dbcc page. and what parameter should i put.
> soonyu
> "oj" wrote:
>|||look like you have database corruption. run dbcc checkdb to get the report.
it's best if you restore the database from a known good backup. if you do
not have a backup, contact ms support to have them walk you through
recovering (with some loss of data, more than likely).
-oj
"soonyu" <soonyu@.discussions.microsoft.com> wrote in message
news:31898E05-D2F6-4E77-A310-0F032255F2E7@.microsoft.com...
> We have this in sql error log.
> spid 66, Getrow: rowoffset entry 35(0) out of range (pg (0x3:0x1ba53c),
> obj
> 0x6df7358c, db 11, stat b)
> Cannot retrieve row from page (35:1811772) by RID because the slotid
> (1699164968) is not valid..
> Error: 625, Severity: 20, State: 3
> Any idea.. what to check? or we can ignore it?
> --soonyu|||how we know this is from which table or which index?
35:1811772
is that possible know from dbcc page. and what parameter should i put.
soonyu
"oj" wrote:

> look like you have database corruption. run dbcc checkdb to get the report
.
> it's best if you restore the database from a known good backup. if you do
> not have a backup, contact ms support to have them walk you through
> recovering (with some loss of data, more than likely).
> --
> -oj
>
> "soonyu" <soonyu@.discussions.microsoft.com> wrote in message
> news:31898E05-D2F6-4E77-A310-0F032255F2E7@.microsoft.com...
>
>|||run the 'dbcc checkdb(11)' first to see if there is any error report.
also, please update your sql2k to sp4 - there is actually a bug that would
raise the same error.
810026 (http://support.microsoft.com/kb/810026/) FIX: A DELETE statement
with a self-join may fail and you receive a 625 error
-oj
"soonyu" <soonyu@.discussions.microsoft.com> wrote in message
news:3D1EACAB-CB1B-477B-BA0A-A40B50887D98@.microsoft.com...[vbcol=seagreen]
> how we know this is from which table or which index?
> 35:1811772
> is that possible know from dbcc page. and what parameter should i put.
> soonyu
> "oj" wrote:
>

Sunday, February 19, 2012

Error while retrieving servers

I've tried to retrieve and fill a combobox with all my servers on my network, and the program tells me he doesn't found any servers, I've got three instances running (SRV-01,SRV-02,SRV-01\SQLEXPRESS), I really don't understand. So I use

SmoApplication.EnumAvailableSqlServers(true)

to test only on my local machine and no server found ?

Here is the code I used :

this.Cursor = Cursors.WaitCursor;

DataTable dtSqlServer = SmoApplication.EnumAvailableSqlServers(true);

foreach (DataRow drServer in dtSqlServer.Rows)

{

string sServer = drServer["Server"].ToString();

if (drServer["Instance"] != null && drServer["Instance"].ToString().Length > 0)

sServer += @."\" + drServer["Instance"].ToString();

if (listDataBases.Items.IndexOf(sServer) < 0)

listDataBases.Items.Add(sServer);

//Make the local server the default

Server local = new Server();

String serverName = local.Name;

if (local.InstanceName != null && local.InstanceName.Length > 0)

serverName += @."\" + local.InstanceName;

Int32 idx = listDataBases.FindStringExact(serverName);

if (idx >= 0)

listDataBases.SelectedIndex = idx;

this.Cursor = Cursors.Default;

}

Is someone can help me thanks, I use Win XP SP2, VS 2005 team suite, SQL Server 2005 std + SP1, SQL Server 2005 express + SP 1

PS : I've tried without EnumAvailableSqlServers using a simple textbox instead, and when I enter the name of my servers it works ?!!!

I've disabled SQL Server Browser now it see my local server but not my network instances and not my SQL Express instance ?|||Hi, I guess you are messing up with instance and server of the resultset of the enumaration of the server.

http://www.sqlserver2005.de/articles/1/

HTH, jens Suessmeyer.

http://www.sqlserver2005.de

Friday, February 17, 2012

Error while linking server to Active Directory service

I need to retrieve information from LDAP in SQL Server 2000.
I have installed SQL Server 2000 on a machine with Windows XP Professional
(SP2).
When I execute this script inside Query Analyzer:
EXEC sp_addlinkedserver 'ADSI', 'Active Directory Services 2.5',
'ADSDSOObject', 'adsdatasource'
GO
and then I open tables or views of linked server this error appears:
"Error 7301: It is impossible to obtain from OLE DB provider 'ADSDSOObject'
a necessary interface..."
Can I solve this issue?
Where I can find a good documentation about SQL Server 2000 and LDAP?
Many thanksI read that I can ignore this problem (it's normal!),
but I have another error.
I run SQL Server service with my domain account, I add my SQL Server istance
to Active directory inside Enterprise Manager, I create the linked server how
documented with access by my domain account.
Finally, I execute this query in Query Analyzer:
SELECT * FROM OpenQuery( ADSI, 'SELECT *
FROM "LDAP://" ')
having this error:
Message 7321, Level 16, State 2, Row 1
OLE DB error trace [OLE/DB Provider 'MSOLAP' ICommandPrepare::Prepare
returned 0x80040e14]
Any suggests to solve this issue?
> I need to retrieve information from LDAP in SQL Server 2000.
> I have installed SQL Server 2000 on a machine with Windows XP Professional
> (SP2).
> When I execute this script inside Query Analyzer:
> EXEC sp_addlinkedserver 'ADSI', 'Active Directory Services 2.5',
> 'ADSDSOObject', 'adsdatasource'
> GO
> and then I open tables or views of linked server this error appears:
> "Error 7301: It is impossible to obtain from OLE DB provider 'ADSDSOObject'
> a necessary interface..."
> Can I solve this issue?
> Where I can find a good documentation about SQL Server 2000 and LDAP?
> Many thanks
>|||The right error message is:
Message 7321, Level 16, State 2, Row 1
OLE DB error trace [OLE/DB Provider 'ADsDSOObject' ICommandPrepare::Prepare
returned 0x80040e14].
Sorry!
> I read that I can ignore this problem (it's normal!),
> but I have another error.
> I run SQL Server service with my domain account, I add my SQL Server istance
> to Active directory inside Enterprise Manager, I create the linked server how
> documented with access by my domain account.
> Finally, I execute this query in Query Analyzer:
> SELECT * FROM OpenQuery( ADSI, 'SELECT *
> FROM "LDAP://" ')
> having this error:
> Message 7321, Level 16, State 2, Row 1
> OLE DB error trace [OLE/DB Provider 'MSOLAP' ICommandPrepare::Prepare
> returned 0x80040e14]
> Any suggests to solve this issue?
>
> > I need to retrieve information from LDAP in SQL Server 2000.
> > I have installed SQL Server 2000 on a machine with Windows XP Professional
> > (SP2).
> > When I execute this script inside Query Analyzer:
> > EXEC sp_addlinkedserver 'ADSI', 'Active Directory Services 2.5',
> > 'ADSDSOObject', 'adsdatasource'
> > GO
> > and then I open tables or views of linked server this error appears:
> > "Error 7301: It is impossible to obtain from OLE DB provider 'ADSDSOObject'
> > a necessary interface..."
> >
> > Can I solve this issue?
> > Where I can find a good documentation about SQL Server 2000 and LDAP?
> >
> > Many thanks
> >