Showing posts with label customer. Show all posts
Showing posts with label customer. Show all posts

Thursday, March 22, 2012

DB Statistics

Help please
I am an old UNIFY guy and I am doing some work on SQL2000 for a customer.
Is there an easy way to get DB/table statistics, table name, rows, last
accessed.
Thanks for any direction and assistance.
George
Hi,
sp_monitor -- Gives the SQL Server statistics
sp_helpdb <dbname> -- Gives you the details of database size, Options set,
FIle group information , File details...
Table -- Query the sysobjects table for name, created date
Number of rows -- sp_spaceused <table name>
Last accessesed date for table will not be stored by default , you may neeed
to write a trigger or use Log explorer from Lumigent.com
sp_configure -- Gives you all the parameter list and its values.
Thanks
Hari
MCDBA
"george collins" <george@.nospan.com> wrote in message
news:e44UTyvJEHA.620@.TK2MSFTNGP10.phx.gbl...
> Help please
> I am an old UNIFY guy and I am doing some work on SQL2000 for a customer.
> Is there an easy way to get DB/table statistics, table name, rows, last
> accessed.
> Thanks for any direction and assistance.
> George
>

DB Statistics

Help please
I am an old UNIFY guy and I am doing some work on SQL2000 for a customer.
Is there an easy way to get DB/table statistics, table name, rows, last
accessed.
Thanks for any direction and assistance.
GeorgeHi,
sp_monitor -- Gives the SQL Server statistics
sp_helpdb <dbname> -- Gives you the details of database size, Options set,
FIle group information , File details...
Table -- Query the sysobjects table for name, created date
Number of rows -- sp_spaceused <table name>
Last accessesed date for table will not be stored by default , you may neeed
to write a trigger or use Log explorer from Lumigent.com
sp_configure -- Gives you all the parameter list and its values.
Thanks
Hari
MCDBA
"george collins" <george@.nospan.com> wrote in message
news:e44UTyvJEHA.620@.TK2MSFTNGP10.phx.gbl...
> Help please
> I am an old UNIFY guy and I am doing some work on SQL2000 for a customer.
> Is there an easy way to get DB/table statistics, table name, rows, last
> accessed.
> Thanks for any direction and assistance.
> George
>sql

DB Statistics

Help please
I am an old UNIFY guy and I am doing some work on SQL2000 for a customer.
Is there an easy way to get DB/table statistics, table name, rows, last
accessed.
Thanks for any direction and assistance.
GeorgeHi,
sp_monitor -- Gives the SQL Server statistics
sp_helpdb <dbname> -- Gives you the details of database size, Options set,
FIle group information , File details...
Table -- Query the sysobjects table for name, created date
Number of rows -- sp_spaceused <table name>
Last accessesed date for table will not be stored by default , you may neeed
to write a trigger or use Log explorer from Lumigent.com
sp_configure -- Gives you all the parameter list and its values.
Thanks
Hari
MCDBA
"george collins" <george@.nospan.com> wrote in message
news:e44UTyvJEHA.620@.TK2MSFTNGP10.phx.gbl...
> Help please
> I am an old UNIFY guy and I am doing some work on SQL2000 for a customer.
> Is there an easy way to get DB/table statistics, table name, rows, last
> accessed.
> Thanks for any direction and assistance.
> George
>

Sunday, March 11, 2012

DB read only after reattached

I am running into a problem that I need help with. The problem is
preventing me from successfully installing our software at a new
customer site. The system configuration is Windows Server 2000 SP 4
with SQL 2005 SP 1.
The problem is that when our install tries to attach the mdf and ldf
files, the process fails because the database is read-only and this
prevents the files from being upgraded from SQL 2005 (they are from a
SQL 2000 system). I have seen this problem in the past and it has
always been due to a permissions issue. If the service that SQL
Server is running under does not have write permission to the folder
that the files are located in, then this problem will show up.
However, this does not seem to be the case at present. In trouble-
shooting this problem, I have discovered that I can create a new
database with no problem at all (showing that I do have write
permission), but if I detach that database and then reattach the
associated mdf file, it will be reattached as a read-only database. I
can change the read-only option setting of this database to False and
that will then allow me to write to the db once again, but why did SQL
Server make it read-only when I reattached it?Try to dig something in this
http://www.dbtalk.net/microsoft-public-sqlserver-setup/attach-database-became-readonly-301452.html
Manu
"Brandon Wilhite" wrote:
> I am running into a problem that I need help with. The problem is
> preventing me from successfully installing our software at a new
> customer site. The system configuration is Windows Server 2000 SP 4
> with SQL 2005 SP 1.
> The problem is that when our install tries to attach the mdf and ldf
> files, the process fails because the database is read-only and this
> prevents the files from being upgraded from SQL 2005 (they are from a
> SQL 2000 system). I have seen this problem in the past and it has
> always been due to a permissions issue. If the service that SQL
> Server is running under does not have write permission to the folder
> that the files are located in, then this problem will show up.
> However, this does not seem to be the case at present. In trouble-
> shooting this problem, I have discovered that I can create a new
> database with no problem at all (showing that I do have write
> permission), but if I detach that database and then reattach the
> associated mdf file, it will be reattached as a read-only database. I
> can change the read-only option setting of this database to False and
> that will then allow me to write to the db once again, but why did SQL
> Server make it read-only when I reattached it?
>|||Hooray!!! The problem has been resolved!
The problem with attaching databases always being set to a Read-Only
status was corrected by upgrading the server from Windows Server 2000
to Windows Server 2003. My bet is that the real cause of this issue
was due to the fact that the customer had set this server up as a
backup domain controller, and I think that because it was a Windows
2000 system, it was not communicating properly with the primary domain
controller (which is their Windows 2003 SBS server). This was
probably causing some ambiguity in determining permissions.
On Dec 12, 8:51 am, manu <m...@.discussions.microsoft.com> wrote:
> Try to dig something in thishttp://www.dbtalk.net/microsoft-public-sqlserver-setup/attach-databas...
> Manu
>
> "Brandon Wilhite" wrote:
> > I am running into a problem that I need help with. The problem is
> > preventing me from successfully installing our software at a new
> > customer site. The system configuration is Windows Server 2000 SP 4
> > with SQL 2005 SP 1.
> > The problem is that when our install tries to attach the mdf and ldf
> > files, the process fails because the database is read-only and this
> > prevents the files from being upgraded from SQL 2005 (they are from a
> > SQL 2000 system). I have seen this problem in the past and it has
> > always been due to a permissions issue. If the service that SQL
> > Server is running under does not have write permission to the folder
> > that the files are located in, then this problem will show up.
> > However, this does not seem to be the case at present. In trouble-
> > shooting this problem, I have discovered that I can create a new
> > database with no problem at all (showing that I do have write
> > permission), but if I detach that database and then reattach the
> > associated mdf file, it will be reattached as a read-only database. I
> > can change the read-only option setting of this database to False and
> > that will then allow me to write to the db once again, but why did SQL
> > Server make it read-only when I reattached it... Hide quoted text -
> - Show quoted text -

Thursday, March 8, 2012

db owner

My customer upsized his Access database tables. Then we linked the Access
front end to the SQL server. But instead of seeing the tables named
dbo_Customer and dbo_Orders we are seeing timothyl_Customer and
timothyl_Orders.
Obviously, he was not a member of the system administrators when he created
the tables, so he is the owner. But now my stored procedures, etc., which
refer to dbo.Customer do not work!
How can I fix this so that I can get back to dbo.filename?COnsider using SP_Changeobjectowner to change the owner of the objects.
--
HTH, Jens Suessmeyer.
--
http://www.sqlserver2005.de
--
"menacher" <menacher@.discussions.microsoft.com> schrieb im Newsbeitrag
news:DCB21288-FAC2-40FA-9F56-9D9A4AC818FF@.microsoft.com...
> My customer upsized his Access database tables. Then we linked the Access
> front end to the SQL server. But instead of seeing the tables named
> dbo_Customer and dbo_Orders we are seeing timothyl_Customer and
> timothyl_Orders.
> Obviously, he was not a member of the system administrators when he
> created
> the tables, so he is the owner. But now my stored procedures, etc., which
> refer to dbo.Customer do not work!
> How can I fix this so that I can get back to dbo.filename?|||Would you agree that the syntax should read
exec sp_changeobjectowner 'timothyl.customer', 'sa'
I assume that the owner 'sa' (the built in administrator) is the proper
owner?
Viele dank.
"Jens Sü�meyer" wrote:
> COnsider using SP_Changeobjectowner to change the owner of the objects.
> --
> HTH, Jens Suessmeyer.
> --
> http://www.sqlserver2005.de
> --
> "menacher" <menacher@.discussions.microsoft.com> schrieb im Newsbeitrag
> news:DCB21288-FAC2-40FA-9F56-9D9A4AC818FF@.microsoft.com...
> > My customer upsized his Access database tables. Then we linked the Access
> > front end to the SQL server. But instead of seeing the tables named
> > dbo_Customer and dbo_Orders we are seeing timothyl_Customer and
> > timothyl_Orders.
> >
> > Obviously, he was not a member of the system administrators when he
> > created
> > the tables, so he is the owner. But now my stored procedures, etc., which
> > refer to dbo.Customer do not work!
> >
> > How can I fix this so that I can get back to dbo.filename?
>
>|||(Viele dank. --> Cool, but its "Vielen Dank", just for your personal
knowledge no to be a peapicker ;-) )
No, it should read exec sp_changeobjectowner 'timothyl.customer', 'dbo'
--
HTH, Jens Suessmeyer.
--
http://www.sqlserver2005.de
--
"menacher" <menacher@.discussions.microsoft.com> schrieb im Newsbeitrag
news:8F5E8126-09DC-4E3E-AA30-5C8EE0ABDDC5@.microsoft.com...
> Would you agree that the syntax should read
> exec sp_changeobjectowner 'timothyl.customer', 'sa'
> I assume that the owner 'sa' (the built in administrator) is the proper
> owner?
> Viele dank.
> "Jens Süßmeyer" wrote:
>> COnsider using SP_Changeobjectowner to change the owner of the objects.
>> --
>> HTH, Jens Suessmeyer.
>> --
>> http://www.sqlserver2005.de
>> --
>> "menacher" <menacher@.discussions.microsoft.com> schrieb im Newsbeitrag
>> news:DCB21288-FAC2-40FA-9F56-9D9A4AC818FF@.microsoft.com...
>> > My customer upsized his Access database tables. Then we linked the
>> > Access
>> > front end to the SQL server. But instead of seeing the tables named
>> > dbo_Customer and dbo_Orders we are seeing timothyl_Customer and
>> > timothyl_Orders.
>> >
>> > Obviously, he was not a member of the system administrators when he
>> > created
>> > the tables, so he is the owner. But now my stored procedures, etc.,
>> > which
>> > refer to dbo.Customer do not work!
>> >
>> > How can I fix this so that I can get back to dbo.filename?
>>

db owner

My customer upsized his Access database tables. Then we linked the Access
front end to the SQL server. But instead of seeing the tables named
dbo_Customer and dbo_Orders we are seeing timothyl_Customer and
timothyl_Orders.
Obviously, he was not a member of the system administrators when he created
the tables, so he is the owner. But now my stored procedures, etc., which
refer to dbo.Customer do not work!
How can I fix this so that I can get back to dbo.filename?
COnsider using SP_Changeobjectowner to change the owner of the objects.
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
"menacher" <menacher@.discussions.microsoft.com> schrieb im Newsbeitrag
news:DCB21288-FAC2-40FA-9F56-9D9A4AC818FF@.microsoft.com...
> My customer upsized his Access database tables. Then we linked the Access
> front end to the SQL server. But instead of seeing the tables named
> dbo_Customer and dbo_Orders we are seeing timothyl_Customer and
> timothyl_Orders.
> Obviously, he was not a member of the system administrators when he
> created
> the tables, so he is the owner. But now my stored procedures, etc., which
> refer to dbo.Customer do not work!
> How can I fix this so that I can get back to dbo.filename?
|||Would you agree that the syntax should read
exec sp_changeobjectowner 'timothyl.customer', 'sa'
I assume that the owner 'sa' (the built in administrator) is the proper
owner?
Viele dank.
"Jens Sü?meyer" wrote:

> COnsider using SP_Changeobjectowner to change the owner of the objects.
> --
> HTH, Jens Suessmeyer.
> --
> http://www.sqlserver2005.de
> --
> "menacher" <menacher@.discussions.microsoft.com> schrieb im Newsbeitrag
> news:DCB21288-FAC2-40FA-9F56-9D9A4AC818FF@.microsoft.com...
>
>
|||(Viele dank. --> Cool, but its "Vielen Dank", just for your personal
knowledge no to be a peapicker ;-) )
No, it should read exec sp_changeobjectowner 'timothyl.customer', 'dbo'
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
"menacher" <menacher@.discussions.microsoft.com> schrieb im Newsbeitrag
news:8F5E8126-09DC-4E3E-AA30-5C8EE0ABDDC5@.microsoft.com...[vbcol=seagreen]
> Would you agree that the syntax should read
> exec sp_changeobjectowner 'timothyl.customer', 'sa'
> I assume that the owner 'sa' (the built in administrator) is the proper
> owner?
> Viele dank.
> "Jens Smeyer" wrote:

db owner

My customer upsized his Access database tables. Then we linked the Access
front end to the SQL server. But instead of seeing the tables named
dbo_Customer and dbo_Orders we are seeing timothyl_Customer and
timothyl_Orders.
Obviously, he was not a member of the system administrators when he created
the tables, so he is the owner. But now my stored procedures, etc., which
refer to dbo.Customer do not work!
How can I fix this so that I can get back to dbo.filename?COnsider using SP_Changeobjectowner to change the owner of the objects.
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
--
"menacher" <menacher@.discussions.microsoft.com> schrieb im Newsbeitrag
news:DCB21288-FAC2-40FA-9F56-9D9A4AC818FF@.microsoft.com...
> My customer upsized his Access database tables. Then we linked the Access
> front end to the SQL server. But instead of seeing the tables named
> dbo_Customer and dbo_Orders we are seeing timothyl_Customer and
> timothyl_Orders.
> Obviously, he was not a member of the system administrators when he
> created
> the tables, so he is the owner. But now my stored procedures, etc., which
> refer to dbo.Customer do not work!
> How can I fix this so that I can get back to dbo.filename?|||Would you agree that the syntax should read
exec sp_changeobjectowner 'timothyl.customer', 'sa'
I assume that the owner 'sa' (the built in administrator) is the proper
owner?
Viele dank.
"Jens Sü?meyer" wrote:

> COnsider using SP_Changeobjectowner to change the owner of the objects.
> --
> HTH, Jens Suessmeyer.
> --
> http://www.sqlserver2005.de
> --
> "menacher" <menacher@.discussions.microsoft.com> schrieb im Newsbeitrag
> news:DCB21288-FAC2-40FA-9F56-9D9A4AC818FF@.microsoft.com...
>
>|||(Viele dank. --> Cool, but its "Vielen Dank", just for your personal
knowledge no to be a peapicker ;-) )
No, it should read exec sp_changeobjectowner 'timothyl.customer', 'dbo'
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
--
"menacher" <menacher@.discussions.microsoft.com> schrieb im Newsbeitrag
news:8F5E8126-09DC-4E3E-AA30-5C8EE0ABDDC5@.microsoft.com...[vbcol=seagreen]
> Would you agree that the syntax should read
> exec sp_changeobjectowner 'timothyl.customer', 'sa'
> I assume that the owner 'sa' (the built in administrator) is the proper
> owner?
> Viele dank.
> "Jens Smeyer" wrote:
>

Tuesday, February 14, 2012

db free space and login timeout -strange

I saw something strange this morning that I can not work out in my head.

Customer contacted us saying that the login timeout for one of our web apps was timing out.

The login does a simple check of user name and password against a table and inserts the event into a tracking table. I traced the login routine and the query took zero seconds in the QA on the db server. Everything looked fine in the Task Manager and the Performance monitor except that the disk que spiked out when the login page was used. I pinged between the web and database server and that was fine. The disk had plenty of free space for the log and the mdf files. The db had about of 15mb of unallocated space. Nothing seemed to work until I allocated another 100 MB to the db on their test site. Suddenly no more time out. I tested the live site again and it was still happening (same db and web server). Bumped up the db size on the live site and boom no more problem.

The problem is "fixed" for the moment but I can not seem to reason why so I can actually fix the problem in the long run. I do not know why a simple little password routine would care about the difference between 15mb of unallocated space and 115 mb of unallocated space.From the explanation, it looks like the system tried to expand a file (whether data or log, I am not sure, but I would bet data), but could not do so in the timeout period. What is the growth increment of the file? If you did not change the size of the file, but increased the max-size of the file, did the file grow? Lastly, do you get the disk queue spike, now that the database has been expanded?|||10%, but they had free space. I neglected to check the log file and I neglected to check the perf mon after the symptoms subsided. If I get some time today (a big if) I will try to recreate.|||The log file would not have shown a file auto-grow event. Profiler can capture that, but the history is lost, if you are not watching specifically for that. Hopefully that's changed in 2005. I am a bit suspicious of the free space being available, since you need to run dbcc updateusage to get accurate numbers, but I figure you did that already.