Showing posts with label current. Show all posts
Showing posts with label current. Show all posts

Tuesday, March 27, 2012

Backing up online log after loss of primary data file

My question is this:

Is there anyway to backup the current online log after complete loss of the current correponding datafile?

Example:

(2) Logical Disk Volumes

Disk 1 (D:) contains pubs_data.mdf
Disk 2 (E:) contains pubs_log.ldf

Disk 1 becomes corrupt and goes offline leaving the the database pubs in a suspect state. Is backup of the current online log pubs_log.ldf possible? If a backup of the log is not possible are there any other restoration methods that can be used to bring this database back online, rescuing as much information as possible from the current online log pubs_log.ldf.

Thanks,
PI can't beleive there is no way to get at the information in the current online log depite the fact that the database file is gone.

So, if I can't get at the current online log I must rely on a backup of the log which I would take every 5 or 15 minutes but that 0-5 minute period is not retrievable even if its just the data file that fails.

Any thoughts?

Sunday, March 25, 2012

Backing Up DB & its Permissions

HI All,

I am currently in a situation where I have been fed to the wolves to say the least.

My task is to take the current SQL server 05 we have running on a drive array partioned as C & D and rebuild it.

I need to have the current database backed up, as well as the unique permissions that are currently present on the database.

I then have to remove the hard drives from the RAID array, and replace them with Brand new ones. The OS will then have to be reinstalled, followed by the nessary updates and finally with SQL server.

I then have to import the database back to the new server build w/ the data and the permissions all intact.

Anyone have any idea of how I can go about doing this?

Steve

The permissions on database level are stored inside the database so these will be present once you restore the database.

WesleyB

Visit my SQL Server weblog @. http://dis4ea.blogspot.com

|||

When backing up my database and then having to "recompose" it on the new drive arrays, would it be best to copy the DB's by doing an attach / detach, or by simply doing a full backup and then restoring that backup on a clean SQL Server 05 build.

Thanks.

|||

Detach / attach is the easiest way. Restore has the advantage that your backup file will only be as big as the data that is in it.

WesleyB

Visit my SQL Server weblog @. http://dis4ea.blogspot.com

|||

To me Detach/Attach or Backup/Restore come out to be about the same, the backup file is smaller, the Detach/Attach seems quicker (no Backup/Restore time). I use a 7zip either way if space or transfer time is an issue.

The main issue I've run into is you have to make sure the Securty IDs (master..syslogins sid) match on the source & destination servers, this isn't an issue for domain logins if you stay within the domain. It's always a concern with SQL logins. The permissions stored in the DB are tied to the user, & the user is tied to the server login via the sid. There are ways to sync them up afterwards, I've had mixed luck there.

HTH,

Roger

|||Because of the login issues that Roger brings up, in this case I would also back up the system databases and restore them on the new system. As long as the version of SQL is the same on both sides, this is the simplest way to make sure that all IDs line up.

Backing Up DB & its Permissions

HI All,

I am currently in a situation where I have been fed to the wolves to say the least.

My task is to take the current SQL server 05 we have running on a drive array partioned as C & D and rebuild it.

I need to have the current database backed up, as well as the unique permissions that are currently present on the database.

I then have to remove the hard drives from the RAID array, and replace them with Brand new ones. The OS will then have to be reinstalled, followed by the nessary updates and finally with SQL server.

I then have to import the database back to the new server build w/ the data and the permissions all intact.

Anyone have any idea of how I can go about doing this?

Steve

The permissions on database level are stored inside the database so these will be present once you restore the database.

WesleyB

Visit my SQL Server weblog @. http://dis4ea.blogspot.com

|||

When backing up my database and then having to "recompose" it on the new drive arrays, would it be best to copy the DB's by doing an attach / detach, or by simply doing a full backup and then restoring that backup on a clean SQL Server 05 build.

Thanks.

|||

Detach / attach is the easiest way. Restore has the advantage that your backup file will only be as big as the data that is in it.

WesleyB

Visit my SQL Server weblog @. http://dis4ea.blogspot.com

|||

To me Detach/Attach or Backup/Restore come out to be about the same, the backup file is smaller, the Detach/Attach seems quicker (no Backup/Restore time). I use a 7zip either way if space or transfer time is an issue.

The main issue I've run into is you have to make sure the Securty IDs (master..syslogins sid) match on the source & destination servers, this isn't an issue for domain logins if you stay within the domain. It's always a concern with SQL logins. The permissions stored in the DB are tied to the user, & the user is tied to the server login via the sid. There are ways to sync them up afterwards, I've had mixed luck there.

HTH,

Roger

|||Because of the login issues that Roger brings up, in this case I would also back up the system databases and restore them on the new system. As long as the version of SQL is the same on both sides, this is the simplest way to make sure that all IDs line up.sql

Backing Up DB & its Permissions

HI All,

I am currently in a situation where I have been fed to the wolves to say the least.

My task is to take the current SQL server 05 we have running on a drive array partioned as C & D and rebuild it.

I need to have the current database backed up, as well as the unique permissions that are currently present on the database.

I then have to remove the hard drives from the RAID array, and replace them with Brand new ones. The OS will then have to be reinstalled, followed by the nessary updates and finally with SQL server.

I then have to import the database back to the new server build w/ the data and the permissions all intact.

Anyone have any idea of how I can go about doing this?

Steve

The permissions on database level are stored inside the database so these will be present once you restore the database.

WesleyB

Visit my SQL Server weblog @. http://dis4ea.blogspot.com

|||

When backing up my database and then having to "recompose" it on the new drive arrays, would it be best to copy the DB's by doing an attach / detach, or by simply doing a full backup and then restoring that backup on a clean SQL Server 05 build.

Thanks.

|||

Detach / attach is the easiest way. Restore has the advantage that your backup file will only be as big as the data that is in it.

WesleyB

Visit my SQL Server weblog @. http://dis4ea.blogspot.com

|||

To me Detach/Attach or Backup/Restore come out to be about the same, the backup file is smaller, the Detach/Attach seems quicker (no Backup/Restore time). I use a 7zip either way if space or transfer time is an issue.

The main issue I've run into is you have to make sure the Securty IDs (master..syslogins sid) match on the source & destination servers, this isn't an issue for domain logins if you stay within the domain. It's always a concern with SQL logins. The permissions stored in the DB are tied to the user, & the user is tied to the server login via the sid. There are ways to sync them up afterwards, I've had mixed luck there.

HTH,

Roger

|||Because of the login issues that Roger brings up, in this case I would also back up the system databases and restore them on the new system. As long as the version of SQL is the same on both sides, this is the simplest way to make sure that all IDs line up.

Saturday, February 25, 2012

AWE

Our current production environment consists of an 2 node (active-active) SQL
Server 2000 SP3a database cluster. It was recently rebuilt and we did not
reenable Address Windowing Extensions (AWE). Is it recommended that I turn
it on? Both servers have 8 procs running at 2.8 Ghz and 8 GB of RAM. I am
asking this because it appears to be performing well with AWE off. Also
should I allocate 7 GB of RAM to for 'max server memory'? It is not set now,
but is performing well without it.
Thanks,
Jay
Hi,
If you have 8 GB ram please enable AWE. My value for SQL Server will be from
6 to 6.5 GB.
I will leave the rest to OS and other applications.
Thanks
Hari
SQL Server MVP
"jay d" <jayd@.discussions.microsoft.com> wrote in message
news:2B3700C8-036C-454E-A50A-D156CBA98EAC@.microsoft.com...
> Our current production environment consists of an 2 node (active-active)
> SQL
> Server 2000 SP3a database cluster. It was recently rebuilt and we did not
> reenable Address Windowing Extensions (AWE). Is it recommended that I
> turn
> it on? Both servers have 8 procs running at 2.8 Ghz and 8 GB of RAM. I
> am
> asking this because it appears to be performing well with AWE off. Also
> should I allocate 7 GB of RAM to for 'max server memory'? It is not set
> now,
> but is performing well without it.
> Thanks,
> Jay
|||"jay d" wrote:
> Our current production environment consists of an 2 node (active-active) SQL
> Server 2000 SP3a database cluster. It was recently rebuilt and we did not
> reenable Address Windowing Extensions (AWE). Is it recommended that I turn
> it on? Both servers have 8 procs running at 2.8 Ghz and 8 GB of RAM. I am
> asking this because it appears to be performing well with AWE off. Also
> should I allocate 7 GB of RAM to for 'max server memory'? It is not set now,
> but is performing well without it.
Jay,
If the servers are running well without AWE, I would say keep it turned
off.
In my experience, the AWE implementation has some bugs. Better to keep
it simple unless you need the extra memory.
-- J
|||Just because you have lots of ram does not mean sql server will be able to
use it all effectively. It depends a lot on your data and how you access it.
If your cache hit ratio and page life expectancy arealways high and your
response times are good you may not need to turn it on. But if you do you
certainly should not set it to 7gb since you have an active - active
configuration. Since AWE memory is not dynamic you can have a situation
where one instance gets 7GB and leaves only 1GB for the other instance and
the OS and performance will suffer on all fronts.
Andrew J. Kelly SQL MVP
"jay d" <jayd@.discussions.microsoft.com> wrote in message
news:2B3700C8-036C-454E-A50A-D156CBA98EAC@.microsoft.com...
> Our current production environment consists of an 2 node (active-active)
> SQL
> Server 2000 SP3a database cluster. It was recently rebuilt and we did not
> reenable Address Windowing Extensions (AWE). Is it recommended that I
> turn
> it on? Both servers have 8 procs running at 2.8 Ghz and 8 GB of RAM. I
> am
> asking this because it appears to be performing well with AWE off. Also
> should I allocate 7 GB of RAM to for 'max server memory'? It is not set
> now,
> but is performing well without it.
> Thanks,
> Jay
|||Thank you all for the help. One more quick question. If I am 3 instances
should I set the max server memory to 7 GIG on each of them or do I divide
the RAM among the 3 instances? ex Instance 1 - 3 GIG, Instance 2 - 3 GIG,
and Instance 3 - 2 GIG.
Thanks,
Jay
"Andrew J. Kelly" wrote:

> Just because you have lots of ram does not mean sql server will be able to
> use it all effectively. It depends a lot on your data and how you access it.
> If your cache hit ratio and page life expectancy arealways high and your
> response times are good you may not need to turn it on. But if you do you
> certainly should not set it to 7gb since you have an active - active
> configuration. Since AWE memory is not dynamic you can have a situation
> where one instance gets 7GB and leaves only 1GB for the other instance and
> the OS and performance will suffer on all fronts.
> --
> Andrew J. Kelly SQL MVP
>
> "jay d" <jayd@.discussions.microsoft.com> wrote in message
> news:2B3700C8-036C-454E-A50A-D156CBA98EAC@.microsoft.com...
>
>
|||As I stated when you set AWE it is no longer dynamic. The first instance to
come up will grab all the memory it can up to the MAX Memory setting. If
you set it to 7GB for each instance and you only have 8GB total there isn't
enough to go around. When you use AWE you can not share the memory. So if
you really do have three instances that is probably the real reason why AWE
is turned off to begin with.
Andrew J. Kelly SQL MVP
"jay d" <jayd@.discussions.microsoft.com> wrote in message
news:9144E391-55F4-4B7F-9858-321A6973AE50@.microsoft.com...[vbcol=seagreen]
> Thank you all for the help. One more quick question. If I am 3 instances
> should I set the max server memory to 7 GIG on each of them or do I divide
> the RAM among the 3 instances? ex Instance 1 - 3 GIG, Instance 2 - 3 GIG,
> and Instance 3 - 2 GIG.
> Thanks,
> Jay
> "Andrew J. Kelly" wrote:
|||Hi,
Thanks, I will enable AWE. If I have 2 instances of SQL running, should I
set each instance to 3 GIG RAM and then leave 2 GIG for the OS, just in case
one node of the cluster fails and both instances end up on the same node for
awhile?
Thanks,
Jay
"Hari Prasad" wrote:

> Hi,
> If you have 8 GB ram please enable AWE. My value for SQL Server will be from
> 6 to 6.5 GB.
> I will leave the rest to OS and other applications.
> Thanks
> Hari
> SQL Server MVP
> "jay d" <jayd@.discussions.microsoft.com> wrote in message
> news:2B3700C8-036C-454E-A50A-D156CBA98EAC@.microsoft.com...
>
>
|||Just be sure not to apply SP4 for SQL Server. There is a bug with respect
to AWE. They are working on a fix.
Tom
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
..
"jay d" <jayd@.discussions.microsoft.com> wrote in message
news:8A900118-4F9B-4378-87F5-15EA79CC42F4@.microsoft.com...
Hi,
Thanks, I will enable AWE. If I have 2 instances of SQL running, should I
set each instance to 3 GIG RAM and then leave 2 GIG for the OS, just in case
one node of the cluster fails and both instances end up on the same node for
awhile?
Thanks,
Jay
"Hari Prasad" wrote:

> Hi,
> If you have 8 GB ram please enable AWE. My value for SQL Server will be
> from
> 6 to 6.5 GB.
> I will leave the rest to OS and other applications.
> Thanks
> Hari
> SQL Server MVP
> "jay d" <jayd@.discussions.microsoft.com> wrote in message
> news:2B3700C8-036C-454E-A50A-D156CBA98EAC@.microsoft.com...
>
>

AWE

Our current production environment consists of an 2 node (active-active) SQL
Server 2000 SP3a database cluster. It was recently rebuilt and we did not
reenable Address Windowing Extensions (AWE). Is it recommended that I turn
it on? Both servers have 8 procs running at 2.8 Ghz and 8 GB of RAM. I am
asking this because it appears to be performing well with AWE off. Also
should I allocate 7 GB of RAM to for 'max server memory'? It is not set now,
but is performing well without it.
Thanks,
JayHi,
If you have 8 GB ram please enable AWE. My value for SQL Server will be from
6 to 6.5 GB.
I will leave the rest to OS and other applications.
Thanks
Hari
SQL Server MVP
"jay d" <jayd@.discussions.microsoft.com> wrote in message
news:2B3700C8-036C-454E-A50A-D156CBA98EAC@.microsoft.com...
> Our current production environment consists of an 2 node (active-active)
> SQL
> Server 2000 SP3a database cluster. It was recently rebuilt and we did not
> reenable Address Windowing Extensions (AWE). Is it recommended that I
> turn
> it on? Both servers have 8 procs running at 2.8 Ghz and 8 GB of RAM. I
> am
> asking this because it appears to be performing well with AWE off. Also
> should I allocate 7 GB of RAM to for 'max server memory'? It is not set
> now,
> but is performing well without it.
> Thanks,
> Jay|||"jay d" wrote:
> Our current production environment consists of an 2 node (active-active) SQL
> Server 2000 SP3a database cluster. It was recently rebuilt and we did not
> reenable Address Windowing Extensions (AWE). Is it recommended that I turn
> it on? Both servers have 8 procs running at 2.8 Ghz and 8 GB of RAM. I am
> asking this because it appears to be performing well with AWE off. Also
> should I allocate 7 GB of RAM to for 'max server memory'? It is not set now,
> but is performing well without it.
Jay,
If the servers are running well without AWE, I would say keep it turned
off.
In my experience, the AWE implementation has some bugs. Better to keep
it simple unless you need the extra memory.
-- J|||Just because you have lots of ram does not mean sql server will be able to
use it all effectively. It depends a lot on your data and how you access it.
If your cache hit ratio and page life expectancy arealways high and your
response times are good you may not need to turn it on. But if you do you
certainly should not set it to 7gb since you have an active - active
configuration. Since AWE memory is not dynamic you can have a situation
where one instance gets 7GB and leaves only 1GB for the other instance and
the OS and performance will suffer on all fronts.
--
Andrew J. Kelly SQL MVP
"jay d" <jayd@.discussions.microsoft.com> wrote in message
news:2B3700C8-036C-454E-A50A-D156CBA98EAC@.microsoft.com...
> Our current production environment consists of an 2 node (active-active)
> SQL
> Server 2000 SP3a database cluster. It was recently rebuilt and we did not
> reenable Address Windowing Extensions (AWE). Is it recommended that I
> turn
> it on? Both servers have 8 procs running at 2.8 Ghz and 8 GB of RAM. I
> am
> asking this because it appears to be performing well with AWE off. Also
> should I allocate 7 GB of RAM to for 'max server memory'? It is not set
> now,
> but is performing well without it.
> Thanks,
> Jay|||Thank you all for the help. One more quick question. If I am 3 instances
should I set the max server memory to 7 GIG on each of them or do I divide
the RAM among the 3 instances? ex Instance 1 - 3 GIG, Instance 2 - 3 GIG,
and Instance 3 - 2 GIG.
Thanks,
Jay
"Andrew J. Kelly" wrote:
> Just because you have lots of ram does not mean sql server will be able to
> use it all effectively. It depends a lot on your data and how you access it.
> If your cache hit ratio and page life expectancy arealways high and your
> response times are good you may not need to turn it on. But if you do you
> certainly should not set it to 7gb since you have an active - active
> configuration. Since AWE memory is not dynamic you can have a situation
> where one instance gets 7GB and leaves only 1GB for the other instance and
> the OS and performance will suffer on all fronts.
> --
> Andrew J. Kelly SQL MVP
>
> "jay d" <jayd@.discussions.microsoft.com> wrote in message
> news:2B3700C8-036C-454E-A50A-D156CBA98EAC@.microsoft.com...
> > Our current production environment consists of an 2 node (active-active)
> > SQL
> > Server 2000 SP3a database cluster. It was recently rebuilt and we did not
> > reenable Address Windowing Extensions (AWE). Is it recommended that I
> > turn
> > it on? Both servers have 8 procs running at 2.8 Ghz and 8 GB of RAM. I
> > am
> > asking this because it appears to be performing well with AWE off. Also
> > should I allocate 7 GB of RAM to for 'max server memory'? It is not set
> > now,
> > but is performing well without it.
> >
> > Thanks,
> > Jay
>
>|||As I stated when you set AWE it is no longer dynamic. The first instance to
come up will grab all the memory it can up to the MAX Memory setting. If
you set it to 7GB for each instance and you only have 8GB total there isn't
enough to go around. When you use AWE you can not share the memory. So if
you really do have three instances that is probably the real reason why AWE
is turned off to begin with.
--
Andrew J. Kelly SQL MVP
"jay d" <jayd@.discussions.microsoft.com> wrote in message
news:9144E391-55F4-4B7F-9858-321A6973AE50@.microsoft.com...
> Thank you all for the help. One more quick question. If I am 3 instances
> should I set the max server memory to 7 GIG on each of them or do I divide
> the RAM among the 3 instances? ex Instance 1 - 3 GIG, Instance 2 - 3 GIG,
> and Instance 3 - 2 GIG.
> Thanks,
> Jay
> "Andrew J. Kelly" wrote:
>> Just because you have lots of ram does not mean sql server will be able
>> to
>> use it all effectively. It depends a lot on your data and how you access
>> it.
>> If your cache hit ratio and page life expectancy arealways high and your
>> response times are good you may not need to turn it on. But if you do
>> you
>> certainly should not set it to 7gb since you have an active - active
>> configuration. Since AWE memory is not dynamic you can have a situation
>> where one instance gets 7GB and leaves only 1GB for the other instance
>> and
>> the OS and performance will suffer on all fronts.
>> --
>> Andrew J. Kelly SQL MVP
>>
>> "jay d" <jayd@.discussions.microsoft.com> wrote in message
>> news:2B3700C8-036C-454E-A50A-D156CBA98EAC@.microsoft.com...
>> > Our current production environment consists of an 2 node
>> > (active-active)
>> > SQL
>> > Server 2000 SP3a database cluster. It was recently rebuilt and we did
>> > not
>> > reenable Address Windowing Extensions (AWE). Is it recommended that I
>> > turn
>> > it on? Both servers have 8 procs running at 2.8 Ghz and 8 GB of RAM.
>> > I
>> > am
>> > asking this because it appears to be performing well with AWE off.
>> > Also
>> > should I allocate 7 GB of RAM to for 'max server memory'? It is not
>> > set
>> > now,
>> > but is performing well without it.
>> >
>> > Thanks,
>> > Jay
>>|||Hi,
Thanks, I will enable AWE. If I have 2 instances of SQL running, should I
set each instance to 3 GIG RAM and then leave 2 GIG for the OS, just in case
one node of the cluster fails and both instances end up on the same node for
awhile?
Thanks,
Jay
"Hari Prasad" wrote:
> Hi,
> If you have 8 GB ram please enable AWE. My value for SQL Server will be from
> 6 to 6.5 GB.
> I will leave the rest to OS and other applications.
> Thanks
> Hari
> SQL Server MVP
> "jay d" <jayd@.discussions.microsoft.com> wrote in message
> news:2B3700C8-036C-454E-A50A-D156CBA98EAC@.microsoft.com...
> > Our current production environment consists of an 2 node (active-active)
> > SQL
> > Server 2000 SP3a database cluster. It was recently rebuilt and we did not
> > reenable Address Windowing Extensions (AWE). Is it recommended that I
> > turn
> > it on? Both servers have 8 procs running at 2.8 Ghz and 8 GB of RAM. I
> > am
> > asking this because it appears to be performing well with AWE off. Also
> > should I allocate 7 GB of RAM to for 'max server memory'? It is not set
> > now,
> > but is performing well without it.
> >
> > Thanks,
> > Jay
>
>|||Just be sure not to apply SP4 for SQL Server. There is a bug with respect
to AWE. They are working on a fix.
--
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
.
"jay d" <jayd@.discussions.microsoft.com> wrote in message
news:8A900118-4F9B-4378-87F5-15EA79CC42F4@.microsoft.com...
Hi,
Thanks, I will enable AWE. If I have 2 instances of SQL running, should I
set each instance to 3 GIG RAM and then leave 2 GIG for the OS, just in case
one node of the cluster fails and both instances end up on the same node for
awhile?
Thanks,
Jay
"Hari Prasad" wrote:
> Hi,
> If you have 8 GB ram please enable AWE. My value for SQL Server will be
> from
> 6 to 6.5 GB.
> I will leave the rest to OS and other applications.
> Thanks
> Hari
> SQL Server MVP
> "jay d" <jayd@.discussions.microsoft.com> wrote in message
> news:2B3700C8-036C-454E-A50A-D156CBA98EAC@.microsoft.com...
> > Our current production environment consists of an 2 node (active-active)
> > SQL
> > Server 2000 SP3a database cluster. It was recently rebuilt and we did
> > not
> > reenable Address Windowing Extensions (AWE). Is it recommended that I
> > turn
> > it on? Both servers have 8 procs running at 2.8 Ghz and 8 GB of RAM. I
> > am
> > asking this because it appears to be performing well with AWE off. Also
> > should I allocate 7 GB of RAM to for 'max server memory'? It is not set
> > now,
> > but is performing well without it.
> >
> > Thanks,
> > Jay
>
>

AWE

Our current production environment consists of an 2 node (active-active) SQL
Server 2000 SP3a database cluster. It was recently rebuilt and we did not
reenable Address Windowing Extensions (AWE). Is it recommended that I turn
it on? Both servers have 8 procs running at 2.8 Ghz and 8 GB of RAM. I am
asking this because it appears to be performing well with AWE off. Also
should I allocate 7 GB of RAM to for 'max server memory'? It is not set now
,
but is performing well without it.
Thanks,
JayHi,
If you have 8 GB ram please enable AWE. My value for SQL Server will be from
6 to 6.5 GB.
I will leave the rest to OS and other applications.
Thanks
Hari
SQL Server MVP
"jay d" <jayd@.discussions.microsoft.com> wrote in message
news:2B3700C8-036C-454E-A50A-D156CBA98EAC@.microsoft.com...
> Our current production environment consists of an 2 node (active-active)
> SQL
> Server 2000 SP3a database cluster. It was recently rebuilt and we did not
> reenable Address Windowing Extensions (AWE). Is it recommended that I
> turn
> it on? Both servers have 8 procs running at 2.8 Ghz and 8 GB of RAM. I
> am
> asking this because it appears to be performing well with AWE off. Also
> should I allocate 7 GB of RAM to for 'max server memory'? It is not set
> now,
> but is performing well without it.
> Thanks,
> Jay|||"jay d" wrote:
> Our current production environment consists of an 2 node (active-active) S
QL
> Server 2000 SP3a database cluster. It was recently rebuilt and we did not
> reenable Address Windowing Extensions (AWE). Is it recommended that I tur
n
> it on? Both servers have 8 procs running at 2.8 Ghz and 8 GB of RAM. I a
m
> asking this because it appears to be performing well with AWE off. Also
> should I allocate 7 GB of RAM to for 'max server memory'? It is not set n
ow,
> but is performing well without it.
Jay,
If the servers are running well without AWE, I would say keep it turned
off.
In my experience, the AWE implementation has some bugs. Better to keep
it simple unless you need the extra memory.
-- J|||Just because you have lots of ram does not mean sql server will be able to
use it all effectively. It depends a lot on your data and how you access it.
If your cache hit ratio and page life expectancy arealways high and your
response times are good you may not need to turn it on. But if you do you
certainly should not set it to 7gb since you have an active - active
configuration. Since AWE memory is not dynamic you can have a situation
where one instance gets 7GB and leaves only 1GB for the other instance and
the OS and performance will suffer on all fronts.
Andrew J. Kelly SQL MVP
"jay d" <jayd@.discussions.microsoft.com> wrote in message
news:2B3700C8-036C-454E-A50A-D156CBA98EAC@.microsoft.com...
> Our current production environment consists of an 2 node (active-active)
> SQL
> Server 2000 SP3a database cluster. It was recently rebuilt and we did not
> reenable Address Windowing Extensions (AWE). Is it recommended that I
> turn
> it on? Both servers have 8 procs running at 2.8 Ghz and 8 GB of RAM. I
> am
> asking this because it appears to be performing well with AWE off. Also
> should I allocate 7 GB of RAM to for 'max server memory'? It is not set
> now,
> but is performing well without it.
> Thanks,
> Jay|||Thank you all for the help. One more quick question. If I am 3 instances
should I set the max server memory to 7 GIG on each of them or do I divide
the RAM among the 3 instances? ex Instance 1 - 3 GIG, Instance 2 - 3 GIG,
and Instance 3 - 2 GIG.
Thanks,
Jay
"Andrew J. Kelly" wrote:

> Just because you have lots of ram does not mean sql server will be able to
> use it all effectively. It depends a lot on your data and how you access i
t.
> If your cache hit ratio and page life expectancy arealways high and your
> response times are good you may not need to turn it on. But if you do you
> certainly should not set it to 7gb since you have an active - active
> configuration. Since AWE memory is not dynamic you can have a situation
> where one instance gets 7GB and leaves only 1GB for the other instance and
> the OS and performance will suffer on all fronts.
> --
> Andrew J. Kelly SQL MVP
>
> "jay d" <jayd@.discussions.microsoft.com> wrote in message
> news:2B3700C8-036C-454E-A50A-D156CBA98EAC@.microsoft.com...
>
>|||As I stated when you set AWE it is no longer dynamic. The first instance to
come up will grab all the memory it can up to the MAX Memory setting. If
you set it to 7GB for each instance and you only have 8GB total there isn't
enough to go around. When you use AWE you can not share the memory. So if
you really do have three instances that is probably the real reason why AWE
is turned off to begin with.
Andrew J. Kelly SQL MVP
"jay d" <jayd@.discussions.microsoft.com> wrote in message
news:9144E391-55F4-4B7F-9858-321A6973AE50@.microsoft.com...[vbcol=seagreen]
> Thank you all for the help. One more quick question. If I am 3 instances
> should I set the max server memory to 7 GIG on each of them or do I divide
> the RAM among the 3 instances? ex Instance 1 - 3 GIG, Instance 2 - 3 GIG,
> and Instance 3 - 2 GIG.
> Thanks,
> Jay
> "Andrew J. Kelly" wrote:
>|||Hi,
Thanks, I will enable AWE. If I have 2 instances of SQL running, should I
set each instance to 3 GIG RAM and then leave 2 GIG for the OS, just in case
one node of the cluster fails and both instances end up on the same node for
awhile?
Thanks,
Jay
"Hari Prasad" wrote:

> Hi,
> If you have 8 GB ram please enable AWE. My value for SQL Server will be fr
om
> 6 to 6.5 GB.
> I will leave the rest to OS and other applications.
> Thanks
> Hari
> SQL Server MVP
> "jay d" <jayd@.discussions.microsoft.com> wrote in message
> news:2B3700C8-036C-454E-A50A-D156CBA98EAC@.microsoft.com...
>
>|||Just be sure not to apply SP4 for SQL Server. There is a bug with respect
to AWE. They are working on a fix.
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
.
"jay d" <jayd@.discussions.microsoft.com> wrote in message
news:8A900118-4F9B-4378-87F5-15EA79CC42F4@.microsoft.com...
Hi,
Thanks, I will enable AWE. If I have 2 instances of SQL running, should I
set each instance to 3 GIG RAM and then leave 2 GIG for the OS, just in case
one node of the cluster fails and both instances end up on the same node for
awhile?
Thanks,
Jay
"Hari Prasad" wrote:

> Hi,
> If you have 8 GB ram please enable AWE. My value for SQL Server will be
> from
> 6 to 6.5 GB.
> I will leave the rest to OS and other applications.
> Thanks
> Hari
> SQL Server MVP
> "jay d" <jayd@.discussions.microsoft.com> wrote in message
> news:2B3700C8-036C-454E-A50A-D156CBA98EAC@.microsoft.com...
>
>

Friday, February 24, 2012

Avoid pop up RS reports on sharepoint

Hi,

Current, I have a web part which points to the report explorer. The first page is a list of the reports on the reportserver, when I clicked on the link of the one of the reports, it pop up a window to show the report, which behave exactly like http://reportserver/Reports. Is there a way to stop it from poping up a new window, and just show the report on the same page where the link was clicked?

Thanks,

Cheng

While rendering the report you could use the rc:TargetLink=_self paramter, which willopen all links in the same window.

HTH, jens Suessmeyer.


http://www.sqlserver2005.de

Sunday, February 19, 2012

avg of most current 50 only

I have a query that returns the averages for a selected group of records.
select AVG(h.stkhstClose), h.stkhstcsisym
from stkhst h
JOIN unvmem u on h.stkhstcsisym = u.unvmemCsiId
and u.unvmemUnvID = 29001
group by h.stkhstcsisym
order by h.stkhstcsisym
this works and returns 99 averages. However, I need it to average only the
last 50 records of each group based on the date. I'm looking for a clean way
to do this without using a temporary table or cursor. and ideas would be
appreciated
thanks
kesJust a guess. See my signature for a more precise answer.
SELECT AVG(whatever) FROM (SELECT TOP 50 whatever FROM table WHERE
<whatever> ORDER BY datecolumn DESC) x
Please post DDL, sample data and desired results.
See http://www.aspfaq.com/5006 for info.
"Kurt Schroeder" <KurtSchroeder@.discussions.microsoft.com> wrote in message
news:735FDCDB-B93C-45ED-94EA-0831429F5CB3@.microsoft.com...
> I have a query that returns the averages for a selected group of records.
> select AVG(h.stkhstClose), h.stkhstcsisym
> from stkhst h
> JOIN unvmem u on h.stkhstcsisym = u.unvmemCsiId
> and u.unvmemUnvID = 29001
> group by h.stkhstcsisym
> order by h.stkhstcsisym
> this works and returns 99 averages. However, I need it to average only the
> last 50 records of each group based on the date. I'm looking for a clean
way
> to do this without using a temporary table or cursor. and ideas would be
> appreciated
> thanks
> kes|||Thank You Aaron (you seem to answer a lot of my postings and your suggestion
s
have always proven helpful)
this will get the average for one group but how about the rest? Would a
where stkhstDate IN (select top 50 stkhstdate from stkhst where stkhstid =
xx order by stkhstdate DESC)
thank you
kes
"Aaron [SQL Server MVP]" wrote:

> Just a guess. See my signature for a more precise answer.
> SELECT AVG(whatever) FROM (SELECT TOP 50 whatever FROM table WHERE
> <whatever> ORDER BY datecolumn DESC) x
> --
> Please post DDL, sample data and desired results.
> See http://www.aspfaq.com/5006 for info.
>
>
> "Kurt Schroeder" <KurtSchroeder@.discussions.microsoft.com> wrote in messag
e
> news:735FDCDB-B93C-45ED-94EA-0831429F5CB3@.microsoft.com...
> way
>
>|||>> this will get the average for one group but how about the rest?
Did you read Aaron's post? To repeat:
See his signature for a more precise answer.
Please post DDL, sample data and desired results.
See http://www.aspfaq.com/5006 for info.
Anith|||ok, fair enough.
stkhst:
CREATE TABLE [stkhst] (
[stkhstID] [int] IDENTITY (1, 1) NOT NULL ,
[stkhstCsiSym] [int] NULL ,
[stkhstSym] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[stkhstDate] [int] NULL ,
[stkhstOpen] [decimal](9, 4) NULL ,
[stkhstHi] [decimal](9, 4) NULL ,
[stkhstLow] [decimal](9, 4) NULL ,
[stkhstClose] [decimal](9, 4) NULL ,
[stkhstVol] [int] NULL ,
[stkhstDiv] [int] NULL ,
[stkhstX] [int] NULL ,
[stkhstO] [int] NULL ,
[stkhstXO] [char] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[stkhstBuySell] [char] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
CONSTRAINT [DF_stkhst_stkhstBuySell] DEFAULT ('U'),
[stkhstLine] [char] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[stkhstCPosL] [int] NULL ,
[stkhstCPosH] [int] NULL ,
[stkHstCCol] [int] NULL
) ON [PRIMARY]
GO
unvmem:
CREATE TABLE [unvmem] (
[unvmemRecID] [int] IDENTITY (1, 1) NOT NULL ,
[unvmemCsiId] [int] NOT NULL ,
[unvmemUnvID] [int] NOT NULL ,
[unvmemActive] [bit] NULL CONSTRAINT [DF_unvmem_unvmemActive] DEFAULT (1)
) ON [PRIMARY]
GO
"Aaron [SQL Server MVP]" wrote:

> Just a guess. See my signature for a more precise answer.
> SELECT AVG(whatever) FROM (SELECT TOP 50 whatever FROM table WHERE
> <whatever> ORDER BY datecolumn DESC) x
> --
> Please post DDL, sample data and desired results.
> See http://www.aspfaq.com/5006 for info.
>
>
> "Kurt Schroeder" <KurtSchroeder@.discussions.microsoft.com> wrote in messag
e
> news:735FDCDB-B93C-45ED-94EA-0831429F5CB3@.microsoft.com...
> way
>
>|||noted, posted
thanks
kes
"Anith Sen" wrote:

> Did you read Aaron's post? To repeat:
> See his signature for a more precise answer.
> Please post DDL, sample data and desired results.
> See http://www.aspfaq.com/5006 for info.
> --
> Anith
>
>|||What about sample data and desired results?
The point is that we're not going to drive to Wichita or Kansas or wherever
you are to see what data is in your table and try to figure out what result
you want from that data. And we're certainly not going to spend our
afternoon inventing fictitious but possibly unrealistic data to populate
your empty table, then spend time developing a solution against that, only
to find out all the "buts" that come with the assumptions we made. Please
supply sample data in the form of INSERT statements, and the resultset you
want based on that data.
Please post DDL, sample data and desired results.
See http://www.aspfaq.com/5006 for info.

> ok, fair enough.
> stkhst:
> CREATE TABLE [stkhst] (
> [stkhstID] [int] IDENTITY (1, 1) NOT NULL ,
> [stkhstCsiSym] [int] NULL ,
> [stkhstSym] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
> [stkhstDate] [int] NULL ,
> [stkhstOpen] [decimal](9, 4) NULL ,
> [stkhstHi] [decimal](9, 4) NULL ,
> [stkhstLow] [decimal](9, 4) NULL ,
> [stkhstClose] [decimal](9, 4) NULL ,
> [stkhstVol] [int] NULL ,
> [stkhstDiv] [int] NULL ,
> [stkhstX] [int] NULL ,
> [stkhstO] [int] NULL ,
> [stkhstXO] [char] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
> [stkhstBuySell] [char] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
> CONSTRAINT [DF_stkhst_stkhstBuySell] DEFAULT ('U'),
> [stkhstLine] [char] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
> [stkhstCPosL] [int] NULL ,
> [stkhstCPosH] [int] NULL ,
> [stkHstCCol] [int] NULL
> ) ON [PRIMARY]
> GO
> unvmem:
> CREATE TABLE [unvmem] (
> [unvmemRecID] [int] IDENTITY (1, 1) NOT NULL ,
> [unvmemCsiId] [int] NOT NULL ,
> [unvmemUnvID] [int] NOT NULL ,
> [unvmemActive] [bit] NULL CONSTRAINT [DF_unvmem_unvmemActive] DEFAULT (1)
> ) ON [PRIMARY]
> GO|||Kurt,
Your tables seem to have no primary keys which is a critical design flaw.
Generally for such problems, others cannot test the solutions without sample
data. You have not provided that either. Also as a side note, if your scheme
allows, you may want to look closely at your naming convention as well.
Here is another attempt with guesswork:
SELECT AVG( stkhstClose ), stkhstcsisym
FROM ( SELECT TOP 50 h.stkhstClose, h.stkhstcsisym
FROM stkhst h
INNER JOIN unvmem u
ON h.stkhstcsisym = u.unvmemCsiId
WHERE u.unvmemUnvID = 29001
ORDER BY h.stkhstcsisym ) D ( stkhstClose, stkhstcsisym )
GROUP BY stkhstcsisym ;
Anith|||Kurt,
You want to extract and average the last 50 records for each group...
Just add a where clause that restricts the query to operate only on those
records which have 50 or less "partners" (in the same group) after them...
Select AVG(h.stkhstClose), h.stkhstcsisym
From stkhst h
Where (Select Count(*) From stkhst
Where stkhstcsisym = h.stkhstcsisym
And DateColumn >= h.DateColumn) <= 50
Select * From
"Kurt Schroeder" wrote:
> ok, fair enough.
> stkhst:
> CREATE TABLE [stkhst] (
> [stkhstID] [int] IDENTITY (1, 1) NOT NULL ,
> [stkhstCsiSym] [int] NULL ,
> [stkhstSym] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
> [stkhstDate] [int] NULL ,
> [stkhstOpen] [decimal](9, 4) NULL ,
> [stkhstHi] [decimal](9, 4) NULL ,
> [stkhstLow] [decimal](9, 4) NULL ,
> [stkhstClose] [decimal](9, 4) NULL ,
> [stkhstVol] [int] NULL ,
> [stkhstDiv] [int] NULL ,
> [stkhstX] [int] NULL ,
> [stkhstO] [int] NULL ,
> [stkhstXO] [char] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
> [stkhstBuySell] [char] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
> CONSTRAINT [DF_stkhst_stkhstBuySell] DEFAULT ('U'),
> [stkhstLine] [char] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
> [stkhstCPosL] [int] NULL ,
> [stkhstCPosH] [int] NULL ,
> [stkHstCCol] [int] NULL
> ) ON [PRIMARY]
> GO
> unvmem:
> CREATE TABLE [unvmem] (
> [unvmemRecID] [int] IDENTITY (1, 1) NOT NULL ,
> [unvmemCsiId] [int] NOT NULL ,
> [unvmemUnvID] [int] NOT NULL ,
> [unvmemActive] [bit] NULL CONSTRAINT [DF_unvmem_unvmemActive] DEFAULT (1)
> ) ON [PRIMARY]
> GO
> "Aaron [SQL Server MVP]" wrote:
>|||My apologies, I did not mean to imply that I needed more than advise. Please
understand that I do not feel it appropriate to ask for more than just that.
I feel it would be unfair to you or anyone else to do my work for me.
Aaron, your first posting to my question gave me what I needed to search for
the answer. My real query is much more complex, but this part of it was
simple enough to post for advice.
Again I wish to thank you for your help.
Humbly yours
kes
"Aaron [SQL Server MVP]" wrote:

> What about sample data and desired results?
> The point is that we're not going to drive to Wichita or Kansas or whereve
r
> you are to see what data is in your table and try to figure out what resul
t
> you want from that data. And we're certainly not going to spend our
> afternoon inventing fictitious but possibly unrealistic data to populate
> your empty table, then spend time developing a solution against that, only
> to find out all the "buts" that come with the assumptions we made. Please
> supply sample data in the form of INSERT statements, and the resultset you
> want based on that data.
> --
> Please post DDL, sample data and desired results.
> See http://www.aspfaq.com/5006 for info.
>
>
>
>