Showing posts with label accomplish. Show all posts
Showing posts with label accomplish. Show all posts

Sunday, February 19, 2012

Best way to rename a server

Running SQL 7.0 and need to change the server name. What is the best way to
accomplish this?"Timothy Ross" <ross_timothy@.hotmail.com> wrote in message
news:uOE8IFVhEHA.1156@.TK2MSFTNGP10.phx.gbl...
> Running SQL 7.0 and need to change the server name. What is the best way
to
> accomplish this?
>
As I recall, it's exactly the same as SQL Server 2000, from BOL, "renaming a
server"
~~~~~~~~~~~~~~~~~~~~~~~~~~
You can connect to SQL Server using the new computer name after you have
restarted the server. However, to correct the sysservers system table, you
should manually run these procedures:
sp_dropserver old_name
GO
sp_addserver new_name, local
GO
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Be aware that if are using replication there
will be additional steps involved.Steve|||Steve,
Thank you for these instructions - we are not using replicaton and we have
manual backups of all the databases - I will use your instructions.
TR
"Steve Thompson" <stevethompson@.nomail.please> wrote in message
news:e9sYzQVhEHA.1356@.TK2MSFTNGP09.phx.gbl...
> "Timothy Ross" <ross_timothy@.hotmail.com> wrote in message
> news:uOE8IFVhEHA.1156@.TK2MSFTNGP10.phx.gbl...
> > Running SQL 7.0 and need to change the server name. What is the best
way
> to
> > accomplish this?
> >
> As I recall, it's exactly the same as SQL Server 2000, from BOL, "renaming
a
> server"
> ~~~~~~~~~~~~~~~~~~~~~~~~~~
> You can connect to SQL Server using the new computer name after you have
> restarted the server. However, to correct the sysservers system table, you
> should manually run these procedures:
> sp_dropserver old_name
> GO
> sp_addserver new_name, local
> GO
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Be aware that if are using replication there
> will be additional steps involved.Steve
>|||You might want to check my article at:
http://www.karaszi.com/SQLServer/info_change_server_name.asp
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Timothy Ross" <ross_timothy@.hotmail.com> wrote in message news:eZSyPiVhEHA.1652@.TK2MSFTNGP09.phx.gbl...
> Steve,
> Thank you for these instructions - we are not using replicaton and we have
> manual backups of all the databases - I will use your instructions.
> TR
> "Steve Thompson" <stevethompson@.nomail.please> wrote in message
> news:e9sYzQVhEHA.1356@.TK2MSFTNGP09.phx.gbl...
> > "Timothy Ross" <ross_timothy@.hotmail.com> wrote in message
> > news:uOE8IFVhEHA.1156@.TK2MSFTNGP10.phx.gbl...
> > > Running SQL 7.0 and need to change the server name. What is the best
> way
> > to
> > > accomplish this?
> > >
> >
> > As I recall, it's exactly the same as SQL Server 2000, from BOL, "renaming
> a
> > server"
> > ~~~~~~~~~~~~~~~~~~~~~~~~~~
> > You can connect to SQL Server using the new computer name after you have
> > restarted the server. However, to correct the sysservers system table, you
> > should manually run these procedures:
> > sp_dropserver old_name
> > GO
> > sp_addserver new_name, local
> > GO
> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Be aware that if are using replication there
> > will be additional steps involved.Steve
> >
> >
>|||Thanks Tibor -- far more complete!
Steve
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:OVnhWDWhEHA.1356@.TK2MSFTNGP09.phx.gbl...
> You might want to check my article at:
> http://www.karaszi.com/SQLServer/info_change_server_name.asp
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Timothy Ross" <ross_timothy@.hotmail.com> wrote in message
news:eZSyPiVhEHA.1652@.TK2MSFTNGP09.phx.gbl...
> > Steve,
> >
> > Thank you for these instructions - we are not using replicaton and we
have
> > manual backups of all the databases - I will use your instructions.
> >
> > TR
> >
> > "Steve Thompson" <stevethompson@.nomail.please> wrote in message
> > news:e9sYzQVhEHA.1356@.TK2MSFTNGP09.phx.gbl...
> > > "Timothy Ross" <ross_timothy@.hotmail.com> wrote in message
> > > news:uOE8IFVhEHA.1156@.TK2MSFTNGP10.phx.gbl...
> > > > Running SQL 7.0 and need to change the server name. What is the
best
> > way
> > > to
> > > > accomplish this?
> > > >
> > >
> > > As I recall, it's exactly the same as SQL Server 2000, from BOL,
"renaming
> > a
> > > server"
> > > ~~~~~~~~~~~~~~~~~~~~~~~~~~
> > > You can connect to SQL Server using the new computer name after you
have
> > > restarted the server. However, to correct the sysservers system table,
you
> > > should manually run these procedures:
> > > sp_dropserver old_name
> > > GO
> > > sp_addserver new_name, local
> > > GO
> > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Be aware that if are using replication
there
> > > will be additional steps involved.Steve
> > >
> > >
> >
> >
>|||Thank you Tibor
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:OVnhWDWhEHA.1356@.TK2MSFTNGP09.phx.gbl...
> You might want to check my article at:
> http://www.karaszi.com/SQLServer/info_change_server_name.asp
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Timothy Ross" <ross_timothy@.hotmail.com> wrote in message
news:eZSyPiVhEHA.1652@.TK2MSFTNGP09.phx.gbl...
> > Steve,
> >
> > Thank you for these instructions - we are not using replicaton and we
have
> > manual backups of all the databases - I will use your instructions.
> >
> > TR
> >
> > "Steve Thompson" <stevethompson@.nomail.please> wrote in message
> > news:e9sYzQVhEHA.1356@.TK2MSFTNGP09.phx.gbl...
> > > "Timothy Ross" <ross_timothy@.hotmail.com> wrote in message
> > > news:uOE8IFVhEHA.1156@.TK2MSFTNGP10.phx.gbl...
> > > > Running SQL 7.0 and need to change the server name. What is the
best
> > way
> > > to
> > > > accomplish this?
> > > >
> > >
> > > As I recall, it's exactly the same as SQL Server 2000, from BOL,
"renaming
> > a
> > > server"
> > > ~~~~~~~~~~~~~~~~~~~~~~~~~~
> > > You can connect to SQL Server using the new computer name after you
have
> > > restarted the server. However, to correct the sysservers system table,
you
> > > should manually run these procedures:
> > > sp_dropserver old_name
> > > GO
> > > sp_addserver new_name, local
> > > GO
> > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Be aware that if are using replication
there
> > > will be additional steps involved.Steve
> > >
> > >
> >
> >
>

Sunday, February 12, 2012

Best way to do a calculation

I'm kinda stuck on how to accomplish the following. Help appreciated.

I have a fact table like so:

TimeByDay ProjectID TaskID %Complete ActualHours Planned Hours

4/4/07 001 002 .25 5 8

4/5/07 001 002 .30 6 8

4/6/07 001 002 .40 8 8

4/7/07 001 002 .45 8 8

I want to add a calculated measure that is the product of %Complete and the total planned hours. In my example, the total planned hours for task 002 is 32 hours (sum of all days for a given taskID and ProjectID)

I was thinking of adding the total to the fact table - which would yield alot of repetitive data.

However, If it wont kill performance - I'd prefer to have a calculated expression that computes the total hours then performs my %Complete * TotalHours calculation.

your help is very much appreciated.

Hello again JohnBGood.

If you create a calculated measure, in the cube, like MyCalculatedMeasure = [Measure].[%Complete]*[Measure].[Planned Hours]

,a client like Excel2007 would take care of creating the totals for you with this calculated measure.

You can also create a named calculation on you fact table, in the data source view, with TSQL like [%Complete]*[Planned Hours] and aggregate that, because it is hours that are possible to aggregate by sum().

HTH

Thomas Ivarsson

|||

A good way to test the impact this would have on SSAS performance is to first define the measure in a query:

Code Snippet

with member [Measures].[Estimated Hours]

as

[Measures].[Percent Complete] * [Measures].[Planned Hours]

select

[Measures].[Estimated Hours] on 0,

[Project].[Project Name].Members on 1

from [My Project Cube]

Try this with various restrictions, etc. to see how it holds up. If it behaves well, you can use the formula in a calculated member that will make this query available to all your users in their various applications.

If you run into performance problems, try using the [Measures].[Planned Hours] measure on Axis 0 (Columns) to see if the performance problem is still there. If it is, the calculation isn't the source of the performance issue.

A couple other things .... be sure to consider the format of the value you want to return to your users. You can lookup the syntax of the "WITH MEMBER" clause in Books Online and it will show you how to define formats here. Also, consider your NonEmpty Behavior. With the NonEmpty Behavior, you identify when to return an Empty value (and skip the calculation). In this scenario, you might want to skip the calculation when [Measures].[Planned Hours] is empty because a calculated value would be meaningless.

Good luck,
Bryan Smith

Friday, February 10, 2012

Best way to accomplish this - Move to new server

I just purchased a new server and I want to move all my
existing databases, DTS scripts, logins, etc to the new
server. What is the best/easiest/efficient way to
accomplish this?Easiest way is probably to restore a backup to the other server
or detach/attach
HOW TO: Move Databases Between Computers That Are Running SQL Server
http://support.microsoft.com/default.aspx?kbid=314546
INF: Moving SQL Server Databases to a New Location with Detach/Attach
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q224071
or use the Copy database wizard
INF: Understanding and Troubleshooting the Copy Database Wizard in SQL
Server 2000
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q274463
Also check out
INF: How To Transfer Logins and Passwords Between SQL Servers
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q246133
PRB: User Logon and/or Permission Errors After Restoring Dump
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q168001
INF: How to Resolve Permission Issues When a Database is Moved Between SQL
Servers
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q240872
PRB: "Troubleshooting Orphaned Users" Topic in Books Online is Incomplete
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q274188
--
HTH
Jasper Smith (SQL Server MVP)
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"Mike Taylor" <mtaylor103@.hotmail.com> wrote in message
news:0b8c01c3d539$6a135590$a501280a@.phx.gbl...
> I just purchased a new server and I want to move all my
> existing databases, DTS scripts, logins, etc to the new
> server. What is the best/easiest/efficient way to
> accomplish this?|||Backup and Restore work well for me. Setup SQL Server on the new machine
with the same service pack as the existing one, and the same disk layout if
possible. Restore the Master and MSDB databases for your logins & DTS and
jobs etc. and any other DB's you have. If the DB's are large it may be
faster to de-attach/re-attach from one machine to the other.
It might be possible to just copy the OS files for the databases between the
machines if they have the same directory structure, but I've never tried
this.
Mike Kruchten
"Mike Taylor" <mtaylor103@.hotmail.com> wrote in message
news:0b8c01c3d539$6a135590$a501280a@.phx.gbl...
> I just purchased a new server and I want to move all my
> existing databases, DTS scripts, logins, etc to the new
> server. What is the best/easiest/efficient way to
> accomplish this?|||You may want to read this:
HOW TO: Move Databases Between Computers That Are Running SQL Server
http://www.sqlmantra.com/314546
--
Rohtash Kapoor
http://www.sqlmantra.com
"Mike Taylor" <mtaylor103@.hotmail.com> wrote in message
news:0b8c01c3d539$6a135590$a501280a@.phx.gbl...
> I just purchased a new server and I want to move all my
> existing databases, DTS scripts, logins, etc to the new
> server. What is the best/easiest/efficient way to
> accomplish this?|||sorry wrong link. The correct one is:
support.microsoft.com?kbid=314546
"Rohtash Kapoor" <rohtash_nospam@.sqlmantra.com> wrote in message
news:Ov0ldsT1DHA.3216@.TK2MSFTNGP11.phx.gbl...
> You may want to read this:
> HOW TO: Move Databases Between Computers That Are Running SQL Server
> http://www.sqlmantra.com/314546
> --
> Rohtash Kapoor
> http://www.sqlmantra.com
>
> "Mike Taylor" <mtaylor103@.hotmail.com> wrote in message
> news:0b8c01c3d539$6a135590$a501280a@.phx.gbl...
> > I just purchased a new server and I want to move all my
> > existing databases, DTS scripts, logins, etc to the new
> > server. What is the best/easiest/efficient way to
> > accomplish this?
>