Sunday, March 11, 2012
DataGrid DataSet DataAdaptor DataBase problem.
I populate my data with the load sub below.
In the Save Sub (below), I have generated my DataSet 'dataSet11' from my
DataAdaptor 'SqlDataAdapter1' and the DataConnection 'SqlConnection1' and
they all seem to be connected correctly. But my data does not update.
the dataAdaptor is configured for Insert/Update/delete and the datagrid
datasource is DataSet11.TableName. Any ideas?
Private Sub Thresholds_Load(ByVal sender As....
Try
cn = New SqlClient.SqlConnection("user id=" & UserName.Text & ";password="
& Password.Text & ";database=" & Database.Text & ";server=" & Server.Text)
cn.Open()
cmdSelect.Connection = cn
Dim da As SqlClient.SqlDataAdapter = New SqlClient.SqlDataAdapter("Select
* from MISRE_Threshold", cn)
Dim dsThreshold As DataSet = New DataSet
' fill dataset
da.Fill(dsThreshold, "MISRE_Threshold")
'Attach DataSet to DataGrid
dgThreshold.DataSource = dsThreshold.DefaultViewManager
Catch ex As Exception
MessageBox.Show("Error: Could not establish database connection")
End Try
Private Sub btnSave_Click(ByVal sender....
SqlDataAdapter1.Update(DataSet11)
EndSubThe DataAdapter InsertCommand/UpdateCommand/DeleteCommand properties need to
be set in order for the DataAdapter to execute the appropriate commands to
update your table. The SqlCommandBuilder can be used to generate the needed
commands (if you have a primary key) or you can create those the commands
yourself.
Dim cb As SqlCommandBuilder = New SqlCommandBuilder(da)
Hope this helps.
Dan Guzman
SQL Server MVP
"marcmc" <marcmc@.discussions.microsoft.com> wrote in message
news:392099C1-6587-46B7-BD60-A20AD3C884AB@.microsoft.com...
> My dataset is not updating my database after the user modifies the
> datagrid.
> I populate my data with the load sub below.
> In the Save Sub (below), I have generated my DataSet 'dataSet11' from my
> DataAdaptor 'SqlDataAdapter1' and the DataConnection 'SqlConnection1' and
> they all seem to be connected correctly. But my data does not update.
> the dataAdaptor is configured for Insert/Update/delete and the datagrid
> datasource is DataSet11.TableName. Any ideas?
> Private Sub Thresholds_Load(ByVal sender As....
> Try
> cn = New SqlClient.SqlConnection("user id=" & UserName.Text &
> ";password="
> & Password.Text & ";database=" & Database.Text & ";server=" & Server.Text)
> cn.Open()
> cmdSelect.Connection = cn
> Dim da As SqlClient.SqlDataAdapter = New SqlClient.SqlDataAdapter("Select
> * from MISRE_Threshold", cn)
> Dim dsThreshold As DataSet = New DataSet
> ' fill dataset
> da.Fill(dsThreshold, "MISRE_Threshold")
> 'Attach DataSet to DataGrid
> dgThreshold.DataSource = dsThreshold.DefaultViewManager
> Catch ex As Exception
> MessageBox.Show("Error: Could not establish database
> connection")
> End Try
>
> Private Sub btnSave_Click(ByVal sender....
> SqlDataAdapter1.Update(DataSet11)
> EndSub|||They are configured, that's why i'm stumped!
Its the update one i'm interested in as follows:
UPDATE MISRE_Threshold
SET ThresholdType = @.ThresholdType, Threshold = @.Threshold,
Threshold_Flag = @.Threshold_Flag, Actual = @.Actual, Fail = @.Fail,
Category = @.Category, ID = @.ID
WHERE (ThresholdType = @.Original_ThresholdType) AND (Actual =
@.Original_Actual) AND (Category = @.Original_Category OR
@.Original_Category IS NULL AND Category IS NULL) AND
(Fail = @.Original_Fail) AND (ID = @.Original_ID OR
@.Original_ID IS NULL AND ID IS NULL) AND (Threshold =
@.Original_Threshold OR
@.Original_Threshold IS NULL AND Threshold IS NULL) AND
(Threshold_Flag = @.Original_Threshold_Flag OR
@.Original_Threshold_Flag IS NULL AND Threshold_Flag IS
NULL);
SELECT ThresholdType, Threshold,
Threshold_Flag, Actual, Fail, Category, ID
FROM MISRE_Threshold
WHERE (ThresholdType = @.ThresholdType)|||> They are configured, that's why i'm stumped!
The original code you posted instantiates and uses a new untyped dataset:
Dim dsThreshold As DataSet = New DataSet
However, your update routine uses the DataAdapter and DataSet generated by
the windows form designer:
SqlDataAdapter1.Update(DataSet11)
DataSet11 is never filled in the code snippets you posted so it will always
be empty. I believe your intention is to fill DataSet11 in the load
routine:
SqlDataAdapter1.Fill(DataSet11)
Hope this helps.
Dan Guzman
SQL Server MVP
"marcmc" <marcmc@.discussions.microsoft.com> wrote in message
news:E94A87F0-9D2B-4DB1-85E3-5AE7635656DA@.microsoft.com...
> They are configured, that's why i'm stumped!
> Its the update one i'm interested in as follows:
>
> UPDATE MISRE_Threshold
> SET ThresholdType = @.ThresholdType, Threshold = @.Threshold,
> Threshold_Flag = @.Threshold_Flag, Actual = @.Actual, Fail = @.Fail,
> Category = @.Category, ID = @.ID
> WHERE (ThresholdType = @.Original_ThresholdType) AND (Actual =
> @.Original_Actual) AND (Category = @.Original_Category OR
> @.Original_Category IS NULL AND Category IS NULL) AND
> (Fail = @.Original_Fail) AND (ID = @.Original_ID OR
> @.Original_ID IS NULL AND ID IS NULL) AND (Threshold =
> @.Original_Threshold OR
> @.Original_Threshold IS NULL AND Threshold IS NULL)
> AND
> (Threshold_Flag = @.Original_Threshold_Flag OR
> @.Original_Threshold_Flag IS NULL AND Threshold_Flag
> IS
> NULL);
> SELECT ThresholdType, Threshold,
> Threshold_Flag, Actual, Fail, Category, ID
> FROM MISRE_Threshold
> WHERE (ThresholdType = @.ThresholdType)
Wednesday, March 7, 2012
Datadriven Subscription - Web Archive Improper formatting
Hi All,
I have a data driven subscription with Web Archive rendering format.
(SQL Reporting Service 2000). When a user gets this email, the format is not alligned properly, even, lines are missing in the report.
What could be the problem, is this a known issue? if yes, any patches available?
Please help me.
Thanks,
Nagesh
There are no replies to this query since one week...
Is this a silly query or tough one...
Sunday, February 26, 2012
Databases not displayed in Enterprise manager
I'm experiencing a weird problem, I have a sql server running with lots of d
ifferent database and corresponding user to each database. Now the problem i
s that when a given user connects through EM the database in in EM list "no
items" for all users except
one, and the sa. Now I have just reinstalled the server, thought it was a pr
oblem in the software, attached the databases and added the users all the sa
me way, no special settings except for the assign of access as dbo to their
own database.
Even creating a new database, and adding a new user results in the same stuf
f....
On my local development machine, doing the exact same thing dowsn't result i
n the mentioned behavoir.
WHY? (the desparate dba)Found that everytime a user who cannot acces databases connects this shows u
p in the server log:
SqlDumpExceptionHandler: Process 56 generated fatal exception c0000005 EXCEP
TION_ACCESS_VIOLATION. SQL Server is terminating this process..
****************************************
************************************
***
*
* BEGIN STACK DUMP:
* 04/16/04 22:38:12 spid 56
*
* Exception Address = 00402453 (RecBase::Resize(void) + 00000004 Line 0+00
000000)
* Exception Code = c0000005 EXCEPTION_ACCESS_VIOLATION
* Access Violation occurred reading address 00000000
* Input Buffer 68 bytes -
* exec sp_MSdbuseraccess N'db', N'%'
*
*
* MODULE BASE END SIZE
* sqlservr 00400000 00B19FFF 0071a000
* ntdll 77F80000 77FFCFFF 0007d000
* KERNEL32 7C570000 7C627FFF 000b8000
* ADVAPI32 7C2D0000 7C331FFF 00062000
* RPCRT4 77D30000 77DA0FFF 00071000
* USER32 77E10000 77E74FFF 00065000
* GDI32 77F40000 77F7DFFF 0003e000
* OPENDS60 41060000 41065FFF 00006000
* MSVCRT 78000000 78044FFF 00045000
* UMS 41070000 4107CFFF 0000d000
* SQLSORT 42AE0000 42B6FFFF 00090000
* MSVCIRT 780A0000 780B1FFF 00012000
* sqlevn70 41080000 41086FFF 00007000
* NETAPI32 7B470000 7B4BEFFF 0004f000
* SECUR32 7C340000 7C34EFFF 0000f000
* NETRAP 7B4C0000 7B4C5FFF 00006000
* SAMLIB 7B4D0000 7B4DEFFF 0000f000
* WS2_32 7B4E0000 7B4F3FFF 00014000
* WS2HELP 7B500000 7B507FFF 00008000
* WLDAP32 7B510000 7B539FFF 0002a000
* DNSAPI 7B540000 7B563FFF 00024000
* WSOCK32 7B570000 7B577FFF 00008000
* wmi 7B760000 7B763FFF 00004000
* ole32 7B870000 7B95EFFF 000ef000
* XOLEHLP 7B9E0000 7B9E7FFF 00008000
* MSDTCPRX 7B9F0000 7BAA6FFF 000b7000
* MTXCLU 7BAB0000 7BABFFFF 00010000
* VERSION 7BAC0000 7BAC6FFF 00007000
* LZ32 7BAD0000 7BAD5FFF 00006000
* CLUSAPI 7BAE0000 7BAEFFFF 00010000
* RESUTILS 7BAF0000 7BAFCFFF 0000d000
* USERENV 7C0F0000 7C150FFF 00061000
* rnr20 7BB00000 7BB0BFFF 0000c000
* iphlpapi 7BB50000 7BB62FFF 00013000
* ICMP 7BB70000 7BB74FFF 00005000
* MPRAPI 7BB80000 7BB96FFF 00017000
* OLEAUT32 7BBA0000 7BC3AFFF 0009b000
* ACTIVEDS 7BC40000 7BC6EFFF 0002f000
* ADSLDPC 7BC70000 7BC92FFF 00023000
* RTUTILS 7BCA0000 7BCADFFF 0000e000
* SETUPAPI 7BCB0000 7BD3DFFF 0008e000
* RASAPI32 7BD40000 7BD72FFF 00033000
* RASMAN 7BD80000 7BD90FFF 00011000
* TAPI32 7BDA0000 7BDC1FFF 00022000
* COMCTL32 7BDD0000 7BE53FFF 00084000
* SHLWAPI 7BE60000 7BEC4FFF 00065000
* DHCPCSVC 7BED0000 7BEE8FFF 00019000
* winrnr 011F0000 011F7FFF 00008000
* rasadhlp 01200000 01204FFF 00005000
* SSNETLIB 019D0000 019E5FFF 00016000
* SSNMPN70 410D0000 410D5FFF 00006000
* security 01CD0000 01CD3FFF 00004000
* crypt32 7C740000 7C7C6FFF 00087000
* MSASN1 01CE0000 01CEFFFF 00010000
* msafd 02100000 0211DFFF 0001e000
* wshtcpip 02160000 02166FFF 00007000
* SSmsLPCn 021F0000 021F6FFF 00007000
* ntdsapi 02290000 022A0FFF 00011000
* SQLFTQRY 02810000 0282CFFF 0001d000
* CLBCATQ 02830000 028BFFFF 00090000
* sqloledb 028E0000 02952FFF 00073000
* MSDART 02960000 0297EFFF 0001f000
* comdlg32 02980000 029BDFFF 0003e000
* SHELL32 029C0000 02C07FFF 00248000
* MSDATL3 02C10000 02C24FFF 00015000
* oledb32 02FB0000 03015FFF 00066000
* OLEDB32R 03020000 0302FFFF 00010000
* msv1_0 03050000 03070FFF 00021000
* xpstar 410F0000 41133FFF 00044000
* SQLUNIRL 10000000 1002CFFF 0002d000
* WINSPOOL 03080000 0309DFFF 0001e000
* MPR 030A0000 030AFFFF 00010000
* SQLRESLD 42AC0000 42AC6FFF 00007000
* SQLSVC 030B0000 030C6FFF 00017000
* ODBC32 030D0000 03101FFF 00032000
* odbcbcp 03110000 03115FFF 00006000
* W95SCM 41140000 4114BFFF 0000c000
* NDDEAPI 03120000 03126FFF 00007000
* odbcint 03270000 03285FFF 00016000
* SQLSVC 03290000 03295FFF 00006000
* xpstar 032A0000 032ABFFF 0000c000
* srchadm 034E0000 0351DFFF 0003e000
* mssadmws 03520000 03534FFF 00015000
* msi 03820000 03A23FFF 00204000
* athprxy 03A40000 03A47FFF 00008000
* rsabase 7CA00000 7CA22FFF 00023000
* xpsqlbot 04160000 04165FFF 00006000
* DBGHELP 042B0000 042C2FFF 00013000
* msdbi 04AF0000 04B0BFFF 0001c000
* sqlimage 09D20000 09D2CFFF 0000d000
*
* Edi: 00000005:
* Esi: 1BB294EC: 00000000 00000025 00000000 00000000 00000003 00
00000B
* Eax: 00000000:
* Ebx: 1BDCFFFD: 20000000 021BD5E0 00000000 E01BDD20 011BDD1F 00
000000
* Ecx: 1BB294EC: 00000000 00000025 00000000 00000000 00000003 00
00000B
* Edx: 00000E00:
* Eip: 00402453: E183088A 04E9830E 589D840F 4949001E E9830C74 0F
077404
* Ebp: 03F2D2A0: 03F2D2B4 005EEA86 00A4C638 03F2D2B0 03F2E3DC 03
F2E79C
* SegCs: 0000001B:
* EFlags: 00010246: 003D0052 005C005C 00410047 0049004C 0045004C 00
000049
* Esp: 03F2D28C: 1BB294EC 00445CB5 00000000 00000002 1BDCF8D0 03
F2D2B4
* SegSs: 00000023:
****************************************
************************************
***
Databases not displayed in Enterprise manager
I'm experiencing a weird problem, I have a sql server running with lots of different database and corresponding user to each database. Now the problem is that when a given user connects through EM the database in in EM list "no items" for all users except
one, and the sa. Now I have just reinstalled the server, thought it was a problem in the software, attached the databases and added the users all the same way, no special settings except for the assign of access as dbo to their own database.
Even creating a new database, and adding a new user results in the same stuff....
On my local development machine, doing the exact same thing dowsn't result in the mentioned behavoir.
WHY? (the desparate dba)
Found that everytime a user who cannot acces databases connects this shows up in the server log:
SqlDumpExceptionHandler: Process 56 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process..
************************************************** *****************************
*
* BEGIN STACK DUMP:
* 04/16/04 22:38:12 spid 56
*
* Exception Address = 00402453 (RecBase::Resize(void) + 00000004 Line 0+00000000)
* Exception Code = c0000005 EXCEPTION_ACCESS_VIOLATION
* Access Violation occurred reading address 00000000
* Input Buffer 68 bytes -
* exec sp_MSdbuseraccess N'db', N'%'
*
*
* MODULE BASE END SIZE
* sqlservr 00400000 00B19FFF 0071a000
* ntdll 77F80000 77FFCFFF 0007d000
* KERNEL32 7C570000 7C627FFF 000b8000
* ADVAPI32 7C2D0000 7C331FFF 00062000
* RPCRT4 77D30000 77DA0FFF 00071000
* USER32 77E10000 77E74FFF 00065000
* GDI32 77F40000 77F7DFFF 0003e000
* OPENDS60 41060000 41065FFF 00006000
* MSVCRT 78000000 78044FFF 00045000
* UMS 41070000 4107CFFF 0000d000
* SQLSORT 42AE0000 42B6FFFF 00090000
* MSVCIRT 780A0000 780B1FFF 00012000
* sqlevn70 41080000 41086FFF 00007000
* NETAPI32 7B470000 7B4BEFFF 0004f000
* SECUR32 7C340000 7C34EFFF 0000f000
* NETRAP 7B4C0000 7B4C5FFF 00006000
* SAMLIB 7B4D0000 7B4DEFFF 0000f000
* WS2_32 7B4E0000 7B4F3FFF 00014000
* WS2HELP 7B500000 7B507FFF 00008000
* WLDAP32 7B510000 7B539FFF 0002a000
* DNSAPI 7B540000 7B563FFF 00024000
* WSOCK32 7B570000 7B577FFF 00008000
* wmi 7B760000 7B763FFF 00004000
* ole32 7B870000 7B95EFFF 000ef000
* XOLEHLP 7B9E0000 7B9E7FFF 00008000
* MSDTCPRX 7B9F0000 7BAA6FFF 000b7000
* MTXCLU 7BAB0000 7BABFFFF 00010000
* VERSION 7BAC0000 7BAC6FFF 00007000
* LZ32 7BAD0000 7BAD5FFF 00006000
* CLUSAPI 7BAE0000 7BAEFFFF 00010000
* RESUTILS 7BAF0000 7BAFCFFF 0000d000
* USERENV 7C0F0000 7C150FFF 00061000
* rnr20 7BB00000 7BB0BFFF 0000c000
* iphlpapi 7BB50000 7BB62FFF 00013000
* ICMP 7BB70000 7BB74FFF 00005000
* MPRAPI 7BB80000 7BB96FFF 00017000
* OLEAUT32 7BBA0000 7BC3AFFF 0009b000
* ACTIVEDS 7BC40000 7BC6EFFF 0002f000
* ADSLDPC 7BC70000 7BC92FFF 00023000
* RTUTILS 7BCA0000 7BCADFFF 0000e000
* SETUPAPI 7BCB0000 7BD3DFFF 0008e000
* RASAPI32 7BD40000 7BD72FFF 00033000
* RASMAN 7BD80000 7BD90FFF 00011000
* TAPI32 7BDA0000 7BDC1FFF 00022000
* COMCTL32 7BDD0000 7BE53FFF 00084000
* SHLWAPI 7BE60000 7BEC4FFF 00065000
* DHCPCSVC 7BED0000 7BEE8FFF 00019000
* winrnr 011F0000 011F7FFF 00008000
* rasadhlp 01200000 01204FFF 00005000
* SSNETLIB 019D0000 019E5FFF 00016000
* SSNMPN70 410D0000 410D5FFF 00006000
* security 01CD0000 01CD3FFF 00004000
* crypt32 7C740000 7C7C6FFF 00087000
* MSASN1 01CE0000 01CEFFFF 00010000
* msafd 02100000 0211DFFF 0001e000
* wshtcpip 02160000 02166FFF 00007000
* SSmsLPCn 021F0000 021F6FFF 00007000
* ntdsapi 02290000 022A0FFF 00011000
* SQLFTQRY 02810000 0282CFFF 0001d000
* CLBCATQ 02830000 028BFFFF 00090000
* sqloledb 028E0000 02952FFF 00073000
* MSDART 02960000 0297EFFF 0001f000
* comdlg32 02980000 029BDFFF 0003e000
* SHELL32 029C0000 02C07FFF 00248000
* MSDATL3 02C10000 02C24FFF 00015000
* oledb32 02FB0000 03015FFF 00066000
* OLEDB32R 03020000 0302FFFF 00010000
* msv1_0 03050000 03070FFF 00021000
* xpstar 410F0000 41133FFF 00044000
* SQLUNIRL 10000000 1002CFFF 0002d000
* WINSPOOL 03080000 0309DFFF 0001e000
* MPR 030A0000 030AFFFF 00010000
* SQLRESLD 42AC0000 42AC6FFF 00007000
* SQLSVC 030B0000 030C6FFF 00017000
* ODBC32 030D0000 03101FFF 00032000
* odbcbcp 03110000 03115FFF 00006000
* W95SCM 41140000 4114BFFF 0000c000
* NDDEAPI 03120000 03126FFF 00007000
* odbcint 03270000 03285FFF 00016000
* SQLSVC 03290000 03295FFF 00006000
* xpstar 032A0000 032ABFFF 0000c000
* srchadm 034E0000 0351DFFF 0003e000
* mssadmws 03520000 03534FFF 00015000
* msi 03820000 03A23FFF 00204000
* athprxy 03A40000 03A47FFF 00008000
* rsabase 7CA00000 7CA22FFF 00023000
* xpsqlbot 04160000 04165FFF 00006000
* DBGHELP 042B0000 042C2FFF 00013000
* msdbi 04AF0000 04B0BFFF 0001c000
* sqlimage 09D20000 09D2CFFF 0000d000
*
* Edi: 00000005:
* Esi: 1BB294EC: 00000000 00000025 00000000 00000000 00000003 0000000B
* Eax: 00000000:
* Ebx: 1BDCFFFD: 20000000 021BD5E0 00000000 E01BDD20 011BDD1F 00000000
* Ecx: 1BB294EC: 00000000 00000025 00000000 00000000 00000003 0000000B
* Edx: 00000E00:
* Eip: 00402453: E183088A 04E9830E 589D840F 4949001E E9830C74 0F077404
* Ebp: 03F2D2A0: 03F2D2B4 005EEA86 00A4C638 03F2D2B0 03F2E3DC 03F2E79C
* SegCs: 0000001B:
* EFlags: 00010246: 003D0052 005C005C 00410047 0049004C 0045004C 00000049
* Esp: 03F2D28C: 1BB294EC 00445CB5 00000000 00000002 1BDCF8D0 03F2D2B4
* SegSs: 00000023:
************************************************** *****************************
Databases not displayed in Enterprise manager
I'm experiencing a weird problem, I have a sql server running with lots of different database and corresponding user to each database. Now the problem is that when a given user connects through EM the database in in EM list "no items" for all users except one, and the sa. Now I have just reinstalled the server, thought it was a problem in the software, attached the databases and added the users all the same way, no special settings except for the assign of access as dbo to their own database
Even creating a new database, and adding a new user results in the same stuff...
On my local development machine, doing the exact same thing dowsn't result in the mentioned behavoir
WHY? (the desparate dba)Found that everytime a user who cannot acces databases connects this shows up in the server log
SqlDumpExceptionHandler: Process 56 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process.
******************************************************************************
* BEGIN STACK DUMP
* 04/16/04 22:38:12 spid 5
* Exception Address = 00402453 (RecBase::Resize(void) + 00000004 Line 0+00000000
* Exception Code = c0000005 EXCEPTION_ACCESS_VIOLATIO
* Access Violation occurred reading address 0000000
* Input Buffer 68 bytes
* exec sp_MSdbuseraccess N'db', N'%
*
* MODULE BASE END SIZ
* sqlservr 00400000 00B19FFF 0071a00
* ntdll 77F80000 77FFCFFF 0007d00
* KERNEL32 7C570000 7C627FFF 000b800
* ADVAPI32 7C2D0000 7C331FFF 0006200
* RPCRT4 77D30000 77DA0FFF 0007100
* USER32 77E10000 77E74FFF 0006500
* GDI32 77F40000 77F7DFFF 0003e00
* OPENDS60 41060000 41065FFF 0000600
* MSVCRT 78000000 78044FFF 0004500
* UMS 41070000 4107CFFF 0000d00
* SQLSORT 42AE0000 42B6FFFF 0009000
* MSVCIRT 780A0000 780B1FFF 0001200
* sqlevn70 41080000 41086FFF 0000700
* NETAPI32 7B470000 7B4BEFFF 0004f00
* SECUR32 7C340000 7C34EFFF 0000f00
* NETRAP 7B4C0000 7B4C5FFF 0000600
* SAMLIB 7B4D0000 7B4DEFFF 0000f00
* WS2_32 7B4E0000 7B4F3FFF 0001400
* WS2HELP 7B500000 7B507FFF 0000800
* WLDAP32 7B510000 7B539FFF 0002a00
* DNSAPI 7B540000 7B563FFF 0002400
* WSOCK32 7B570000 7B577FFF 0000800
* wmi 7B760000 7B763FFF 0000400
* ole32 7B870000 7B95EFFF 000ef00
* XOLEHLP 7B9E0000 7B9E7FFF 0000800
* MSDTCPRX 7B9F0000 7BAA6FFF 000b700
* MTXCLU 7BAB0000 7BABFFFF 0001000
* VERSION 7BAC0000 7BAC6FFF 0000700
* LZ32 7BAD0000 7BAD5FFF 0000600
* CLUSAPI 7BAE0000 7BAEFFFF 0001000
* RESUTILS 7BAF0000 7BAFCFFF 0000d00
* USERENV 7C0F0000 7C150FFF 0006100
* rnr20 7BB00000 7BB0BFFF 0000c00
* iphlpapi 7BB50000 7BB62FFF 0001300
* ICMP 7BB70000 7BB74FFF 0000500
* MPRAPI 7BB80000 7BB96FFF 0001700
* OLEAUT32 7BBA0000 7BC3AFFF 0009b00
* ACTIVEDS 7BC40000 7BC6EFFF 0002f00
* ADSLDPC 7BC70000 7BC92FFF 0002300
* RTUTILS 7BCA0000 7BCADFFF 0000e00
* SETUPAPI 7BCB0000 7BD3DFFF 0008e00
* RASAPI32 7BD40000 7BD72FFF 0003300
* RASMAN 7BD80000 7BD90FFF 0001100
* TAPI32 7BDA0000 7BDC1FFF 0002200
* COMCTL32 7BDD0000 7BE53FFF 0008400
* SHLWAPI 7BE60000 7BEC4FFF 0006500
* DHCPCSVC 7BED0000 7BEE8FFF 0001900
* winrnr 011F0000 011F7FFF 0000800
* rasadhlp 01200000 01204FFF 0000500
* SSNETLIB 019D0000 019E5FFF 0001600
* SSNMPN70 410D0000 410D5FFF 0000600
* security 01CD0000 01CD3FFF 0000400
* crypt32 7C740000 7C7C6FFF 0008700
* MSASN1 01CE0000 01CEFFFF 0001000
* msafd 02100000 0211DFFF 0001e00
* wshtcpip 02160000 02166FFF 00007000
* SSmsLPCn 021F0000 021F6FFF 00007000
* ntdsapi 02290000 022A0FFF 00011000
* SQLFTQRY 02810000 0282CFFF 0001d000
* CLBCATQ 02830000 028BFFFF 00090000
* sqloledb 028E0000 02952FFF 00073000
* MSDART 02960000 0297EFFF 0001f000
* comdlg32 02980000 029BDFFF 0003e000
* SHELL32 029C0000 02C07FFF 00248000
* MSDATL3 02C10000 02C24FFF 00015000
* oledb32 02FB0000 03015FFF 00066000
* OLEDB32R 03020000 0302FFFF 00010000
* msv1_0 03050000 03070FFF 00021000
* xpstar 410F0000 41133FFF 00044000
* SQLUNIRL 10000000 1002CFFF 0002d000
* WINSPOOL 03080000 0309DFFF 0001e000
* MPR 030A0000 030AFFFF 00010000
* SQLRESLD 42AC0000 42AC6FFF 00007000
* SQLSVC 030B0000 030C6FFF 00017000
* ODBC32 030D0000 03101FFF 00032000
* odbcbcp 03110000 03115FFF 00006000
* W95SCM 41140000 4114BFFF 0000c000
* NDDEAPI 03120000 03126FFF 00007000
* odbcint 03270000 03285FFF 00016000
* SQLSVC 03290000 03295FFF 00006000
* xpstar 032A0000 032ABFFF 0000c000
* srchadm 034E0000 0351DFFF 0003e000
* mssadmws 03520000 03534FFF 00015000
* msi 03820000 03A23FFF 00204000
* athprxy 03A40000 03A47FFF 00008000
* rsabase 7CA00000 7CA22FFF 00023000
* xpsqlbot 04160000 04165FFF 00006000
* DBGHELP 042B0000 042C2FFF 00013000
* msdbi 04AF0000 04B0BFFF 0001c000
* sqlimage 09D20000 09D2CFFF 0000d000
*
* Edi: 00000005:
* Esi: 1BB294EC: 00000000 00000025 00000000 00000000 00000003 0000000B
* Eax: 00000000:
* Ebx: 1BDCFFFD: 20000000 021BD5E0 00000000 E01BDD20 011BDD1F 00000000
* Ecx: 1BB294EC: 00000000 00000025 00000000 00000000 00000003 0000000B
* Edx: 00000E00:
* Eip: 00402453: E183088A 04E9830E 589D840F 4949001E E9830C74 0F077404
* Ebp: 03F2D2A0: 03F2D2B4 005EEA86 00A4C638 03F2D2B0 03F2E3DC 03F2E79C
* SegCs: 0000001B:
* EFlags: 00010246: 003D0052 005C005C 00410047 0049004C 0045004C 00000049
* Esp: 03F2D28C: 1BB294EC 00445CB5 00000000 00000002 1BDCF8D0 03F2D2B4
* SegSs: 00000023:
*******************************************************************************
Databases Not appearing in EM
Client is using XP Service Pack 1
When the user opens the database folder in EM no databases appear. However,
I have XP Service Pack 1 and I can see all the databases. The difference i
s
I am a SysAdmin.
Has anyone seen this before. I had the client install SQL sp 4 on his
workstation.System or user-defined databases? System databases can be hidden in the
registration properties. Does the user have permissions to the user-defined
databases (i.e., a database user account)?
HTH
Jerry
"T Man" <TMan@.discussions.microsoft.com> wrote in message
news:BF678997-E93D-4FC4-8AE2-1451136068AA@.microsoft.com...
> SQL Server 2000 Service Pack 4
> Client is using XP Service Pack 1
> When the user opens the database folder in EM no databases appear.
> However,
> I have XP Service Pack 1 and I can see all the databases. The difference
> is
> I am a SysAdmin.
> Has anyone seen this before. I had the client install SQL sp 4 on his
> workstation.|||All databases, we did further checking if we give sysadmin privalages to the
user they can see the databases. I also found out this issue occurred
earlier and another DBA resolved the issue with a reboot of the sql server.
THis time a reboot did not work. I verified the user has access to his
default database on the server
"Jerry Spivey" wrote:
> System or user-defined databases? System databases can be hidden in the
> registration properties. Does the user have permissions to the user-defin
ed
> databases (i.e., a database user account)?
> HTH
> Jerry
> "T Man" <TMan@.discussions.microsoft.com> wrote in message
> news:BF678997-E93D-4FC4-8AE2-1451136068AA@.microsoft.com...
>
>|||Have you tried deleting and re-registering the SQL Server?
"T Man" <TMan@.discussions.microsoft.com> wrote in message
news:447CCB04-487E-43AF-93F7-F5E4DF058E1F@.microsoft.com...[vbcol=seagreen]
> All databases, we did further checking if we give sysadmin privalages to
> the
> user they can see the databases. I also found out this issue occurred
> earlier and another DBA resolved the issue with a reboot of the sql
> server.
> THis time a reboot did not work. I verified the user has access to his
> default database on the server
> "Jerry Spivey" wrote:
>
Databases Not appearing in EM
Client is using XP Service Pack 1
When the user opens the database folder in EM no databases appear. However,
I have XP Service Pack 1 and I can see all the databases. The difference is
I am a SysAdmin.
Has anyone seen this before. I had the client install SQL sp 4 on his
workstation.
System or user-defined databases? System databases can be hidden in the
registration properties. Does the user have permissions to the user-defined
databases (i.e., a database user account)?
HTH
Jerry
"T Man" <TMan@.discussions.microsoft.com> wrote in message
news:BF678997-E93D-4FC4-8AE2-1451136068AA@.microsoft.com...
> SQL Server 2000 Service Pack 4
> Client is using XP Service Pack 1
> When the user opens the database folder in EM no databases appear.
> However,
> I have XP Service Pack 1 and I can see all the databases. The difference
> is
> I am a SysAdmin.
> Has anyone seen this before. I had the client install SQL sp 4 on his
> workstation.
|||All databases, we did further checking if we give sysadmin privalages to the
user they can see the databases. I also found out this issue occurred
earlier and another DBA resolved the issue with a reboot of the sql server.
THis time a reboot did not work. I verified the user has access to his
default database on the server
"Jerry Spivey" wrote:
> System or user-defined databases? System databases can be hidden in the
> registration properties. Does the user have permissions to the user-defined
> databases (i.e., a database user account)?
> HTH
> Jerry
> "T Man" <TMan@.discussions.microsoft.com> wrote in message
> news:BF678997-E93D-4FC4-8AE2-1451136068AA@.microsoft.com...
>
>
|||Have you tried deleting and re-registering the SQL Server?
"T Man" <TMan@.discussions.microsoft.com> wrote in message
news:447CCB04-487E-43AF-93F7-F5E4DF058E1F@.microsoft.com...[vbcol=seagreen]
> All databases, we did further checking if we give sysadmin privalages to
> the
> user they can see the databases. I also found out this issue occurred
> earlier and another DBA resolved the issue with a reboot of the sql
> server.
> THis time a reboot did not work. I verified the user has access to his
> default database on the server
> "Jerry Spivey" wrote:
Databases Not appearing in EM
Client is using XP Service Pack 1
When the user opens the database folder in EM no databases appear. However,
I have XP Service Pack 1 and I can see all the databases. The difference is
I am a SysAdmin.
Has anyone seen this before. I had the client install SQL sp 4 on his
workstation.System or user-defined databases? System databases can be hidden in the
registration properties. Does the user have permissions to the user-defined
databases (i.e., a database user account)?
HTH
Jerry
"T Man" <TMan@.discussions.microsoft.com> wrote in message
news:BF678997-E93D-4FC4-8AE2-1451136068AA@.microsoft.com...
> SQL Server 2000 Service Pack 4
> Client is using XP Service Pack 1
> When the user opens the database folder in EM no databases appear.
> However,
> I have XP Service Pack 1 and I can see all the databases. The difference
> is
> I am a SysAdmin.
> Has anyone seen this before. I had the client install SQL sp 4 on his
> workstation.|||All databases, we did further checking if we give sysadmin privalages to the
user they can see the databases. I also found out this issue occurred
earlier and another DBA resolved the issue with a reboot of the sql server.
THis time a reboot did not work. I verified the user has access to his
default database on the server
"Jerry Spivey" wrote:
> System or user-defined databases? System databases can be hidden in the
> registration properties. Does the user have permissions to the user-defined
> databases (i.e., a database user account)?
> HTH
> Jerry
> "T Man" <TMan@.discussions.microsoft.com> wrote in message
> news:BF678997-E93D-4FC4-8AE2-1451136068AA@.microsoft.com...
> > SQL Server 2000 Service Pack 4
> > Client is using XP Service Pack 1
> >
> > When the user opens the database folder in EM no databases appear.
> > However,
> > I have XP Service Pack 1 and I can see all the databases. The difference
> > is
> > I am a SysAdmin.
> >
> > Has anyone seen this before. I had the client install SQL sp 4 on his
> > workstation.
>
>|||Have you tried deleting and re-registering the SQL Server?
"T Man" <TMan@.discussions.microsoft.com> wrote in message
news:447CCB04-487E-43AF-93F7-F5E4DF058E1F@.microsoft.com...
> All databases, we did further checking if we give sysadmin privalages to
> the
> user they can see the databases. I also found out this issue occurred
> earlier and another DBA resolved the issue with a reboot of the sql
> server.
> THis time a reboot did not work. I verified the user has access to his
> default database on the server
> "Jerry Spivey" wrote:
>> System or user-defined databases? System databases can be hidden in the
>> registration properties. Does the user have permissions to the
>> user-defined
>> databases (i.e., a database user account)?
>> HTH
>> Jerry
>> "T Man" <TMan@.discussions.microsoft.com> wrote in message
>> news:BF678997-E93D-4FC4-8AE2-1451136068AA@.microsoft.com...
>> > SQL Server 2000 Service Pack 4
>> > Client is using XP Service Pack 1
>> >
>> > When the user opens the database folder in EM no databases appear.
>> > However,
>> > I have XP Service Pack 1 and I can see all the databases. The
>> > difference
>> > is
>> > I am a SysAdmin.
>> >
>> > Has anyone seen this before. I had the client install SQL sp 4 on his
>> > workstation.
>>
Friday, February 17, 2012
Database with Single user mode
I have a problem, where in a particular database is in single user mode (after it was restored). Now somebody in the network has logged onto this database as "sa", because of which am not able to loggin, even though I know "sa" username/pwd. Is there a way of killing the connected user session, so that I can login? Also, would it be possible to find, from which machine it was logged on earlier?
Thanks very much
GYKGYK
The problems with letting people have SA access huh. If
someone is logged on using sa, you should try to find out
what they are doing, rather than just kill them. Or are
you one of those places where everyone knows and uses the
sa account?
Either using sp_who or viewing process info through
enterprise manager you can see Host Name, ie the PC they
are logged on from. How easy that is to resolve depends on
how accessable that info is in your company.
Regards
John|||Hi John,
Thanks for the response. This server is a development server, and unfortunately every user has sa access.
Now that the database is in single user mode, and somebody else has already logged in, I am not able to login. So there is no question of using sp_who system proc. I basically, want to know if there is any method by which one can login into a database with single user mode, when other use has already logged in.
Or let me frame my question like this..
what if a user has logged into a single user mode database and go home. Does this mean other users can't login at all? I guess there should be some alternative..
Thanks
GYK
-- John Bandettini wrote: --
GYK
The problems with letting people have SA access huh. If
someone is logged on using sa, you should try to find out
what they are doing, rather than just kill them. Or are
you one of those places where everyone knows and uses the
sa account?
Either using sp_who or viewing process info through
enterprise manager you can see Host Name, ie the PC they
are logged on from. How easy that is to resolve depends on
how accessable that info is in your company.
Regards
John|||The question is whether the server is in single user (-m) or the database.
If the server: You shouldn't run the server in this mode normally. Only when
restoring the master database.
If the database: Kick out the user (KILL).
--
Tibor Karaszi, SQL Server MVP
Archive at:
http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"GYK" <anonymous@.discussions.microsoft.com> wrote in message
news:427A3F1F-685C-4F42-8194-D7127D3454CF@.microsoft.com...
> Hi John,
> Thanks for the response. This server is a development server, and
unfortunately every user has sa access.
> Now that the database is in single user mode, and somebody else has
already logged in, I am not able to login. So there is no question of using
sp_who system proc. I basically, want to know if there is any method by
which one can login into a database with single user mode, when other use
has already logged in.
> Or let me frame my question like this..
> what if a user has logged into a single user mode database and go home.
Does this mean other users can't login at all? I guess there should be some
alternative..
> Thanks
> GYK
> -- John Bandettini wrote: --
> GYK
> The problems with letting people have SA access huh. If
> someone is logged on using sa, you should try to find out
> what they are doing, rather than just kill them. Or are
> you one of those places where everyone knows and uses the
> sa account?
> Either using sp_who or viewing process info through
> enterprise manager you can see Host Name, ie the PC they
> are logged on from. How easy that is to resolve depends on
> how accessable that info is in your company.
> Regards
> John
>|||You can still get the info, run sp_who from master
database or use enterprise manager. You are getting
process information for the entire server, you don't need
to be in the user database.
Have you tried to issue a kill? In enterprise manager
double click the process id, see if you get the option to
kill. An alternative might be to get your NT/Windows admin
to kill the network connection based on the host id.
Hope this helps
John
Database vs Schema
We currently have a product in which each client has their own Database. We adjust the connection when a user for that client logs into the system. This system has continued to grow and a good pace, but we have come to a point where failover is taking too long.
Refactoring the Database to handle multiple sites in a single database is not an option because of the time it would take to make the change. So, we are looking for another way in which this could be handle. One idea is to take multiple clients and place them in a single database using a schema to seperate them. (ex. Client A = server1.db1.schema1, Client B = server1.db1.schema2, etc).
Is there another option that would be better, or what kind of performance can we expect if we follow this path? Or, is there a way to decrease the failover time (it appears the problem is the startup of the database on the failover server)?
Thad
You are right that having a large number of databases will increase your fail-over time in a fail-over cluster.
Since you mentioned schemas, you must be on SQL Server 2005. For fail-over time, database mirroring is much faster than fail-over clustering. Database mirroring does require twice the storage space, and the licensing situation is not good compared to an Active/Passive cluster. You would have to mirror each database individually.
Are you failing-over for maintenance, rolling upgrades, etc.? Maintaining and adding dozens of schema in a database would be cumbersome and prone to error. It also has some performance drawbacks, since if you don't properly schema qualify a SP name (from code), or a table name (in an SP), you will have name resolution problems and cache misses.
Depending on the numbers of clients you are talking about, I would think about getting another cluster to split the load.
|||Currently the failover system is done for disaster recovery scenarios. As for performance. All our inline sql from the client class generate sql similar to
Code Snippet
SELECT [Schema].[Table].[Field] FROM [Schema].[Table]While a stored procedure is set is setup so it exists in each schema, but the schema name is not used in the sproc body. This is the same method we would use with Views and Functions.
Code Snippet
CREATE PROCEDURE [Schema].[ProcedureName](@.Param INT) ASBEGIN
SELECT * FROM [Table]
END
Would setting up the schema in this way cause these performance drawbacks. I am thinking that maintaining multiple schema will be as error prone as setting up the single db for each client.
Currently we are talking about approx 1000+ clients.
|||If your client code can pick up the schema name dynamically from a config file or something, then having a schema for each client as opposed to a database for each client will probably be not much different from a maintenance and configuration perspective.
There may be some negative effects on your buffer cache and procedure cache from this approach. Instead of having one large, normalized table that holds data for all your clients in a single database, you will have one table for each client. You will have multiple copies of the same SP (for different schemas) in your procedure cache.
|||Currently the client already selects the Database so we would just need to add a schema selector to the data selection. So all that is straight forward. And yes we are duplicating the entire database inside a schema.As for the procedure and data cache, which I am not completely familar with, would it not be the same as multiple database?
I can that this is not the best solution, but I think it may be the best solution given the time and other hardware constraints we have. So, it appears that there are little differences in performance and maintenance that we already deal with.
Database UserLogin suddenly deleted
The user was working okay around 8 Am and suddenly at 9 AM he was disconeccted from the system
After reviewing what went wrong, I noticed his account was no longer in the database users
All I did was to add the account, but why did this happened? I am worried since the system works 24 hrs a day
Any advice
Thank you.I've never heard of such thing ever happened. I'd suspect someone or a
program executed sp_revokedbacces and/or sp_revokeloing/sp_droplogin.
--
Tibor Karaszi, SQL Server MVP
Archive at:
http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"Daniel Roche" <dan_rb@.hotmail.com> wrote in message
news:F16F11F1-3FDB-45A0-B58F-BD4269B6B873@.microsoft.com...
> Anyone has an idea why a user login in one of my databases got suddenly
deleted?
> The user was working okay around 8 Am and suddenly at 9 AM he was
disconeccted from the system.
> After reviewing what went wrong, I noticed his account was no longer in
the database users.
> All I did was to add the account, but why did this happened? I am worried
since the system works 24 hrs a day.
> Any advice?
> Thank you.|||Is there a possibility that the database was restored at 9 AM?
--
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
What hardware is your SQL Server running on?
http://vyaskn.tripod.com/poll.htm
"Daniel Roche" <dan_rb@.hotmail.com> wrote in message
news:F16F11F1-3FDB-45A0-B58F-BD4269B6B873@.microsoft.com...
Anyone has an idea why a user login in one of my databases got suddenly
deleted?
The user was working okay around 8 Am and suddenly at 9 AM he was
disconeccted from the system.
After reviewing what went wrong, I noticed his account was no longer in the
database users.
All I did was to add the account, but why did this happened? I am worried
since the system works 24 hrs a day.
Any advice?
Thank you.
Database User Problem PLEASE HELP
Could not create new Database.Login failed for user "Nothadoth". Reason: Not assosiated with a trusted SQL Server connection
Can somebody help?
Thanks,
Noth
(Btw: This error occured when I was manually trying to connect my VBPortal to a DB)The root of your problem is most likely in your connection string. More importantly, what authentication are you trying to use when connecting to SQL (Windows or SQL)? The error leads me to believe you are using Windows authentication, where you probably should be using SQL Authentication if your app is on the net. IF you want to use SQL Authentication would have to have been set up when you installed SQL Server. Do you have an "sa" account and password? If so then your SQL Instance is set up for SQL Authentication.|||It asked me for an SA Password. That's it.
And yes, i'm using SQL Authentication.|||can you post the connection string that you are using.|||I've just checked the problem.
What i'm trying to do is create a database through the file PortalDB.sql
Please help, I need this up by tomorrow
Cheers,
Noth|||I need to see code to help.|||My MSN is: nothadoth_@.hotmail.com
my AIM: nothadoth12
Yahoo: nothadoth
There are some contacts, please add me if you can.
---
Someone told me that I needed to create it in the Start>Run>Cmd
He said input this code: OSQL -E -i D:\PortalVB\PortalDB.sql
(-E means Trusted Connection)
When I put that in, this happened.
[I cannot copy the code it's self because the CMD won't let me copy :( ]
It said:
Msg 1801, Level 16, State 3, Server FRED, Line 8, Database 'Portal' already exists.
After that a load of numbers just appeared, then varied from around 1-699 or so, and looked like this.
1> 2> 3> 2> 2> 1>
Then eventualy it said:
<1 Row Affected>
<1 Row Affected>
<1 Row Affected>
<1 Row Affected>
<1 Row Affected>
<1 Row Affected>
<1 Row Affected>
<1 Row Affected>
<1 Row Affected>
<1 Row Affected>
<1 Row Affected>
<1 Row Affected>
<1 Row Affected>
<1 Row Affected>
<1 Row Affected>
<1 Row Affected>
<1 Row Affected>
<1 Row Affected>
<1 Row Affected>
<1 Row Affected>
<1 Row Affected>
<1 Row Affected>
<1 Row Affected>
<1 Row Affected>
<1 Row Affected>
<1 Row Affected>
<1 Row Affected>
<1 Row Affected>
<1 Row Affected>
<1 Row Affected>
<1 Row Affected>
<1 Row Affected>
<1 Row Affected>
<1 Row Affected>
<1 Row Affected>
<1 Row Affected>
<1 Row Affected>
<1 Row Affected>
Then I tried doing the IBuySpy setup again and it said "Configuration Failed" when trying to create a database.
Database User Privilege Report
I need to produce a report for the database level user permission.
like for a database: DB_A, I want to output as such:
[SELECT] [INSERT] [UPDATE] [DELETE] [CREATE TABLE] ... other
public G D
guest D D D D D
dbo G G G G G
user_A G D D D G
G stands for Grant and D stands for Deny.
I need not only to look at direct grant/deny but also whether that user
is a member of fixed database role and fixed server role. like dbo will
have G on all.
I am trying to look into sysprotects table and looking at lines with id
= 0 but I just can't get to know what different action and protecttype
numbers means!
Many thanksNew MSSQL DBA (boscong88@.gmail.com) writes:
> hi, can anyone help me out with this report.
> I need to produce a report for the database level user permission.
> like for a database: DB_A, I want to output as such:
> [SELECT] [INSERT] [UPDATE] [DELETE] [CREATE TABLE] ... other
> public G D
> guest D D D D D
> dbo G G G G G
> user_A G D D D G
> G stands for Grant and D stands for Deny.
> I need not only to look at direct grant/deny but also whether that user
> is a member of fixed database role and fixed server role. like dbo will
> have G on all.
> I am trying to look into sysprotects table and looking at lines with id
>= 0 but I just can't get to know what different action and protecttype
> numbers means!
Did you lookup sysprotects in Books Online? There is a quite clear list
of what the numbers mean.
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp
database user post extraction
NOTE: the only post that was deleted was post made by me none of the other member post was deleted
i did not want to restore the entire post table beacause i would loose post in the past 3 weeks
can anyone help me with a script or anything i can used to extract post of the post table where the poster id is 1
here is a sample
INSERT INTO `ibf_posts` VALUES (2, 0, NULL, 1, 'albertldee', 1, 1, '12.8.34.199'
INSERT INTO `ibf_posts` VALUES (3, 0, NULL, 4, '??-?', 1, 1, '207.44.154.35
INSERT INTO `ibf_posts` VALUES (4, 0, NULL, 6, 'demarcus', 1, 1, '69.142.131.149
INSERT INTO `ibf_posts` VALUES (5, 0, NULL, 7, 'gottasteu', 1, 1, '65.12.169.41
the post table has about 122000 line like above i just want to extract all the line that has albertldee like line number 1Try something like:
INSERT INTO ibf_posts
SELECT * FROM ibf_posts_backup
WHERE user_id = 'albertldee';
NOTE: Change user_id to the correct column name.
:D|||thanks but how do i set it up|||or can anyone tell me how can i setup a query to check a table and insert a line if it's not already exist|||Post a description of both the 'ibf_posts' and the backup table.
:confused:
Database user permission
the user role is Public.
But when you login in this database with SQL Query Analyzer using this user account, in Object Browser (left side), this user can see all info same as dbo, such as table name, column, data types,... although this user can not access the data for others tables.
How to limit the this user view in Object Browser and only see the tables that the user have proper permission on?
With SQL Server 2000, you could NOT limit the user. They can 'see' all objects in the database.
With SQL Server 2005, the user can only see the objects in the schema(s) they have permissions for.
Are you using SQL 2000?
|||Thanks for reply. Yes, I use SQL Server 2000|||Unfortunately, with SQL 2000, all users can see all database objects with the client tools.
There is nothing you can do about it -except upgrade to SQL 2005. With SQL 2005, you can keep things private and undisclosed.
Database user and Corresponding login
Hi everyone,
I have a simple question regarding the database users on sqlserver 2005.
When i run a 'sp_helpuser' stored procedure in a database to know the usernames and their corresponding loginsName, i find there are some usernames with corresponding loginName as null.I know for sure that for 'Guest' username the corresponding loginName will be Null, but i find many normal database users with Null login names.
Can anyone throw some light on this scenario?.and what about 'dbo' user in a database? can dbo user have a 'NULL' login name or 'sa' login by default?. Please help me
Thanks in advance.
Regards
Arvind L
You can use sp_change_users_login 'Report' to find out if there are orphaned users. (users with no login)
There are users like 'Guest', 'dbo', 'INFORMATION_SCHEMA' that will not have logins associated because these are defined by the system, but if there are users like 'George', etc. then these are most likely users that were created at one time by users or admins. The above command will help you to know which users are orphaned and can be fixed by creating logins and associating them with the user.
When a sysadmin user logs in, they do not necessarily have a user for every database because they can query any database. Those with specific permissions db_datareader or db_datawriter, etc. will need to have a user in the database that they are trying to query because they are limited to permissions assigned.
HTH.
|||One possible senario is, this database might be restored from another sql server instance and that server may be having these logins-users mapping. Once the database is shifted from one server to another the user-login mapping breaks though the logins are there in the new instance. you need to remap the orphaned user with the logins using sp_change_users_login
Madhu
|||Thanks Ben and Madhu..for the useful piece of info!!!database user
Didnt really tried it, but must be the "magic" number of objects 32768 like
database per instance.
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
"Joh" <joh@.mailcity.com> schrieb im Newsbeitrag
news:enoIGp8WFHA.2700@.TK2MSFTNGP12.phx.gbl...
> What are the maximum limitation of database user ?
>
|||Hi,
It is 32767 per instance.
Thanks
Hari
SQL Server MVP
"Joh" <joh@.mailcity.com> wrote in message
news:enoIGp8WFHA.2700@.TK2MSFTNGP12.phx.gbl...
> What are the maximum limitation of database user ?
>
|||Thanks
"Hari Prasad" <hari_prasad_k@.hotmail.com> wrote in message
news:uaQzk29WFHA.2060@.tk2msftngp13.phx.gbl...
> Hi,
> It is 32767 per instance.
> Thanks
> Hari
> SQL Server MVP
> "Joh" <joh@.mailcity.com> wrote in message
> news:enoIGp8WFHA.2700@.TK2MSFTNGP12.phx.gbl...
>
Tuesday, February 14, 2012
database updation log
(sql 2000) at what time. pl help
regards, shahidYou need to have a trace running at that point-in-time, to see what the
users were running at that time. Do you have one?
Or you need to have some sort of logging in your application or stored
procedures.
--
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
Is .NET important for a database professional?
http://vyaskn.tripod.com/poll.htm
"shahid" <anonymous@.discussions.microsoft.com> wrote in message
news:2b13201c467fb$a8013480$a401280a@.phx
.gbl...
how could I see which user run what query on the datbase
(sql 2000) at what time. pl help
regards, shahid|||Hi,
SQL Server will not log any Select statements. Only way to look into that is
activate Profiler. You can save the profiler output to a Table for analysis.
FYI, You can see the information only from the point you activate the
profier.
For doing this you could use the GUI interface Profiler or look into the
books online for the procedure "sp_trace_create".
Thanks
Hari
MCDBA
"shahid" <anonymous@.discussions.microsoft.com> wrote in message
news:2b13201c467fb$a8013480$a401280a@.phx
.gbl...
> how could I see which user run what query on the datbase
> (sql 2000) at what time. pl help
> regards, shahid
database type question
Hi everyone, I am trying to create a page on my website that will be unique depending on the logged on user. Basically, I have a aspnet_User table, a Team table, and a Player table. What I am trying to do is make a datagridview that is editable, but only showing the 'players' from the player table that is associated to that member. I have tried to set a relation between the tables in a dataset, but that only got me so far before I got stuck, and I've also tried to do it making a view between the three tables before I got stuck. My tables look like this:
'aspnet_Users' has a
User ID
User Name
along with the other column associated with this table
'Team' has a
Team ID
Team Name
User Name
'Player' has a
Player Name
Team ID
Player Rating
Class
What I would really like to be able to do, is when the webpage is loaded, the datagridview reads the User Name from the aspnet_User table and matches it to the corresponding Team ID in the Team Table and then filters the 'Player' table to only show players with the corresponding Team ID. I have been stuck on this for two weeks now and it is driving me crazy. I seem to get a breakthrough only to get stuck again. Please Help!!! If you need any more info from me, please let me know!
Use a stored procedure as your datasource for your GV. Pass the teamID in as a parameter.
|||What you need is a gridview that is populated by a parameterised query, like so:
SELECT
PlayerName
FROM
Team INNER JOIN Player ON Team.TeamID = Player.TeamID INNER JOIN
aspnet_users ON Team.UserName = aspnet_users.UserName
WHERE
aspnet_users.UserName @.UserName
Set this at the SQL for the Gridview and then the @.UserName parameter's value is Context.User.Identity.Name. Context.User.Identity.Name is the username of the currently logged in user.
|||Ok, now, stupid question
By gridview, you mean make a view from the database right?
I then put in the three tables, make my relationship and add in the sql statement you just provided me, correct?
Then where, and/or how do I set the parameter's value?
I really appreciate the help guys, I think this is starting to make sense!
|||Ok,
I made my gridview with the 3 tables and tried to insert the sql statement you gave me and it tells me this
incorrect syntax near @.UserName
|||Here's a good thread for you:
http://forums.asp.net/p/991273/1317881.aspx
|||First off, thank everyone so far for all your help.
I think I have everything set up the way it is supposed to be. When I test the query and type in 'ryan', one of my UserNames it returns the correct team. if I try to type in a wrong name that does not exist (i even put a name in the Team table and not the username table, and it didn't pull, so i think it is pulling from the right table)
Here's the problem. when i go to web page preview, no datagridview shows up on my page, nothing, nada, zip...like it doesn't exist.
what do i have wrong?
|||Ah. Try a databind for your grid on the GridView_PreRender event.
|||So are you typing in a username in a textbox and then clicking a button? On the button click event are you calling the DataBind method on your gridview?
All you need to do is call this in your PageLoad event after setting the textbox.text to the name of the currently logged in user. Do you follow?
|||I've got a login box that i inserted through the ide. in the code it doesn't give a pageload reference. i remember doing a pageload on a button click with visual basic, but i'm not sure how to work in into this.
<asp:LoginID="Login1"runat="server"BackColor="#EFF3FB"BorderColor="#B5C7DE"BorderPadding="4"
BorderStyle="Solid"BorderWidth="1px"Font-Names="Verdana"Font-Size="0.8em"
ForeColor="#333333"DestinationPageUrl="index.aspx">
<TitleTextStyleBackColor="#507CD1"Font-Bold="True"Font-Size="0.9em"ForeColor="White"/>
<InstructionTextStyleFont-Italic="True"ForeColor="Black"/>
<TextBoxStyleFont-Size="0.8em"/>
<LoginButtonStyleBackColor="White"BorderColor="#507CD1"BorderStyle="Solid"BorderWidth="1px"
Font-Names="Verdana"Font-Size="0.8em"ForeColor="#284E98"/>
</asp:Login>
It gives me a destination url, but thats about it. does the code need to go into here somewhere?
btw, thank you for your help and patience
|||Where's your codebehind?
<%@. Page Language="C#"
MasterPageFile="~/MasterPage.master"
AutoEventWireup="true"
EnableEventValidation="false"
Inherits="blah.blah.blah"
Title="balh : blah"
Codebehind="blah.aspx.cs"
Description="blah."
Theme="blah"
EnableTheming="true"
%>
can you give me an example?
btw, it tells me that codebehind is no longer used
|||ummm. I'm using it. Is there something someone needs to tell me?
Are you using VS2005? When you start a project in C#, select Web and you'll get a aspx and aspx.cs (codebehind) pages. If you are using VB, you may need to wire up the codebehind manually, I don't know. Does anyone out there know about codebehind being obsoleted? AM I CODEBEHIND THE CURVE!?!?!?!
sorry, i'm using vb not c#, my files are aspx.vb
its telling me that it is still compatible with asp.net 2.0, but now they would 'rather' you use the codefile and the inherits property
ok, i can get into the aspx.vb files and it gives me
PartialClass Teams_westervilleInherits System.Web.UI.Page
EndClass
i put the page_load into here, right?
I'm at work right now, going to try it when i get home
|||Must be a VB thing. My ASP.Net 2.0 C# page here has a codebehind and an inherits. I'm inheriting what appears to be the namespace... but it compiles. so it must be right, right?