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:
>
Showing posts with label moved. Show all posts
Showing posts with label moved. 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:
>sql
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
>
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
>
Determine if Cluster Resources Move before Rebooting
How do I determine if the Cluster Group was moved before
reboot the one node on a Windows 2000 Advanced Server?
I have Active/Active Cluster with Node A and Node B
My goal was to move Node A resources to Node B and reboot
Node A and then resouces back to Node A.
I think the Server Administrator did not move the
resources before rebooting the server which caused the
link server not to work properly.
Please help me with this problem.
Thank You,
Mike
The cluster administrator tool will show what resources are on what node(s).
You can look from the resource point of view or from the node point of view.
Geoff N. Hiten
Microsoft SQL Server MVP
Senior Database Administrator
Careerbuilder.com
I support the Professional Association for SQL Server
www.sqlpass.org
"Mike" <anonymous@.discussions.microsoft.com> wrote in message
news:155f501c415ea$bbc559a0$a401280a@.phx.gbl...
> How do I determine if the Cluster Group was moved before
> reboot the one node on a Windows 2000 Advanced Server?
> I have Active/Active Cluster with Node A and Node B
> My goal was to move Node A resources to Node B and reboot
> Node A and then resouces back to Node A.
> I think the Server Administrator did not move the
> resources before rebooting the server which caused the
> link server not to work properly.
> Please help me with this problem.
> Thank You,
> Mike
>
|||The application log can show you the times when SQL Server was started and
stopped. You may be able to track down when SQL Server was moved from one
one to the other by studying this.
Rand
This posting is provided "as is" with no warranties and confers no rights.
sql
reboot the one node on a Windows 2000 Advanced Server?
I have Active/Active Cluster with Node A and Node B
My goal was to move Node A resources to Node B and reboot
Node A and then resouces back to Node A.
I think the Server Administrator did not move the
resources before rebooting the server which caused the
link server not to work properly.
Please help me with this problem.
Thank You,
Mike
The cluster administrator tool will show what resources are on what node(s).
You can look from the resource point of view or from the node point of view.
Geoff N. Hiten
Microsoft SQL Server MVP
Senior Database Administrator
Careerbuilder.com
I support the Professional Association for SQL Server
www.sqlpass.org
"Mike" <anonymous@.discussions.microsoft.com> wrote in message
news:155f501c415ea$bbc559a0$a401280a@.phx.gbl...
> How do I determine if the Cluster Group was moved before
> reboot the one node on a Windows 2000 Advanced Server?
> I have Active/Active Cluster with Node A and Node B
> My goal was to move Node A resources to Node B and reboot
> Node A and then resouces back to Node A.
> I think the Server Administrator did not move the
> resources before rebooting the server which caused the
> link server not to work properly.
> Please help me with this problem.
> Thank You,
> Mike
>
|||The application log can show you the times when SQL Server was started and
stopped. You may be able to track down when SQL Server was moved from one
one to the other by studying this.
Rand
This posting is provided "as is" with no warranties and confers no rights.
sql
Friday, March 9, 2012
Detach/Attach database
I need to move the ".ldf" log file from my 'w' drive to my 'l' drive. I
performed the following:
1> detach database
2> moved the .ldf file to the 'l' drive(deleted from the w drive)
3> attched the database
4> received a RED 'x'on the ldf file >> retyped the new location of the file
and hit OK . The attach failed with the following error.
error 5105:devide activation error: The physical file name '....' may be
incorrect
cannot create '....' because it already exists.
Hi
Rather use T-SQL. Open up query analyser and use the following code. Change
the Db names, files and paths as appropriate:
EXEC sp_attach_db @.dbname = N'pubs',
@.filename1 = N'c:\Program Files\Microsoft SQL Server\MSSQL\Data\pubs.mdf',
@.filename2 = N'c:\Program Files\Microsoft SQL
Server\MSSQL\Data\pubs_log.ldf'
"Joe" wrote:
> I need to move the ".ldf" log file from my 'w' drive to my 'l' drive. I
> performed the following:
> 1> detach database
> 2> moved the .ldf file to the 'l' drive(deleted from the w drive)
> 3> attched the database
> 4> received a RED 'x'on the ldf file >> retyped the new location of the file
> and hit OK . The attach failed with the following error.
> error 5105:devide activation error: The physical file name '....' may be
> incorrect
> cannot create '....' because it already exists.
>
>
>
>
|||I got the same results.--see below:
EXEC sp_attach_db @.dbname = N'MessageEngine',
@.filename1 = N'w:\Program Files\Microsoft SQL
Server\MSSQL\Data\MessageEngine.mdf',
@.filename2 = N'l:\SQLLOGS\MessageEngine_log.LDF'[vbcol=seagreen]
Server: Msg 5105, Level 16, State 4, Line 1
Device activation error. The physical file name
'l:\SQLLOGS\MessageEngine_log.LDF' may be incorrect.
Server: Msg 5170, Level 16, State 1, Line 1
Cannot create file 'L:\SQLLOGS\\MessageEngine_log.LDF' because it already
exists.
Server: Msg 1813, Level 16, State 1, Line 1
Could not open new database 'MessageEngine'. CREATE DATABASE is aborted.
Device activation error. The physical file name
'l:\SQLLOGS\MessageEngine_log.LDF' may be incorrect.
"Mike Epprecht (SQL MVP)" wrote:
[vbcol=seagreen]
> Hi
> Rather use T-SQL. Open up query analyser and use the following code. Change
> the Db names, files and paths as appropriate:
> EXEC sp_attach_db @.dbname = N'pubs',
> @.filename1 = N'c:\Program Files\Microsoft SQL Server\MSSQL\Data\pubs.mdf',
> @.filename2 = N'c:\Program Files\Microsoft SQL
> Server\MSSQL\Data\pubs_log.ldf'
>
> "Joe" wrote:
|||Hi
From the command prompt, do a DIR l:\SQLLOGS\MessageEngine_log.LDF
Alos, check the the SQL Server Service account has permissions in the
directory and file.
Regards
Mike
"Joe" wrote:
[vbcol=seagreen]
> I got the same results.--see below:
> EXEC sp_attach_db @.dbname = N'MessageEngine',
> @.filename1 = N'w:\Program Files\Microsoft SQL
> Server\MSSQL\Data\MessageEngine.mdf',
> @.filename2 = N'l:\SQLLOGS\MessageEngine_log.LDF'
> Server: Msg 5105, Level 16, State 4, Line 1
> Device activation error. The physical file name
> 'l:\SQLLOGS\MessageEngine_log.LDF' may be incorrect.
> Server: Msg 5170, Level 16, State 1, Line 1
> Cannot create file 'L:\SQLLOGS\\MessageEngine_log.LDF' because it already
> exists.
> Server: Msg 1813, Level 16, State 1, Line 1
> Could not open new database 'MessageEngine'. CREATE DATABASE is aborted.
> Device activation error. The physical file name
> 'l:\SQLLOGS\MessageEngine_log.LDF' may be incorrect.
> "Mike Epprecht (SQL MVP)" wrote:
|||Make sure you move the old MessageEngine_log.LDF file to L:\SQLLOGS\
directory before you run sp_attach_db.
"Joe" <Joe@.discussions.microsoft.com> wrote in message
news:94AF06C2-E3A1-4089-9620-7315F6EE9CD0@.microsoft.com...[vbcol=seagreen]
>I got the same results.--see below:
> EXEC sp_attach_db @.dbname = N'MessageEngine',
> @.filename1 = N'w:\Program Files\Microsoft SQL
> Server\MSSQL\Data\MessageEngine.mdf',
> @.filename2 = N'l:\SQLLOGS\MessageEngine_log.LDF'
> Server: Msg 5105, Level 16, State 4, Line 1
> Device activation error. The physical file name
> 'l:\SQLLOGS\MessageEngine_log.LDF' may be incorrect.
> Server: Msg 5170, Level 16, State 1, Line 1
> Cannot create file 'L:\SQLLOGS\\MessageEngine_log.LDF' because it already
> exists.
> Server: Msg 1813, Level 16, State 1, Line 1
> Could not open new database 'MessageEngine'. CREATE DATABASE is aborted.
> Device activation error. The physical file name
> 'l:\SQLLOGS\MessageEngine_log.LDF' may be incorrect.
> "Mike Epprecht (SQL MVP)" wrote:
performed the following:
1> detach database
2> moved the .ldf file to the 'l' drive(deleted from the w drive)
3> attched the database
4> received a RED 'x'on the ldf file >> retyped the new location of the file
and hit OK . The attach failed with the following error.
error 5105:devide activation error: The physical file name '....' may be
incorrect
cannot create '....' because it already exists.
Hi
Rather use T-SQL. Open up query analyser and use the following code. Change
the Db names, files and paths as appropriate:
EXEC sp_attach_db @.dbname = N'pubs',
@.filename1 = N'c:\Program Files\Microsoft SQL Server\MSSQL\Data\pubs.mdf',
@.filename2 = N'c:\Program Files\Microsoft SQL
Server\MSSQL\Data\pubs_log.ldf'
"Joe" wrote:
> I need to move the ".ldf" log file from my 'w' drive to my 'l' drive. I
> performed the following:
> 1> detach database
> 2> moved the .ldf file to the 'l' drive(deleted from the w drive)
> 3> attched the database
> 4> received a RED 'x'on the ldf file >> retyped the new location of the file
> and hit OK . The attach failed with the following error.
> error 5105:devide activation error: The physical file name '....' may be
> incorrect
> cannot create '....' because it already exists.
>
>
>
>
|||I got the same results.--see below:
EXEC sp_attach_db @.dbname = N'MessageEngine',
@.filename1 = N'w:\Program Files\Microsoft SQL
Server\MSSQL\Data\MessageEngine.mdf',
@.filename2 = N'l:\SQLLOGS\MessageEngine_log.LDF'[vbcol=seagreen]
Server: Msg 5105, Level 16, State 4, Line 1
Device activation error. The physical file name
'l:\SQLLOGS\MessageEngine_log.LDF' may be incorrect.
Server: Msg 5170, Level 16, State 1, Line 1
Cannot create file 'L:\SQLLOGS\\MessageEngine_log.LDF' because it already
exists.
Server: Msg 1813, Level 16, State 1, Line 1
Could not open new database 'MessageEngine'. CREATE DATABASE is aborted.
Device activation error. The physical file name
'l:\SQLLOGS\MessageEngine_log.LDF' may be incorrect.
"Mike Epprecht (SQL MVP)" wrote:
[vbcol=seagreen]
> Hi
> Rather use T-SQL. Open up query analyser and use the following code. Change
> the Db names, files and paths as appropriate:
> EXEC sp_attach_db @.dbname = N'pubs',
> @.filename1 = N'c:\Program Files\Microsoft SQL Server\MSSQL\Data\pubs.mdf',
> @.filename2 = N'c:\Program Files\Microsoft SQL
> Server\MSSQL\Data\pubs_log.ldf'
>
> "Joe" wrote:
|||Hi
From the command prompt, do a DIR l:\SQLLOGS\MessageEngine_log.LDF
Alos, check the the SQL Server Service account has permissions in the
directory and file.
Regards
Mike
"Joe" wrote:
[vbcol=seagreen]
> I got the same results.--see below:
> EXEC sp_attach_db @.dbname = N'MessageEngine',
> @.filename1 = N'w:\Program Files\Microsoft SQL
> Server\MSSQL\Data\MessageEngine.mdf',
> @.filename2 = N'l:\SQLLOGS\MessageEngine_log.LDF'
> Server: Msg 5105, Level 16, State 4, Line 1
> Device activation error. The physical file name
> 'l:\SQLLOGS\MessageEngine_log.LDF' may be incorrect.
> Server: Msg 5170, Level 16, State 1, Line 1
> Cannot create file 'L:\SQLLOGS\\MessageEngine_log.LDF' because it already
> exists.
> Server: Msg 1813, Level 16, State 1, Line 1
> Could not open new database 'MessageEngine'. CREATE DATABASE is aborted.
> Device activation error. The physical file name
> 'l:\SQLLOGS\MessageEngine_log.LDF' may be incorrect.
> "Mike Epprecht (SQL MVP)" wrote:
|||Make sure you move the old MessageEngine_log.LDF file to L:\SQLLOGS\
directory before you run sp_attach_db.
"Joe" <Joe@.discussions.microsoft.com> wrote in message
news:94AF06C2-E3A1-4089-9620-7315F6EE9CD0@.microsoft.com...[vbcol=seagreen]
>I got the same results.--see below:
> EXEC sp_attach_db @.dbname = N'MessageEngine',
> @.filename1 = N'w:\Program Files\Microsoft SQL
> Server\MSSQL\Data\MessageEngine.mdf',
> @.filename2 = N'l:\SQLLOGS\MessageEngine_log.LDF'
> Server: Msg 5105, Level 16, State 4, Line 1
> Device activation error. The physical file name
> 'l:\SQLLOGS\MessageEngine_log.LDF' may be incorrect.
> Server: Msg 5170, Level 16, State 1, Line 1
> Cannot create file 'L:\SQLLOGS\\MessageEngine_log.LDF' because it already
> exists.
> Server: Msg 1813, Level 16, State 1, Line 1
> Could not open new database 'MessageEngine'. CREATE DATABASE is aborted.
> Device activation error. The physical file name
> 'l:\SQLLOGS\MessageEngine_log.LDF' may be incorrect.
> "Mike Epprecht (SQL MVP)" wrote:
Detach/Attach database
I need to move the ".ldf" log file from my 'w' drive to my 'l' drive. I
performed the following:
1> detach database
2> moved the .ldf file to the 'l' drive(deleted from the w drive)
3> attched the database
4> received a RED 'x'on the ldf file >> retyped the new location of the file
and hit OK . The attach failed with the following error.
error 5105:devide activation error: The physical file name '....' may be
incorrect
cannot create '....' because it already exists.Hi
Rather use T-SQL. Open up query analyser and use the following code. Change
the Db names, files and paths as appropriate:
EXEC sp_attach_db @.dbname = N'pubs',
@.filename1 = N'c:\Program Files\Microsoft SQL Server\MSSQL\Data\pubs.mdf',
@.filename2 = N'c:\Program Files\Microsoft SQL
Server\MSSQL\Data\pubs_log.ldf'
"Joe" wrote:
> I need to move the ".ldf" log file from my 'w' drive to my 'l' drive. I
> performed the following:
> 1> detach database
> 2> moved the .ldf file to the 'l' drive(deleted from the w drive)
> 3> attched the database
> 4> received a RED 'x'on the ldf file >> retyped the new location of the fi
le
> and hit OK . The attach failed with the following error.
> error 5105:devide activation error: The physical file name '....' may be
> incorrect
> cannot create '....' because it already exists.
>
>
>
>|||I got the same results.--see below:
EXEC sp_attach_db @.dbname = N'MessageEngine',
@.filename1 = N'w:\Program Files\Microsoft SQL
Server\MSSQL\Data\MessageEngine.mdf',
@.filename2 = N'l:\SQLLOGS\MessageEngine_log.LDF'[vbcol=seagreen]
Server: Msg 5105, Level 16, State 4, Line 1
Device activation error. The physical file name
'l:\SQLLOGS\MessageEngine_log.LDF' may be incorrect.
Server: Msg 5170, Level 16, State 1, Line 1
Cannot create file 'L:\SQLLOGS\\MessageEngine_log.LDF' because it already
exists.
Server: Msg 1813, Level 16, State 1, Line 1
Could not open new database 'MessageEngine'. CREATE DATABASE is aborted.
Device activation error. The physical file name
'l:\SQLLOGS\MessageEngine_log.LDF' may be incorrect.
"Mike Epprecht (SQL MVP)" wrote:
[vbcol=seagreen]
> Hi
> Rather use T-SQL. Open up query analyser and use the following code. Chang
e
> the Db names, files and paths as appropriate:
> EXEC sp_attach_db @.dbname = N'pubs',
> @.filename1 = N'c:\Program Files\Microsoft SQL Server\MSSQL\Data\pubs.md
f',
> @.filename2 = N'c:\Program Files\Microsoft SQL
> Server\MSSQL\Data\pubs_log.ldf'
>
> "Joe" wrote:
>|||Hi
From the command prompt, do a DIR l:\SQLLOGS\MessageEngine_log.LDF
Alos, check the the SQL Server Service account has permissions in the
directory and file.
Regards
Mike
"Joe" wrote:
[vbcol=seagreen]
> I got the same results.--see below:
> EXEC sp_attach_db @.dbname = N'MessageEngine',
> @.filename1 = N'w:\Program Files\Microsoft SQL
> Server\MSSQL\Data\MessageEngine.mdf',
> @.filename2 = N'l:\SQLLOGS\MessageEngine_log.LDF'
> Server: Msg 5105, Level 16, State 4, Line 1
> Device activation error. The physical file name
> 'l:\SQLLOGS\MessageEngine_log.LDF' may be incorrect.
> Server: Msg 5170, Level 16, State 1, Line 1
> Cannot create file 'L:\SQLLOGS\\MessageEngine_log.LDF' because it already
> exists.
> Server: Msg 1813, Level 16, State 1, Line 1
> Could not open new database 'MessageEngine'. CREATE DATABASE is aborted.
> Device activation error. The physical file name
> 'l:\SQLLOGS\MessageEngine_log.LDF' may be incorrect.
> "Mike Epprecht (SQL MVP)" wrote:
>|||Make sure you move the old MessageEngine_log.LDF file to L:\SQLLOGS\
directory before you run sp_attach_db.
"Joe" <Joe@.discussions.microsoft.com> wrote in message
news:94AF06C2-E3A1-4089-9620-7315F6EE9CD0@.microsoft.com...[vbcol=seagreen]
>I got the same results.--see below:
> EXEC sp_attach_db @.dbname = N'MessageEngine',
> @.filename1 = N'w:\Program Files\Microsoft SQL
> Server\MSSQL\Data\MessageEngine.mdf',
> @.filename2 = N'l:\SQLLOGS\MessageEngine_log.LDF'
> Server: Msg 5105, Level 16, State 4, Line 1
> Device activation error. The physical file name
> 'l:\SQLLOGS\MessageEngine_log.LDF' may be incorrect.
> Server: Msg 5170, Level 16, State 1, Line 1
> Cannot create file 'L:\SQLLOGS\\MessageEngine_log.LDF' because it already
> exists.
> Server: Msg 1813, Level 16, State 1, Line 1
> Could not open new database 'MessageEngine'. CREATE DATABASE is aborted.
> Device activation error. The physical file name
> 'l:\SQLLOGS\MessageEngine_log.LDF' may be incorrect.
> "Mike Epprecht (SQL MVP)" wrote:
>
performed the following:
1> detach database
2> moved the .ldf file to the 'l' drive(deleted from the w drive)
3> attched the database
4> received a RED 'x'on the ldf file >> retyped the new location of the file
and hit OK . The attach failed with the following error.
error 5105:devide activation error: The physical file name '....' may be
incorrect
cannot create '....' because it already exists.Hi
Rather use T-SQL. Open up query analyser and use the following code. Change
the Db names, files and paths as appropriate:
EXEC sp_attach_db @.dbname = N'pubs',
@.filename1 = N'c:\Program Files\Microsoft SQL Server\MSSQL\Data\pubs.mdf',
@.filename2 = N'c:\Program Files\Microsoft SQL
Server\MSSQL\Data\pubs_log.ldf'
"Joe" wrote:
> I need to move the ".ldf" log file from my 'w' drive to my 'l' drive. I
> performed the following:
> 1> detach database
> 2> moved the .ldf file to the 'l' drive(deleted from the w drive)
> 3> attched the database
> 4> received a RED 'x'on the ldf file >> retyped the new location of the fi
le
> and hit OK . The attach failed with the following error.
> error 5105:devide activation error: The physical file name '....' may be
> incorrect
> cannot create '....' because it already exists.
>
>
>
>|||I got the same results.--see below:
EXEC sp_attach_db @.dbname = N'MessageEngine',
@.filename1 = N'w:\Program Files\Microsoft SQL
Server\MSSQL\Data\MessageEngine.mdf',
@.filename2 = N'l:\SQLLOGS\MessageEngine_log.LDF'[vbcol=seagreen]
Server: Msg 5105, Level 16, State 4, Line 1
Device activation error. The physical file name
'l:\SQLLOGS\MessageEngine_log.LDF' may be incorrect.
Server: Msg 5170, Level 16, State 1, Line 1
Cannot create file 'L:\SQLLOGS\\MessageEngine_log.LDF' because it already
exists.
Server: Msg 1813, Level 16, State 1, Line 1
Could not open new database 'MessageEngine'. CREATE DATABASE is aborted.
Device activation error. The physical file name
'l:\SQLLOGS\MessageEngine_log.LDF' may be incorrect.
"Mike Epprecht (SQL MVP)" wrote:
[vbcol=seagreen]
> Hi
> Rather use T-SQL. Open up query analyser and use the following code. Chang
e
> the Db names, files and paths as appropriate:
> EXEC sp_attach_db @.dbname = N'pubs',
> @.filename1 = N'c:\Program Files\Microsoft SQL Server\MSSQL\Data\pubs.md
f',
> @.filename2 = N'c:\Program Files\Microsoft SQL
> Server\MSSQL\Data\pubs_log.ldf'
>
> "Joe" wrote:
>|||Hi
From the command prompt, do a DIR l:\SQLLOGS\MessageEngine_log.LDF
Alos, check the the SQL Server Service account has permissions in the
directory and file.
Regards
Mike
"Joe" wrote:
[vbcol=seagreen]
> I got the same results.--see below:
> EXEC sp_attach_db @.dbname = N'MessageEngine',
> @.filename1 = N'w:\Program Files\Microsoft SQL
> Server\MSSQL\Data\MessageEngine.mdf',
> @.filename2 = N'l:\SQLLOGS\MessageEngine_log.LDF'
> Server: Msg 5105, Level 16, State 4, Line 1
> Device activation error. The physical file name
> 'l:\SQLLOGS\MessageEngine_log.LDF' may be incorrect.
> Server: Msg 5170, Level 16, State 1, Line 1
> Cannot create file 'L:\SQLLOGS\\MessageEngine_log.LDF' because it already
> exists.
> Server: Msg 1813, Level 16, State 1, Line 1
> Could not open new database 'MessageEngine'. CREATE DATABASE is aborted.
> Device activation error. The physical file name
> 'l:\SQLLOGS\MessageEngine_log.LDF' may be incorrect.
> "Mike Epprecht (SQL MVP)" wrote:
>|||Make sure you move the old MessageEngine_log.LDF file to L:\SQLLOGS\
directory before you run sp_attach_db.
"Joe" <Joe@.discussions.microsoft.com> wrote in message
news:94AF06C2-E3A1-4089-9620-7315F6EE9CD0@.microsoft.com...[vbcol=seagreen]
>I got the same results.--see below:
> EXEC sp_attach_db @.dbname = N'MessageEngine',
> @.filename1 = N'w:\Program Files\Microsoft SQL
> Server\MSSQL\Data\MessageEngine.mdf',
> @.filename2 = N'l:\SQLLOGS\MessageEngine_log.LDF'
> Server: Msg 5105, Level 16, State 4, Line 1
> Device activation error. The physical file name
> 'l:\SQLLOGS\MessageEngine_log.LDF' may be incorrect.
> Server: Msg 5170, Level 16, State 1, Line 1
> Cannot create file 'L:\SQLLOGS\\MessageEngine_log.LDF' because it already
> exists.
> Server: Msg 1813, Level 16, State 1, Line 1
> Could not open new database 'MessageEngine'. CREATE DATABASE is aborted.
> Device activation error. The physical file name
> 'l:\SQLLOGS\MessageEngine_log.LDF' may be incorrect.
> "Mike Epprecht (SQL MVP)" wrote:
>
Subscribe to:
Posts (Atom)