Showing posts with label line. Show all posts
Showing posts with label line. Show all posts

Sunday, March 11, 2012

Cannot use the OUTPUT option when passing a constant to a stored p

Hi,
I'm trying to export a text column into a text file using the bcp command
but I keep getting the error message in the subject line. So I checked the
database properties and didn't find anything.
My Code:
bcp "Select Replace(Str(UNITNUM, 12, 0), ' ', '0') FROM PICUadmissions
WHERE Admit_Date>'2005-06-01' and Admit_Date<'2005-07-01'" out
"I:\sttr\STTRLabsIn.txt" -c -T
go
Does anyone know why I am getting this message?
Much Appreciated,
ChiekoError message? Wish I could see it.
ML|||Since your BCP source is a query rather than a table/view, you need to
specify 'queryout' instead of 'out'.
Hope this helps.
Dan Guzman
SQL Server MVP
"chieko" <chieko@.discussions.microsoft.com> wrote in message
news:A82B768C-9367-447E-81DE-8EBFFAFBD62C@.microsoft.com...
> Hi,
> I'm trying to export a text column into a text file using the bcp command
> but I keep getting the error message in the subject line. So I checked the
> database properties and didn't find anything.
> My Code:
> bcp "Select Replace(Str(UNITNUM, 12, 0), ' ', '0') FROM PICUadmissions
> WHERE Admit_Date>'2005-06-01' and Admit_Date<'2005-07-01'" out
> "I:\sttr\STTRLabsIn.txt" -c -T
> go
> Does anyone know why I am getting this message?
> Much Appreciated,
> Chieko
>

Cannot use Large Page Extensions & AWE

Hi,

We are seeing the following line on the sql errorlog on a Itanium2 server running SQL Server 2005 Enterprise RC1.

Cannot use Large Page Extensions: lock memory privilege was not granted.

Is it something to be alarmed with?

This server has 16GB memory so it's my understaning that AWE does not have to be enabled on the instance as the 64-bit architecture can directly address more than 3GB of memory?
Cheers,
Priyanga


Few questions:

(1) Have you enabled AWE option. Assume not, but checking.
(2) Are you running 32-bit version of SQL Server on a 64-bit machine? 32-bit windows applications automatically run on 64-windows through WoW.
(3) Are you starting SQL Server with any trace flags?

|||

Short answer to your question, no, you don’t have to worry, but read on.

Indeed 64-bit SQL Server can address more than “usual” limit of 32 bit address space.

However, locked pages in memory privilege allows SQL Server to keep pages in memory and do not allow the OS to page them out. This may translate to performance gain, but does require the privilege. The privilege also allows to use large page extensions, which also may be benefitial for performance reasons.

You will get this message in default server configuration if you have large amounts of RAM (which you do).

I would recommend enabling the privilege and testing your server. You may get performance gain.

HTH,
Boris.

|||

Thanks Boris.

How do i enable the "locked pages in memory privilege" setting?
I could not see this as a sql server system configuration.

Also, to clarify, i don't need to enable "AWE enabled" configuraton on this instance as 64-bit does it natively?

Cheers,
Priyanga

|||

It is Windows level privilege. This is from Windows help:

You can configure this security setting by opening the appropriate policy and expanding the console tree as such: Computer Configuration\Windows Settings\Security Settings\Local Policies\User Rights Assignment\.

This security setting determines which accounts can use a process to keep data in physical memory, which prevents the system from paging the data to virtual memory on disk. Exercising this privilege could significantly affect system performance by decreasing the amount of available random access memory (RAM).

I would like to emphasize the last point. Understand the implication of granting this privilege. E.g. if you have something else on this server, SQL Server may effectively consume most of the RAM, unless you set 'max server memory' as well. This is why I recommend testing your server.

As for the second quesiton, no, you do not need to set "AWE enabled" on 64-bit server.

Regards,
Boris.

Sunday, February 12, 2012

Cannot run snapshot agent from command line

I have a transactional replication running and it's running well.
But now i'm writing a script so I can start the Snapshot Agent from
distance. therefore I want to run it from the command prompt.
I'm using this command: C:\Program Files\Microsoft SQL Server\80\COM
\snapshot.exe -Publisher <server> -PublisherDB <pubDB> -Publication
<pub> -DistributorLogin <login> -DistributorPassword <pwd>
And this is my output:
==== Output start ======
Microsoft SQL Server Snapshot Agent 8.00.2039
Copyright (c) 2000 Microsoft Corporation
The process could not create file '\\<server>\ReplData\unc'.
Finished with exit code 2
==== Output end ======
When I start the agent from SQL Server itself it works fine.
the location of the snapshot folder is defined as '\\<server>
\ReplData' and (for testing now) this folder has full access.
Can somebody tell mee what;s going wrong and what I can do about it?
Can you create your command as text in a batch file then use RunAs (or log on
again if RunAs is disabled). The user to select is the sql server agent
login...
HTH,
Paul Ibison
|||You need to check to ensure that the share permissions are full for the
account which the SQL Server Agent runs under, or the account the snapshot
agent is proxied under, and the underlying security is full for the path and
all child objects.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"acsnaterse" <snaterse@.gmail.com> wrote in message
news:1184079506.481076.126000@.22g2000hsm.googlegro ups.com...
>I have a transactional replication running and it's running well.
> But now i'm writing a script so I can start the Snapshot Agent from
> distance. therefore I want to run it from the command prompt.
> I'm using this command: C:\Program Files\Microsoft SQL Server\80\COM
> \snapshot.exe -Publisher <server> -PublisherDB <pubDB> -Publication
> <pub> -DistributorLogin <login> -DistributorPassword <pwd>
> And this is my output:
> ==== Output start ======
> Microsoft SQL Server Snapshot Agent 8.00.2039
> Copyright (c) 2000 Microsoft Corporation
> The process could not create file '\\<server>\ReplData\unc'.
> Finished with exit code 2
> ==== Output end ======
> When I start the agent from SQL Server itself it works fine.
> the location of the snapshot folder is defined as '\\<server>
> \ReplData' and (for testing now) this folder has full access.
> Can somebody tell mee what;s going wrong and what I can do about it?
>
|||On 10 jul, 17:58, Paul Ibison <Paul.Ibi...@.Pygmalion.Com> wrote:
> Can you create your command as text in a batch file then use RunAs (or log on
> again if RunAs is disabled). The user to select is the sql server agent
> login...
> HTH,
> Paul Ibison
Hi,
Thanks! With the runas commando it works great!
Hint: in combination with Sanur (http://www.commandline.co.uk/
sanur_unsupported/index3.html) you can automate the password fill-in.