Showing posts with label view. Show all posts
Showing posts with label view. Show all posts

Sunday, March 25, 2012

Determine if database objects are being accessed

Is there anyway of determining if a view or function is being accessed?
I've moved a lot of objects between schemas and to prevent any code
breaking used views and functions to 'redirect' to the new schema.
Is there any way to determine if anything is accessing these objects so
I know I'm safe to remove them? The profiler doesn't seem to be
able to do it. I'm using SQL Server 2005.
Hi
AFAIK there is not any very simple method of doing this, that can be 100%
guaranteed.
If you have scripted all your stored procedures etc. then you could use a
textual search to find references to these views. As you are already using
functions then you could add auditing to them.
John
"Mives" wrote:

> Is there anyway of determining if a view or function is being accessed?
> I've moved a lot of objects between schemas and to prevent any code
> breaking used views and functions to 'redirect' to the new schema.
> Is there any way to determine if anything is accessing these objects so
> I know I'm safe to remove them? The profiler doesn't seem to be
> able to do it. I'm using SQL Server 2005.
>
|||I think that those queries might do the job:
--check stored procedures
select specific_name
from INFORMATION_SCHEMA.ROUTINES
where ROUTINE_DEFINITION like '%ObjectName%'
--check views
select TABLE_NAME
from INFORMATION_SCHEMA.VIEWS
where VIEW_DEFINITION like '%ObjectName%'
The queries will help only for objects in the database, but if you
have an application that uses direct SQL statements, you'll get runtime
errors. You can try and use the profiler to see if external
applications use the old names in direct statements. You can also try
to create a synonym with the old name that will point to the new name
(didn't try it myself, but I think that this should work)
Adi
|||A clunky, but effective way to track if someone is using the view or
trigger is:
1.) VIEW - add a trigger on the view to write to a table everytime the
view is accessed
2.) TRIGGER - have the trigger write to a table everytime the trigger
fires, as part of the trigger
You can include timestamp and system_user data in your table
Adi wrote:
> I think that those queries might do the job:
> --check stored procedures
> select specific_name
> from INFORMATION_SCHEMA.ROUTINES
> where ROUTINE_DEFINITION like '%ObjectName%'
> --check views
> select TABLE_NAME
> from INFORMATION_SCHEMA.VIEWS
> where VIEW_DEFINITION like '%ObjectName%'
> The queries will help only for objects in the database, but if you
> have an application that uses direct SQL statements, you'll get runtime
> errors. You can try and use the profiler to see if external
> applications use the old names in direct statements. You can also try
> to create a synonym with the old name that will point to the new name
> (didn't try it myself, but I think that this should work)
> Adi
|||oops
2.) FUNCTION - have the function write to a table as part of the
function
tootsu...@.gmail.com wrote:[vbcol=seagreen]
> A clunky, but effective way to track if someone is using the view or
> trigger is:
> 1.) VIEW - add a trigger on the view to write to a table everytime the
> view is accessed
> 2.) TRIGGER - have the trigger write to a table everytime the trigger
> fires, as part of the trigger
> You can include timestamp and system_user data in your table
>
> Adi wrote:
|||Is it possible to have a Trigger that is fired when a view is read
selected from?
tootsuite@.gmail.com wrote:[vbcol=seagreen]
> A clunky, but effective way to track if someone is using the view or
> trigger is:
> 1.) VIEW - add a trigger on the view to write to a table everytime the
> view is accessed
> 2.) TRIGGER - have the trigger write to a table everytime the trigger
> fires, as part of the trigger
> You can include timestamp and system_user data in your table
>
> Adi wrote:
|||On 23 Oct 2006 09:40:08 -0700, "Mives" <michaelives@.gmail.com> wrote:

>Is it possible to have a Trigger that is fired when a view is read
>selected from?
No.
|||Hi
If you never update the views change them into functions.
John
"Mives" wrote:

> Is it possible to have a Trigger that is fired when a view is read
> selected from?
> tootsuite@.gmail.com wrote:
>

Determine if database objects are being accessed

Is there anyway of determining if a view or function is being accessed?
I've moved a lot of objects between schemas and to prevent any code
breaking used views and functions to 'redirect' to the new schema.
Is there any way to determine if anything is accessing these objects so
I know I'm safe to remove them? The profiler doesn't seem to be
able to do it. I'm using SQL Server 2005.Hi
AFAIK there is not any very simple method of doing this, that can be 100%
guaranteed.
If you have scripted all your stored procedures etc. then you could use a
textual search to find references to these views. As you are already using
functions then you could add auditing to them.
John
"Mives" wrote:

> Is there anyway of determining if a view or function is being accessed?
> I've moved a lot of objects between schemas and to prevent any code
> breaking used views and functions to 'redirect' to the new schema.
> Is there any way to determine if anything is accessing these objects so
> I know I'm safe to remove them? The profiler doesn't seem to be
> able to do it. I'm using SQL Server 2005.
>|||I think that those queries might do the job:
--check stored procedures
select specific_name
from INFORMATION_SCHEMA.ROUTINES
where ROUTINE_DEFINITION like '%ObjectName%'
--check views
select TABLE_NAME
from INFORMATION_SCHEMA.VIEWS
where VIEW_DEFINITION like '%ObjectName%'
The queries will help only for objects in the database, but if you
have an application that uses direct SQL statements, you'll get runtime
errors. You can try and use the profiler to see if external
applications use the old names in direct statements. You can also try
to create a synonym with the old name that will point to the new name
(didn't try it myself, but I think that this should work)
Adi|||A clunky, but effective way to track if someone is using the view or
trigger is:
1.) VIEW - add a trigger on the view to write to a table everytime the
view is accessed
2.) TRIGGER - have the trigger write to a table everytime the trigger
fires, as part of the trigger
You can include timestamp and system_user data in your table
Adi wrote:
> I think that those queries might do the job:
> --check stored procedures
> select specific_name
> from INFORMATION_SCHEMA.ROUTINES
> where ROUTINE_DEFINITION like '%ObjectName%'
> --check views
> select TABLE_NAME
> from INFORMATION_SCHEMA.VIEWS
> where VIEW_DEFINITION like '%ObjectName%'
> The queries will help only for objects in the database, but if you
> have an application that uses direct SQL statements, you'll get runtime
> errors. You can try and use the profiler to see if external
> applications use the old names in direct statements. You can also try
> to create a synonym with the old name that will point to the new name
> (didn't try it myself, but I think that this should work)
> Adi|||oops
2.) FUNCTION - have the function write to a table as part of the
function
tootsu...@.gmail.com wrote:[vbcol=seagreen]
> A clunky, but effective way to track if someone is using the view or
> trigger is:
> 1.) VIEW - add a trigger on the view to write to a table everytime the
> view is accessed
> 2.) TRIGGER - have the trigger write to a table everytime the trigger
> fires, as part of the trigger
> You can include timestamp and system_user data in your table
>
> Adi wrote:|||Is it possible to have a Trigger that is fired when a view is read
selected from?
tootsuite@.gmail.com wrote:[vbcol=seagreen]
> A clunky, but effective way to track if someone is using the view or
> trigger is:
> 1.) VIEW - add a trigger on the view to write to a table everytime the
> view is accessed
> 2.) TRIGGER - have the trigger write to a table everytime the trigger
> fires, as part of the trigger
> You can include timestamp and system_user data in your table
>
> Adi wrote:|||On 23 Oct 2006 09:40:08 -0700, "Mives" <michaelives@.gmail.com> wrote:

>Is it possible to have a Trigger that is fired when a view is read
>selected from?
No.|||Hi
If you never update the views change them into functions.
John
"Mives" wrote:

> Is it possible to have a Trigger that is fired when a view is read
> selected from?
> tootsuite@.gmail.com wrote:
>sql

Determine if database objects are being accessed

Is there anyway of determining if a view or function is being accessed?
I've moved a lot of objects between schemas and to prevent any code
breaking used views and functions to 'redirect' to the new schema.
Is there any way to determine if anything is accessing these objects so
I know I'm safe to remove them? The profiler doesn't seem to be
able to do it. I'm using SQL Server 2005.Hi
AFAIK there is not any very simple method of doing this, that can be 100%
guaranteed.
If you have scripted all your stored procedures etc. then you could use a
textual search to find references to these views. As you are already using
functions then you could add auditing to them.
John
"Mives" wrote:
> Is there anyway of determining if a view or function is being accessed?
> I've moved a lot of objects between schemas and to prevent any code
> breaking used views and functions to 'redirect' to the new schema.
> Is there any way to determine if anything is accessing these objects so
> I know I'm safe to remove them? The profiler doesn't seem to be
> able to do it. I'm using SQL Server 2005.
>|||I think that those queries might do the job:
--check stored procedures
select specific_name
from INFORMATION_SCHEMA.ROUTINES
where ROUTINE_DEFINITION like '%ObjectName%'
--check views
select TABLE_NAME
from INFORMATION_SCHEMA.VIEWS
where VIEW_DEFINITION like '%ObjectName%'
The queries will help only for objects in the database, but if you
have an application that uses direct SQL statements, you'll get runtime
errors. You can try and use the profiler to see if external
applications use the old names in direct statements. You can also try
to create a synonym with the old name that will point to the new name
(didn't try it myself, but I think that this should work)
Adi|||A clunky, but effective way to track if someone is using the view or
trigger is:
1.) VIEW - add a trigger on the view to write to a table everytime the
view is accessed
2.) TRIGGER - have the trigger write to a table everytime the trigger
fires, as part of the trigger
You can include timestamp and system_user data in your table
Adi wrote:
> I think that those queries might do the job:
> --check stored procedures
> select specific_name
> from INFORMATION_SCHEMA.ROUTINES
> where ROUTINE_DEFINITION like '%ObjectName%'
> --check views
> select TABLE_NAME
> from INFORMATION_SCHEMA.VIEWS
> where VIEW_DEFINITION like '%ObjectName%'
> The queries will help only for objects in the database, but if you
> have an application that uses direct SQL statements, you'll get runtime
> errors. You can try and use the profiler to see if external
> applications use the old names in direct statements. You can also try
> to create a synonym with the old name that will point to the new name
> (didn't try it myself, but I think that this should work)
> Adi|||oops
2.) FUNCTION - have the function write to a table as part of the
function
tootsu...@.gmail.com wrote:
> A clunky, but effective way to track if someone is using the view or
> trigger is:
> 1.) VIEW - add a trigger on the view to write to a table everytime the
> view is accessed
> 2.) TRIGGER - have the trigger write to a table everytime the trigger
> fires, as part of the trigger
> You can include timestamp and system_user data in your table
>
> Adi wrote:
> > I think that those queries might do the job:
> >
> > --check stored procedures
> > select specific_name
> > from INFORMATION_SCHEMA.ROUTINES
> > where ROUTINE_DEFINITION like '%ObjectName%'
> >
> > --check views
> > select TABLE_NAME
> > from INFORMATION_SCHEMA.VIEWS
> > where VIEW_DEFINITION like '%ObjectName%'
> >
> > The queries will help only for objects in the database, but if you
> > have an application that uses direct SQL statements, you'll get runtime
> > errors. You can try and use the profiler to see if external
> > applications use the old names in direct statements. You can also try
> > to create a synonym with the old name that will point to the new name
> > (didn't try it myself, but I think that this should work)
> >
> > Adi|||Is it possible to have a Trigger that is fired when a view is read
selected from?
tootsuite@.gmail.com wrote:
> A clunky, but effective way to track if someone is using the view or
> trigger is:
> 1.) VIEW - add a trigger on the view to write to a table everytime the
> view is accessed
> 2.) TRIGGER - have the trigger write to a table everytime the trigger
> fires, as part of the trigger
> You can include timestamp and system_user data in your table
>
> Adi wrote:
> > I think that those queries might do the job:
> >
> > --check stored procedures
> > select specific_name
> > from INFORMATION_SCHEMA.ROUTINES
> > where ROUTINE_DEFINITION like '%ObjectName%'
> >
> > --check views
> > select TABLE_NAME
> > from INFORMATION_SCHEMA.VIEWS
> > where VIEW_DEFINITION like '%ObjectName%'
> >
> > The queries will help only for objects in the database, but if you
> > have an application that uses direct SQL statements, you'll get runtime
> > errors. You can try and use the profiler to see if external
> > applications use the old names in direct statements. You can also try
> > to create a synonym with the old name that will point to the new name
> > (didn't try it myself, but I think that this should work)
> >
> > Adi|||On 23 Oct 2006 09:40:08 -0700, "Mives" <michaelives@.gmail.com> wrote:
>Is it possible to have a Trigger that is fired when a view is read
>selected from?
No.|||Hi
If you never update the views change them into functions.
John
"Mives" wrote:
> Is it possible to have a Trigger that is fired when a view is read
> selected from?
> tootsuite@.gmail.com wrote:
> > A clunky, but effective way to track if someone is using the view or
> > trigger is:
> >
> > 1.) VIEW - add a trigger on the view to write to a table everytime the
> > view is accessed
> >
> > 2.) TRIGGER - have the trigger write to a table everytime the trigger
> > fires, as part of the trigger
> >
> > You can include timestamp and system_user data in your table
> >
> >
> > Adi wrote:
> > > I think that those queries might do the job:
> > >
> > > --check stored procedures
> > > select specific_name
> > > from INFORMATION_SCHEMA.ROUTINES
> > > where ROUTINE_DEFINITION like '%ObjectName%'
> > >
> > > --check views
> > > select TABLE_NAME
> > > from INFORMATION_SCHEMA.VIEWS
> > > where VIEW_DEFINITION like '%ObjectName%'
> > >
> > > The queries will help only for objects in the database, but if you
> > > have an application that uses direct SQL statements, you'll get runtime
> > > errors. You can try and use the profiler to see if external
> > > applications use the old names in direct statements. You can also try
> > > to create a synonym with the old name that will point to the new name
> > > (didn't try it myself, but I think that this should work)
> > >
> > > Adi
>

Monday, March 19, 2012

Detailed View in C#

Hi there,
I was wondering if there is a detailed view control (that can be linked to grid view control) in ordinary C# applications as we have in ASP.NET applications? Please if anyone has information regarding that let me know.

RegardsAny information? It seems that we cannot do that in C# applications.

Regards

Detailed View in C#

Hi there,
I was wondering if there is a detailed view control (that can be linked to grid view control) in ordinary C# applications as we have in ASP.NET applications? Please if anyone has information regarding that let me know.

RegardsAny information? It seems that we cannot do that in C# applications.

Regards

detail view

When opening an RS folder in IE 6 I get a Detail View and must click "Hide
Details" is there a way to make it open in summary instead of detail?
Thanks!
GlenOnce you have clicked on Hide Details you should not see details the next
time you login. Is that not happening for you?
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Glen Tosco" <glen@.delnat.com> wrote in message
news:eo1RFJXYFHA.3220@.TK2MSFTNGP14.phx.gbl...
> When opening an RS folder in IE 6 I get a Detail View and must click "Hide
> Details" is there a way to make it open in summary instead of detail?
>
> Thanks!
> Glen
>|||No, it always opens on detail.
"Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
news:%23OhhUaXYFHA.3184@.TK2MSFTNGP15.phx.gbl...
> Once you have clicked on Hide Details you should not see details the next
> time you login. Is that not happening for you?
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Glen Tosco" <glen@.delnat.com> wrote in message
> news:eo1RFJXYFHA.3220@.TK2MSFTNGP14.phx.gbl...
>> When opening an RS folder in IE 6 I get a Detail View and must click
>> "Hide Details" is there a way to make it open in summary instead of
>> detail?
>>
>> Thanks!
>> Glen
>|||Is your site setup of anonymous access?
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Glen Tosco" <glen@.delnat.com> wrote in message
news:%23CT$RngZFHA.3984@.TK2MSFTNGP10.phx.gbl...
> No, it always opens on detail.
>
> "Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
> news:%23OhhUaXYFHA.3184@.TK2MSFTNGP15.phx.gbl...
>> Once you have clicked on Hide Details you should not see details the next
>> time you login. Is that not happening for you?
>>
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>> "Glen Tosco" <glen@.delnat.com> wrote in message
>> news:eo1RFJXYFHA.3220@.TK2MSFTNGP14.phx.gbl...
>> When opening an RS folder in IE 6 I get a Detail View and must click
>> "Hide Details" is there a way to make it open in summary instead of
>> detail?
>>
>> Thanks!
>> Glen
>>
>|||No...
"Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
news:uxB4U2hZFHA.2128@.TK2MSFTNGP14.phx.gbl...
> Is your site setup of anonymous access?
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Glen Tosco" <glen@.delnat.com> wrote in message
> news:%23CT$RngZFHA.3984@.TK2MSFTNGP10.phx.gbl...
>> No, it always opens on detail.
>>
>> "Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
>> news:%23OhhUaXYFHA.3184@.TK2MSFTNGP15.phx.gbl...
>> Once you have clicked on Hide Details you should not see details the
>> next time you login. Is that not happening for you?
>>
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>> "Glen Tosco" <glen@.delnat.com> wrote in message
>> news:eo1RFJXYFHA.3220@.TK2MSFTNGP14.phx.gbl...
>> When opening an RS folder in IE 6 I get a Detail View and must click
>> "Hide Details" is there a way to make it open in summary instead of
>> detail?
>>
>> Thanks!
>> Glen
>>
>>
>|||I don't have any suggestions. This is very odd. I have never seen anyone
post with this problem before.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Glen Tosco" <glen@.delnat.com> wrote in message
news:uxob8tkZFHA.1152@.tk2msftngp13.phx.gbl...
> No...
> "Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
> news:uxB4U2hZFHA.2128@.TK2MSFTNGP14.phx.gbl...
>> Is your site setup of anonymous access?
>>
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>> "Glen Tosco" <glen@.delnat.com> wrote in message
>> news:%23CT$RngZFHA.3984@.TK2MSFTNGP10.phx.gbl...
>> No, it always opens on detail.
>>
>> "Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
>> news:%23OhhUaXYFHA.3184@.TK2MSFTNGP15.phx.gbl...
>> Once you have clicked on Hide Details you should not see details the
>> next time you login. Is that not happening for you?
>>
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>> "Glen Tosco" <glen@.delnat.com> wrote in message
>> news:eo1RFJXYFHA.3220@.TK2MSFTNGP14.phx.gbl...
>> When opening an RS folder in IE 6 I get a Detail View and must click
>> "Hide Details" is there a way to make it open in summary instead of
>> detail?
>>
>> Thanks!
>> Glen
>>
>>
>>
>|||Hi Glen,
Is it possible for you to generate a sample rdl file and send it to me? The
sample rdl file is recommanded using defalut database (such as Northwind or
Foodmart?) I understand the information may be sensitive to you, my direct
email address is v-mingqc@.online.microsoft.com (note that "online" is only
for SPAM, remove it before you click SEND), you may send the file to me
directly and I will keep secure.
Sincerely yours,
Michael Cheng
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=====================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Friday, February 24, 2012

Design View

I have a database created by another developer that I purchased and was
recently instructed to change some values in some tables form one kind to
another like "NOT NULL" to "NULL" or change something to a "FLOAT" I am not
that good at SQL but have always done this stuff with the Query Anylizer.. I
kept getting errors due to the relations in the tables and was instructed to
do the following?
"You should just make these changes in the design view of Enterprise
Manager, not through SQL commands. It should automatically update any
relationships for you."
I created a new view but still do not see where I can change these values,
all 3 of my SQL books seem to not cover this or the Enterprise Manager very
much.. And the hlp file is not clear on this either.
Thanks for any help.
Don
Hi
If you have purchased this database then I would expect it is the
responsibility of the developer that sold it you to create the appropriate
upgrade scripts!
There is nothing wrong with doing this in Query Analyser and most
experienced DBAs will do it that way. Enterprise manager will do some of the
harder work required to change columns when they are part of a PK or FK. You
can use profiler to see what EM does when you save changes made.
Using EM to get into design mode for a table, open up the tables branch in
EM and right click the table, you will then have a design table option on
the menu.
John
"Don Stull" <dstull1@.msn.com> wrote in message
news:eW7AeQuUEHA.1764@.TK2MSFTNGP10.phx.gbl...
> I have a database created by another developer that I purchased and was
> recently instructed to change some values in some tables form one kind to
> another like "NOT NULL" to "NULL" or change something to a "FLOAT" I am
not
> that good at SQL but have always done this stuff with the Query Anylizer..
I
> kept getting errors due to the relations in the tables and was instructed
to
> do the following?
> "You should just make these changes in the design view of Enterprise
> Manager, not through SQL commands. It should automatically update any
> relationships for you."
> I created a new view but still do not see where I can change these values,
> all 3 of my SQL books seem to not cover this or the Enterprise Manager
very
> much.. And the hlp file is not clear on this either.
> Thanks for any help.
> Don
>
>