Showing posts with label command. Show all posts
Showing posts with label command. Show all posts

Thursday, March 29, 2012

Error when using SP in data flow

I want to execute a stored procedure in an OLE DB source in a Data Flow Task.

The stored procedure has a parameter.

When I put in an SQL command as :

EXEC sp_readcustomers 1

(thus passing 1 as the parameter value I can use the Preview button and I get a list of columns being returned.

The data flow task should run inside a ForEach Loop where I assign the value of an ADO resultset to a variable and it is this variable I want to pass to the SP :

EXEC sp_readcustomers ?

In the Parameter mapping I then name the parameter @.par_company_id (which is the exact same name as in the SP) and map it to the variable var_company_id.

@.par_company_id has been declared as int, var_company_id as Int16

When I now try to Parse or Preview the query from the OLE DB Source Edit window I get the following errors :

Parse : Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

Preview : No value given for one or more required parameters (Microsoft SQL Native Client)

I have already installed SQL 2005 SP2 and VS2005 SP1.

I have tried everything I know, please help ?!?!

Have you tried putting the SQL Statment in a variable? You can parametrized queries using expressions in variables; then the source component will get the sql statemnt from the variable. There are a lot of example on this forum.|||

I have tried that.

I created a variable, set EvaluateAsExpression to True and entered the select statement as an expression.

Problem is that I can't select the variable, it is in the correct scope but it doesn't show up in the drop-down list of the OLE DB Source.

When you look at the documentation (Books online, etc. ...) I'm using the correct method to pass parameters to a stored procedure, is this a bug in VS/SQL ?

|||

Ronald Dirkx wrote:

I have tried that.

I created a variable, set EvaluateAsExpression to True and entered the select statement as an expression.

Problem is that I can't select the variable, it is in the correct scope but it doesn't show up in the drop-down list of the OLE DB Source.

When you look at the documentation (Books online, etc. ...) I'm using the correct method to pass parameters to a stored procedure, is this a bug in VS/SQL ?

To use the variable in an OLE DB Source, select the data access mode of "SQL command from variable." Then your variable will show up in the drop down.

Error when using a stored procedure in OLE DB source

I am trying to use a stored procedure in the OLE DB source, I am using the SQL Command for the Data Access mode. It returns values when using the preview but when I test the package I receive the error, "A rowset based on the SQL command was not returned by the OLE DB provider."how is the ole db source configured?|||For the the connection manager I just have a basic connection to the Sql server and then I am using the SQL command for the data access mode. The connection manager does work when I use other access modes like the table and view option.|||how is the connection manager configured? you may need to use a different configuration.|||ConnectionManagerType = OLEDB
Data Source = ABCSERVER;Initial Catalog=ABCDATABASE;Provider=SQLNCLI.1;OLE DB Services=-13;Integrated Security=SSPI;Auto Translate=True;
DataSourceID =
DelayValidation = False
Description =
RetainSameConnection = False
SupportsDTCTransactions = True|||

DustinT wrote:

ConnectionManagerType = OLEDB
Data Source = ABCSERVER;Initial Catalog=ABCDATABASE;Provider=SQLNCLI.1;OLE DB Services=-13;Integrated Security=SSPI;Auto Translate=True;
DataSourceID =
DelayValidation = False
Description =
RetainSameConnection = False
SupportsDTCTransactions = True

if i'm not mistaken, the sql native client provider (SQLNCLI.1) only works with sql server 2005.

if you are using a different version of sql server, then try using the microsoft ole db provider for sql server (SQLOLEDB.1)

|||See http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=366077&SiteID=1

Tuesday, March 27, 2012

error when running the DTSRUN command

Hi
We're using SqlServer 2000.

I want to run a DTS using the DTSRUN command.
The commmand is inside a ".bat" file which my application is running
from an SQL client.
No matter how I run it from the client it fails giving me the message:

[ConnectionOpen (Connect()).]SQL Server does not exist or access denied

I've tried to run it from the client from the application, from the
command prompt and it fails.
I went into enterprise on the client and tried to run the DTS from
there. The run failed already on the 1st step which is a call to a
stored procedure, also giving me the same message. This really stuck me
as wierd because in enterprise I'm accessing the server successfully so
why the above messgae. It identifies the server and I am accessing it.

Because it failed on the 1st step which is a call to a stored procedure
I tried running the sp from within query analyzer and it succeeded.

Has anyone got any idea what the problem is and ghow to solve it.

Thanks !

David GreenbergDavid Greenberg (davidgr@.iba.org.il) writes:

Quote:

Originally Posted by

I want to run a DTS using the DTSRUN command.
The commmand is inside a ".bat" file which my application is running
from an SQL client.
No matter how I run it from the client it fails giving me the message:
>
[ConnectionOpen (Connect()).]SQL Server does not exist or access denied
>
I've tried to run it from the client from the application, from the
command prompt and it fails.
I went into enterprise on the client and tried to run the DTS from
there. The run failed already on the 1st step which is a call to a
stored procedure, also giving me the same message. This really stuck me
as wierd because in enterprise I'm accessing the server successfully so
why the above messgae. It identifies the server and I am accessing it.
>
Because it failed on the 1st step which is a call to a stored procedure
I tried running the sp from within query analyzer and it succeeded.
>
Has anyone got any idea what the problem is and ghow to solve it.


You can't accuse me to know too much about DTS, but I see that a
DTS package has connection properties. I would assume that you can
have a package on server A, and run it against server B.

So I would check the connection properties of the package (or the step,
as different task surely must be able to connect to different servers).

The error message simply means that you are trying to connect to a
server that is not available. (Not running, misspelled, a firewall
in the way etc.)

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx

Error when running sp_helpdb query

I get the following error when running command "sp_helpdb" in Query Analyzer.
Server: Msg 515, Level 16, State 2, Procedure sp_helpdb, Line 53 Cannot
insert the value NULL into column 'owner', table
'tempdb.dbo.#spdbdesc___________________________________________________________________________________________________________000100371F02';
column does not allow nulls. INSERT fails.
The statement has been terminated.Kush
use master
go
sp_helptext 'sp_helpdb'
I think it fails to find suser_sname of the current session
"Kush" <Kush@.discussions.microsoft.com> wrote in message
news:44DAF4E9-9DCA-47FC-85A3-79234F68EFF3@.microsoft.com...
>I get the following error when running command "sp_helpdb" in Query
>Analyzer.
> Server: Msg 515, Level 16, State 2, Procedure sp_helpdb, Line 53 Cannot
> insert the value NULL into column 'owner', table
> 'tempdb.dbo.#spdbdesc___________________________________________________________________________________________________________000100371F02';
> column does not allow nulls. INSERT fails.
> The statement has been terminated.|||Here's an URL that might explain it. Google is your friend :-)
http://groups.google.com/group/microsoft.public.sqlserver.server/browse_thread/thread/bc6f4659bb8dd60c/50f0170456dd13b5?q=sp_helpdb+insert+NULL&rnum=3#50f0170456dd13b5
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Kush" <Kush@.discussions.microsoft.com> wrote in message
news:44DAF4E9-9DCA-47FC-85A3-79234F68EFF3@.microsoft.com...
>I get the following error when running command "sp_helpdb" in Query Analyzer.
> Server: Msg 515, Level 16, State 2, Procedure sp_helpdb, Line 53 Cannot
> insert the value NULL into column 'owner', table
> 'tempdb.dbo.#spdbdesc___________________________________________________________________________________________________________000100371F02';
> column does not allow nulls. INSERT fails.
> The statement has been terminated.|||I will try that and let you know what happens!
"Tibor Karaszi" wrote:
> Here's an URL that might explain it. Google is your friend :-)
> http://groups.google.com/group/microsoft.public.sqlserver.server/browse_thread/thread/bc6f4659bb8dd60c/50f0170456dd13b5?q=sp_helpdb+insert+NULL&rnum=3#50f0170456dd13b5
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Kush" <Kush@.discussions.microsoft.com> wrote in message
> news:44DAF4E9-9DCA-47FC-85A3-79234F68EFF3@.microsoft.com...
> >I get the following error when running command "sp_helpdb" in Query Analyzer.
> >
> > Server: Msg 515, Level 16, State 2, Procedure sp_helpdb, Line 53 Cannot
> > insert the value NULL into column 'owner', table
> > 'tempdb.dbo.#spdbdesc___________________________________________________________________________________________________________000100371F02';
> > column does not allow nulls. INSERT fails.
> > The statement has been terminated.
>

Friday, March 23, 2012

Error when Logging on - Error: 18456, Severity: 14, State: 16

Hi All,
I am getting the following error in the ERRORLOG File when I am
trying
to connect to SQL Server 2005 Express Edition from the command line.
2007-03-23 07:30:05.54 Logon Error: 18456, Severity: 14, State:
16.
2007-03-23 07:30:05.54 Logon Login failed for user 'sa'.
[CLIENT: xx.xx.xx.xx]
I have a fresh install of SQL Server on my local machine, which is
probably the source of my angst, but I am trying to create a database
from scratch through using a batch file that is run from the command
line, the batch file looks like this:
<snip>
SQLCMD -U %USR% -P %PWD% -S %SVR% -d %DBF% -i CreateDatabase.sql
<snip>
The values of %USR% and %PWD% are correct as I frequently log into
Management Studio with the details, %SVR% is "<ComputerName>
\SQLEXPRESS,1433" and %DBF% is <DatabaseName>. The contents of
CreateDatabase.sql when run in Management Studio successfully creates
the database that I require so I know the error doesn't lie there.
The command line error that is showing reads as the following:
Msg 4060, Level 11, State 1, Server <ComputerName>\SQLEXPRESS, Line 1
Cannot open database "<DatabaseName>" requested by the login. The
login failed.
Msg 18456, Level 14, State 1, Server <ComputerName>\SQLEXPRESS, Line
1
Login failed for user 'sa'.
I have a feeling that it is related to 'sa' not having the correct
permissions with regards to logging into or creating a database from
scratch, but I find it odd that I can login as 'sa' in Management
Studio and create the database from there, but when I try it from the
command-line (despite having TCP/IP enabled) it won't let me connect
to create a database.
Is there something I am missing here? I have been banging my head off
of walls for days over this and am unsure of the next steps to take.
If any of this screams "why the hell are you doing this?" then please
let me know as at the moment I am punching in the dark with this
problem, I have searched Usenet, Google Groups, the Web and although
I
have found potential solutions to this particular problem I am
having,
nothing I have done so far has actually managed to fix the issue.
Related articles I have followed are:
Login failed for user 'x'
http://msdn2.microsoft.com/en-us/library/ms366351.aspx
Change Server Authentication Mode
http://msdn2.microsoft.com/en-us/library/ms188670.aspx
Upgrading MSDE 2000 to SQL Server 2005 Express [Enabling network
protocols section]
http://www.microsoft.com/technet/pr...e2sqlexpress...
NOTE: I just listed these articles to show what path I am currently
looking at with regards to this problem, but again I stress I have
found nothing yet to get round this problem, and any further articles
or direction would be much appreciated.
Yours Distressingly
AlastairI'm still not clear on what database is used for -d
<DatabaseName> and this could be one of the problems. If you
are trying to log in using the database you are about to
create, then that's likely the issue as it doesn't exist
when logging in. Try specifying master for the initial login
database.
-Sue
On 23 Mar 2007 08:48:10 -0700, "Alastair"
<alastair_anderson@.hotmail.com> wrote:

>Hi All,
>I am getting the following error in the ERRORLOG File when I am
>trying
>to connect to SQL Server 2005 Express Edition from the command line.
>
>2007-03-23 07:30:05.54 Logon Error: 18456, Severity: 14, State:
>16.
>2007-03-23 07:30:05.54 Logon Login failed for user 'sa'.
>[CLIENT: xx.xx.xx.xx]
>
>I have a fresh install of SQL Server on my local machine, which is
>probably the source of my angst, but I am trying to create a database
>from scratch through using a batch file that is run from the command
>line, the batch file looks like this:
>
><snip>
>SQLCMD -U %USR% -P %PWD% -S %SVR% -d %DBF% -i CreateDatabase.sql
><snip>
>
>The values of %USR% and %PWD% are correct as I frequently log into
>Management Studio with the details, %SVR% is "<ComputerName>
>\SQLEXPRESS,1433" and %DBF% is <DatabaseName>. The contents of
>CreateDatabase.sql when run in Management Studio successfully creates
>the database that I require so I know the error doesn't lie there.
>
>The command line error that is showing reads as the following:
>
>Msg 4060, Level 11, State 1, Server <ComputerName>\SQLEXPRESS, Line 1
>Cannot open database "<DatabaseName>" requested by the login. The
>login failed.
>Msg 18456, Level 14, State 1, Server <ComputerName>\SQLEXPRESS, Line
>1
>Login failed for user 'sa'.
>
>I have a feeling that it is related to 'sa' not having the correct
>permissions with regards to logging into or creating a database from
>scratch, but I find it odd that I can login as 'sa' in Management
>Studio and create the database from there, but when I try it from the
>command-line (despite having TCP/IP enabled) it won't let me connect
>to create a database.
>
>Is there something I am missing here? I have been banging my head off
>of walls for days over this and am unsure of the next steps to take.
>
>If any of this screams "why the hell are you doing this?" then please
>let me know as at the moment I am punching in the dark with this
>problem, I have searched Usenet, Google Groups, the Web and although
>I
>have found potential solutions to this particular problem I am
>having,
>nothing I have done so far has actually managed to fix the issue.
>
>Related articles I have followed are:
>
>Login failed for user 'x'
>http://msdn2.microsoft.com/en-us/library/ms366351.aspx
>
>Change Server Authentication Mode
>http://msdn2.microsoft.com/en-us/library/ms188670.aspx
>
>Upgrading MSDE 2000 to SQL Server 2005 Express [Enabling network
>protocols section]
>http://www.microsoft.com/technet/pr...e2sqlexpress...
>
>NOTE: I just listed these articles to show what path I am currently
>looking at with regards to this problem, but again I stress I have
>found nothing yet to get round this problem, and any further articles
>or direction would be much appreciated.
>
>Yours Distressingly
>
>Alastair|||On 25 Mar, 16:17, Sue Hoegemeier <S...@.nomail.please> wrote:
> I'm still not clear on what database is used for -d
> <DatabaseName> and this could be one of the problems. If you
> are trying to log in using the database you are about to
> create, then that's likely the issue as it doesn't exist
> when logging in. Try specifying master for the initial login
> database.
> -Sue
> On 23 Mar 2007 08:48:10 -0700, "Alastair"
>
> <alastair_ander...@.hotmail.com> wrote:
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> - Show quoted text -
You managed to hit the nail on the head.
Running my current script when the new database already exists it
works fine, however for a fresh install of SQL Server, when it doesn't
currently exist then it doesn't work.
Thanks for your help
Alastair

Monday, March 19, 2012

Error when creating a backup job

Hello, I'm trying to do a backup of a database by creating a job for it....
I'm entering the command but when I do a Parse to ensure that the syntax is
correct, I'm getting the following error:
"TITLE: Parse Command Text
The following errors were detected in the command text.
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch.
(Microsoft.SqlServer.ConnectionInfo)
The identifier that starts with 'EXEC sp_addumpdecive 'disk',
'backup_file1', '\\tcl-fileserver3\backups\moss-weekly\weekly'
backup database WSS_Content to back' is too long. Maximum length is 128.
(Microsoft SQL Server, Error: 103)"
Is that because of the location(
'\\tcl-fileserver3\backups\moss-weekly\weekly') I am trying to do the backup
to?
Please help.....
Thanks
Shelly
Run in the job's step
BACKUP DATABASE dbname TO DISK =
N'\\Server\folder\dbname.BAK'
"Shelley" <Shelley@.discussions.microsoft.com> wrote in message
news:17373ED1-5AF5-48BD-9161-0D39F4207BCB@.microsoft.com...
> Hello, I'm trying to do a backup of a database by creating a job for
> it....
> I'm entering the command but when I do a Parse to ensure that the syntax
> is
> correct, I'm getting the following error:
> "TITLE: Parse Command Text
> --
> The following errors were detected in the command text.
> --
> ADDITIONAL INFORMATION:
> An exception occurred while executing a Transact-SQL statement or batch.
> (Microsoft.SqlServer.ConnectionInfo)
> --
> The identifier that starts with 'EXEC sp_addumpdecive 'disk',
> 'backup_file1', '\\tcl-fileserver3\backups\moss-weekly\weekly'
> backup database WSS_Content to back' is too long. Maximum length is 128.
> (Microsoft SQL Server, Error: 103)"
> Is that because of the location(
> '\\tcl-fileserver3\backups\moss-weekly\weekly') I am trying to do the
> backup
> to?
> Please help.....
> Thanks
>
|||HI, ,thank you so much it worked.....
But I would like to know, what is the purose of the "N"?
Also, If i want to overwrite the backup, what do I need to include in the
command?
"Uri Dimant" wrote:

> Shelly
> Run in the job's steps
> BACKUP DATABASE dbname TO DISK =
> N'\\Server\folder\dbname.BAK'
>
> "Shelley" <Shelley@.discussions.microsoft.com> wrote in message
> news:17373ED1-5AF5-48BD-9161-0D39F4207BCB@.microsoft.com...
>
>
|||Hi, thank you it worked.
However I would like to know what is the purpose of the "N"?
Also, If i want to overwrite the backup, what exactly do I need to include
in the command?
"Uri Dimant" wrote:

> Shelly
> Run in the job's step
> BACKUP DATABASE dbname TO DISK =
> N'\\Server\folder\dbname.BAK'
>
> "Shelley" <Shelley@.discussions.microsoft.com> wrote in message
> news:17373ED1-5AF5-48BD-9161-0D39F4207BCB@.microsoft.com...
>
>
|||Shelley
1) You do not have to use N.
http://support.microsoft.com/kb/239530
2) Use WITH INIT option of the BACKUP DATABASE command
"Shelley" <Shelley@.discussions.microsoft.com> wrote in message
news:6E0ED4AC-38AA-41C6-916A-E752D62185EF@.microsoft.com...[vbcol=seagreen]
> HI, ,thank you so much it worked.....
> But I would like to know, what is the purose of the "N"?
> Also, If i want to overwrite the backup, what do I need to include in the
> command?
> "Uri Dimant" wrote:
|||Hi, thanks alot..... it worked.
"Uri Dimant" wrote:

> Shelley
> 1) You do not have to use N.
> http://support.microsoft.com/kb/239530
> 2) Use WITH INIT option of the BACKUP DATABASE command
>
> "Shelley" <Shelley@.discussions.microsoft.com> wrote in message
> news:6E0ED4AC-38AA-41C6-916A-E752D62185EF@.microsoft.com...
>
>
|||N makes the string Unicode.
Mohit K. Gupta
B.Sc. CS, Minor Japanese
MCTS: SQL Server 2005
"Shelley" wrote:
[vbcol=seagreen]
> Hi, thank you it worked.
> However I would like to know what is the purpose of the "N"?
> Also, If i want to overwrite the backup, what exactly do I need to include
> in the command?
> "Uri Dimant" wrote:
|||Thank you
"Mohit K. Gupta" wrote:
[vbcol=seagreen]
> N makes the string Unicode.
> --
> Mohit K. Gupta
> B.Sc. CS, Minor Japanese
> MCTS: SQL Server 2005
>
> "Shelley" wrote:

Error when creating a backup job

Hello, I'm trying to do a backup of a database by creating a job for it....
I'm entering the command but when I do a Parse to ensure that the syntax is
correct, I'm getting the following error:
"TITLE: Parse Command Text
--
The following errors were detected in the command text.
--
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch.
(Microsoft.SqlServer.ConnectionInfo)
--
The identifier that starts with 'EXEC sp_addumpdecive 'disk',
'backup_file1', '\\tcl-fileserver3\backups\moss-weekly\weekly'
backup database WSS_Content to back' is too long. Maximum length is 128.
(Microsoft SQL Server, Error: 103)"
Is that because of the location(
'\\tcl-fileserver3\backups\moss-weekly\weekly') I am trying to do the backup
to?
Please help.....
ThanksShelly
Run in the job's step
BACKUP DATABASE dbname TO DISK = N'\\Server\folder\dbname.BAK'
"Shelley" <Shelley@.discussions.microsoft.com> wrote in message
news:17373ED1-5AF5-48BD-9161-0D39F4207BCB@.microsoft.com...
> Hello, I'm trying to do a backup of a database by creating a job for
> it....
> I'm entering the command but when I do a Parse to ensure that the syntax
> is
> correct, I'm getting the following error:
> "TITLE: Parse Command Text
> --
> The following errors were detected in the command text.
> --
> ADDITIONAL INFORMATION:
> An exception occurred while executing a Transact-SQL statement or batch.
> (Microsoft.SqlServer.ConnectionInfo)
> --
> The identifier that starts with 'EXEC sp_addumpdecive 'disk',
> 'backup_file1', '\\tcl-fileserver3\backups\moss-weekly\weekly'
> backup database WSS_Content to back' is too long. Maximum length is 128.
> (Microsoft SQL Server, Error: 103)"
> Is that because of the location(
> '\\tcl-fileserver3\backups\moss-weekly\weekly') I am trying to do the
> backup
> to?
> Please help.....
> Thanks
>|||HI, ,thank you so much it worked.....
But I would like to know, what is the purose of the "N"?
Also, If i want to overwrite the backup, what do I need to include in the
command?
"Uri Dimant" wrote:
> Shelly
> Run in the job's steps
> BACKUP DATABASE dbname TO DISK => N'\\Server\folder\dbname.BAK'
>
> "Shelley" <Shelley@.discussions.microsoft.com> wrote in message
> news:17373ED1-5AF5-48BD-9161-0D39F4207BCB@.microsoft.com...
> > Hello, I'm trying to do a backup of a database by creating a job for
> > it....
> >
> > I'm entering the command but when I do a Parse to ensure that the syntax
> > is
> > correct, I'm getting the following error:
> >
> > "TITLE: Parse Command Text
> > --
> >
> > The following errors were detected in the command text.
> >
> > --
> > ADDITIONAL INFORMATION:
> >
> > An exception occurred while executing a Transact-SQL statement or batch.
> > (Microsoft.SqlServer.ConnectionInfo)
> >
> > --
> >
> > The identifier that starts with 'EXEC sp_addumpdecive 'disk',
> > 'backup_file1', '\\tcl-fileserver3\backups\moss-weekly\weekly'
> > backup database WSS_Content to back' is too long. Maximum length is 128.
> > (Microsoft SQL Server, Error: 103)"
> >
> > Is that because of the location(
> > '\\tcl-fileserver3\backups\moss-weekly\weekly') I am trying to do the
> > backup
> > to?
> >
> > Please help.....
> >
> > Thanks
> >
>
>|||Hi, thank you it worked.
However I would like to know what is the purpose of the "N"?
Also, If i want to overwrite the backup, what exactly do I need to include
in the command?
"Uri Dimant" wrote:
> Shelly
> Run in the job's step
> BACKUP DATABASE dbname TO DISK => N'\\Server\folder\dbname.BAK'
>
> "Shelley" <Shelley@.discussions.microsoft.com> wrote in message
> news:17373ED1-5AF5-48BD-9161-0D39F4207BCB@.microsoft.com...
> > Hello, I'm trying to do a backup of a database by creating a job for
> > it....
> >
> > I'm entering the command but when I do a Parse to ensure that the syntax
> > is
> > correct, I'm getting the following error:
> >
> > "TITLE: Parse Command Text
> > --
> >
> > The following errors were detected in the command text.
> >
> > --
> > ADDITIONAL INFORMATION:
> >
> > An exception occurred while executing a Transact-SQL statement or batch.
> > (Microsoft.SqlServer.ConnectionInfo)
> >
> > --
> >
> > The identifier that starts with 'EXEC sp_addumpdecive 'disk',
> > 'backup_file1', '\\tcl-fileserver3\backups\moss-weekly\weekly'
> > backup database WSS_Content to back' is too long. Maximum length is 128.
> > (Microsoft SQL Server, Error: 103)"
> >
> > Is that because of the location(
> > '\\tcl-fileserver3\backups\moss-weekly\weekly') I am trying to do the
> > backup
> > to?
> >
> > Please help.....
> >
> > Thanks
> >
>
>|||Shelley
1) You do not have to use N.
http://support.microsoft.com/kb/239530
2) Use WITH INIT option of the BACKUP DATABASE command
"Shelley" <Shelley@.discussions.microsoft.com> wrote in message
news:6E0ED4AC-38AA-41C6-916A-E752D62185EF@.microsoft.com...
> HI, ,thank you so much it worked.....
> But I would like to know, what is the purose of the "N"?
> Also, If i want to overwrite the backup, what do I need to include in the
> command?
> "Uri Dimant" wrote:
>> Shelly
>> Run in the job's steps
>> BACKUP DATABASE dbname TO DISK =>> N'\\Server\folder\dbname.BAK'
>>
>> "Shelley" <Shelley@.discussions.microsoft.com> wrote in message
>> news:17373ED1-5AF5-48BD-9161-0D39F4207BCB@.microsoft.com...
>> > Hello, I'm trying to do a backup of a database by creating a job for
>> > it....
>> >
>> > I'm entering the command but when I do a Parse to ensure that the
>> > syntax
>> > is
>> > correct, I'm getting the following error:
>> >
>> > "TITLE: Parse Command Text
>> > --
>> >
>> > The following errors were detected in the command text.
>> >
>> > --
>> > ADDITIONAL INFORMATION:
>> >
>> > An exception occurred while executing a Transact-SQL statement or
>> > batch.
>> > (Microsoft.SqlServer.ConnectionInfo)
>> >
>> > --
>> >
>> > The identifier that starts with 'EXEC sp_addumpdecive 'disk',
>> > 'backup_file1', '\\tcl-fileserver3\backups\moss-weekly\weekly'
>> > backup database WSS_Content to back' is too long. Maximum length is
>> > 128.
>> > (Microsoft SQL Server, Error: 103)"
>> >
>> > Is that because of the location(
>> > '\\tcl-fileserver3\backups\moss-weekly\weekly') I am trying to do the
>> > backup
>> > to?
>> >
>> > Please help.....
>> >
>> > Thanks
>> >
>>|||Hi, thanks alot..... it worked.
"Uri Dimant" wrote:
> Shelley
> 1) You do not have to use N.
> http://support.microsoft.com/kb/239530
> 2) Use WITH INIT option of the BACKUP DATABASE command
>
> "Shelley" <Shelley@.discussions.microsoft.com> wrote in message
> news:6E0ED4AC-38AA-41C6-916A-E752D62185EF@.microsoft.com...
> > HI, ,thank you so much it worked.....
> > But I would like to know, what is the purose of the "N"?
> > Also, If i want to overwrite the backup, what do I need to include in the
> > command?
> >
> > "Uri Dimant" wrote:
> >
> >> Shelly
> >> Run in the job's steps
> >> BACKUP DATABASE dbname TO DISK => >> N'\\Server\folder\dbname.BAK'
> >>
> >>
> >> "Shelley" <Shelley@.discussions.microsoft.com> wrote in message
> >> news:17373ED1-5AF5-48BD-9161-0D39F4207BCB@.microsoft.com...
> >> > Hello, I'm trying to do a backup of a database by creating a job for
> >> > it....
> >> >
> >> > I'm entering the command but when I do a Parse to ensure that the
> >> > syntax
> >> > is
> >> > correct, I'm getting the following error:
> >> >
> >> > "TITLE: Parse Command Text
> >> > --
> >> >
> >> > The following errors were detected in the command text.
> >> >
> >> > --
> >> > ADDITIONAL INFORMATION:
> >> >
> >> > An exception occurred while executing a Transact-SQL statement or
> >> > batch.
> >> > (Microsoft.SqlServer.ConnectionInfo)
> >> >
> >> > --
> >> >
> >> > The identifier that starts with 'EXEC sp_addumpdecive 'disk',
> >> > 'backup_file1', '\\tcl-fileserver3\backups\moss-weekly\weekly'
> >> > backup database WSS_Content to back' is too long. Maximum length is
> >> > 128.
> >> > (Microsoft SQL Server, Error: 103)"
> >> >
> >> > Is that because of the location(
> >> > '\\tcl-fileserver3\backups\moss-weekly\weekly') I am trying to do the
> >> > backup
> >> > to?
> >> >
> >> > Please help.....
> >> >
> >> > Thanks
> >> >
> >>
> >>
> >>
>
>|||N makes the string Unicode.
--
Mohit K. Gupta
B.Sc. CS, Minor Japanese
MCTS: SQL Server 2005
"Shelley" wrote:
> Hi, thank you it worked.
> However I would like to know what is the purpose of the "N"?
> Also, If i want to overwrite the backup, what exactly do I need to include
> in the command?
> "Uri Dimant" wrote:
> > Shelly
> > Run in the job's step
> > BACKUP DATABASE dbname TO DISK => > N'\\Server\folder\dbname.BAK'
> >
> >
> > "Shelley" <Shelley@.discussions.microsoft.com> wrote in message
> > news:17373ED1-5AF5-48BD-9161-0D39F4207BCB@.microsoft.com...
> > > Hello, I'm trying to do a backup of a database by creating a job for
> > > it....
> > >
> > > I'm entering the command but when I do a Parse to ensure that the syntax
> > > is
> > > correct, I'm getting the following error:
> > >
> > > "TITLE: Parse Command Text
> > > --
> > >
> > > The following errors were detected in the command text.
> > >
> > > --
> > > ADDITIONAL INFORMATION:
> > >
> > > An exception occurred while executing a Transact-SQL statement or batch.
> > > (Microsoft.SqlServer.ConnectionInfo)
> > >
> > > --
> > >
> > > The identifier that starts with 'EXEC sp_addumpdecive 'disk',
> > > 'backup_file1', '\\tcl-fileserver3\backups\moss-weekly\weekly'
> > > backup database WSS_Content to back' is too long. Maximum length is 128.
> > > (Microsoft SQL Server, Error: 103)"
> > >
> > > Is that because of the location(
> > > '\\tcl-fileserver3\backups\moss-weekly\weekly') I am trying to do the
> > > backup
> > > to?
> > >
> > > Please help.....
> > >
> > > Thanks
> > >
> >
> >
> >|||Thank you
"Mohit K. Gupta" wrote:
> N makes the string Unicode.
> --
> Mohit K. Gupta
> B.Sc. CS, Minor Japanese
> MCTS: SQL Server 2005
>
> "Shelley" wrote:
> > Hi, thank you it worked.
> > However I would like to know what is the purpose of the "N"?
> > Also, If i want to overwrite the backup, what exactly do I need to include
> > in the command?
> >
> > "Uri Dimant" wrote:
> >
> > > Shelly
> > > Run in the job's step
> > > BACKUP DATABASE dbname TO DISK => > > N'\\Server\folder\dbname.BAK'
> > >
> > >
> > > "Shelley" <Shelley@.discussions.microsoft.com> wrote in message
> > > news:17373ED1-5AF5-48BD-9161-0D39F4207BCB@.microsoft.com...
> > > > Hello, I'm trying to do a backup of a database by creating a job for
> > > > it....
> > > >
> > > > I'm entering the command but when I do a Parse to ensure that the syntax
> > > > is
> > > > correct, I'm getting the following error:
> > > >
> > > > "TITLE: Parse Command Text
> > > > --
> > > >
> > > > The following errors were detected in the command text.
> > > >
> > > > --
> > > > ADDITIONAL INFORMATION:
> > > >
> > > > An exception occurred while executing a Transact-SQL statement or batch.
> > > > (Microsoft.SqlServer.ConnectionInfo)
> > > >
> > > > --
> > > >
> > > > The identifier that starts with 'EXEC sp_addumpdecive 'disk',
> > > > 'backup_file1', '\\tcl-fileserver3\backups\moss-weekly\weekly'
> > > > backup database WSS_Content to back' is too long. Maximum length is 128.
> > > > (Microsoft SQL Server, Error: 103)"
> > > >
> > > > Is that because of the location(
> > > > '\\tcl-fileserver3\backups\moss-weekly\weekly') I am trying to do the
> > > > backup
> > > > to?
> > > >
> > > > Please help.....
> > > >
> > > > Thanks
> > > >
> > >
> > >
> > >

Error when creating a backup job

Hello, I'm trying to do a backup of a database by creating a job for it....
I'm entering the command but when I do a Parse to ensure that the syntax is
correct, I'm getting the following error:
"TITLE: Parse Command Text
--
The following errors were detected in the command text.
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch.
(Microsoft.SqlServer.ConnectionInfo)
The identifier that starts with 'EXEC sp_addumpdecive 'disk',
'backup_file1', '\\tcl-fileserver3\backups\moss-weekly\weekly'
backup database WSS_Content to back' is too long. Maximum length is 128.
(Microsoft SQL Server, Error: 103)"
Is that because of the location(
'\\tcl-fileserver3\backups\moss-weekly\weekly') I am trying to do the backup
to?
Please help.....
ThanksShelly
Run in the job's step
BACKUP DATABASE dbname TO DISK =
N'\\Server\folder\dbname.BAK'
"Shelley" <Shelley@.discussions.microsoft.com> wrote in message
news:17373ED1-5AF5-48BD-9161-0D39F4207BCB@.microsoft.com...
> Hello, I'm trying to do a backup of a database by creating a job for
> it....
> I'm entering the command but when I do a Parse to ensure that the syntax
> is
> correct, I'm getting the following error:
> "TITLE: Parse Command Text
> --
> The following errors were detected in the command text.
> --
> ADDITIONAL INFORMATION:
> An exception occurred while executing a Transact-SQL statement or batch.
> (Microsoft.SqlServer.ConnectionInfo)
> --
> The identifier that starts with 'EXEC sp_addumpdecive 'disk',
> 'backup_file1', '\\tcl-fileserver3\backups\moss-weekly\weekly'
> backup database WSS_Content to back' is too long. Maximum length is 128.
> (Microsoft SQL Server, Error: 103)"
> Is that because of the location(
> '\\tcl-fileserver3\backups\moss-weekly\weekly') I am trying to do the
> backup
> to?
> Please help.....
> Thanks
>|||HI, ,thank you so much it worked.....
But I would like to know, what is the purose of the "N"?
Also, If i want to overwrite the backup, what do I need to include in the
command?
"Uri Dimant" wrote:

> Shelly
> Run in the job's steps
> BACKUP DATABASE dbname TO DISK =
> N'\\Server\folder\dbname.BAK'
>
> "Shelley" <Shelley@.discussions.microsoft.com> wrote in message
> news:17373ED1-5AF5-48BD-9161-0D39F4207BCB@.microsoft.com...
>
>|||Hi, thank you it worked.
However I would like to know what is the purpose of the "N"?
Also, If i want to overwrite the backup, what exactly do I need to include
in the command?
"Uri Dimant" wrote:

> Shelly
> Run in the job's step
> BACKUP DATABASE dbname TO DISK =
> N'\\Server\folder\dbname.BAK'
>
> "Shelley" <Shelley@.discussions.microsoft.com> wrote in message
> news:17373ED1-5AF5-48BD-9161-0D39F4207BCB@.microsoft.com...
>
>|||Shelley
1) You do not have to use N.
http://support.microsoft.com/kb/239530
2) Use WITH INIT option of the BACKUP DATABASE command
"Shelley" <Shelley@.discussions.microsoft.com> wrote in message
news:6E0ED4AC-38AA-41C6-916A-E752D62185EF@.microsoft.com...[vbcol=seagreen]
> HI, ,thank you so much it worked.....
> But I would like to know, what is the purose of the "N"?
> Also, If i want to overwrite the backup, what do I need to include in the
> command?
> "Uri Dimant" wrote:
>|||Hi, thanks alot..... it worked.
"Uri Dimant" wrote:

> Shelley
> 1) You do not have to use N.
> http://support.microsoft.com/kb/239530
> 2) Use WITH INIT option of the BACKUP DATABASE command
>
> "Shelley" <Shelley@.discussions.microsoft.com> wrote in message
> news:6E0ED4AC-38AA-41C6-916A-E752D62185EF@.microsoft.com...
>
>|||N makes the string Unicode.
Mohit K. Gupta
B.Sc. CS, Minor Japanese
MCTS: SQL Server 2005
"Shelley" wrote:
[vbcol=seagreen]
> Hi, thank you it worked.
> However I would like to know what is the purpose of the "N"?
> Also, If i want to overwrite the backup, what exactly do I need to include
> in the command?
> "Uri Dimant" wrote:
>|||Thank you
"Mohit K. Gupta" wrote:
[vbcol=seagreen]
> N makes the string Unicode.
> --
> Mohit K. Gupta
> B.Sc. CS, Minor Japanese
> MCTS: SQL Server 2005
>
> "Shelley" wrote:
>

Sunday, March 11, 2012

Error when attempting to upgrade MSDE to Express using command line /UPGRADE

When attemping to install SQL 2005 Express using the following command line arguments

/qb UPGRADE=SQL_Engine INSTANCENAME=MY_INSTANCE

or

/qb UPGRADE=SQL_Engine INSTANCENAME=MY_INSTANCE SECURITYMODE=SQL SAPWD=MY_PASSWORD

the following error occurs.

Your upgrade is blocked. For more information about upgrade support, see the "Version and Edition Upgrades" and "Hardware and Software Requirements" topics in SQL Server 2005 Setup Help or SQL Server 2005 Books Online.

Edition check:

Your upgrade is blocked because of edition upgrade rules. For more information about edition upgrades, see the Version and Edition Upgrades topic in SQL Server 2005 Setup Help or SQL Server 2005 Books Online.

The following version and editions have been verified.

1. .NET 2.0 installed

2. Windows XP SP2

3. MSDE 8.00.2039(SP4)

4. all MSDE databases are owned by sa

5. Instance and SQLAgent running under user that is member of Administrators

What are the possible reasons this error is occurring?

Hi gafrank,

Did you ever resolve this issue?

Mike

|||Yes. Thank you.

Error when attempting to upgrade MSDE to Express using command line /UPGRADE

When attemping to install SQL 2005 Express using the following command line arguments

/qb UPGRADE=SQL_Engine INSTANCENAME=MY_INSTANCE

or

/qb UPGRADE=SQL_Engine INSTANCENAME=MY_INSTANCE SECURITYMODE=SQL SAPWD=MY_PASSWORD

the following error occurs.

Your upgrade is blocked. For more information about upgrade support, see the "Version and Edition Upgrades" and "Hardware and Software Requirements" topics in SQL Server 2005 Setup Help or SQL Server 2005 Books Online.

Edition check:

Your upgrade is blocked because of edition upgrade rules. For more information about edition upgrades, see the Version and Edition Upgrades topic in SQL Server 2005 Setup Help or SQL Server 2005 Books Online.

The following version and editions have been verified.

1. .NET 2.0 installed

2. Windows XP SP2

3. MSDE 8.00.2039(SP4)

4. all MSDE databases are owned by sa

5. Instance and SQLAgent running under user that is member of Administrators

What are the possible reasons this error is occurring?

Hi gafrank,

Did you ever resolve this issue?

Mike

|||Yes. Thank you.

Wednesday, February 15, 2012

Error running SQL 2005 Best Practices Analyzer from command line - Object reference not set to a

I'm getting an error trying to run SQL 2005 Best Practices Analyzer from command line. Here's a sample of the command I run...

SqlBPACmd2005.EXE -u WINLOGON mydomain\\administrator P@.ssw0rd -r Limited -c -a

And here's the error I get...

Object reference not set to an instance of an object

I suspect this partially due to the fact that I left off the -sci option, and this appears to be a required parameter; however, I do not know XML and have not been able to find an example of this file anywhere. Could someone give me an example of an XML file formatted for scanning several 2005 instances?

Does my command have other problems?

Thanks!

Yes, you need to use the -sci options. The XML file can be created through the GUI. Run the GUI, choose the items you wish to scan, then choose, "Export to file". Pass this .xml filename in as the parameter to the -sci command line option.

Does this solve your problem?

Paul A. Mestemaker II
Program Manager
Microsoft SQL Server
http://blogs.msdn.com/sqlrem/

Error running rs utility

Hi
Trying to render a report using rs utlitlity however I'm getting the
following problem
The command i issue in the command prompt is:
rs.exe -i RenderReport-SalesOrderMarkup.rss -s
http://server.com/ReportServer -u Domain\
george -p thepassword -v salesid="SO000644" -t
The result;
System.Exception: Could not connect to server:
http://server.com/ReportServer/ReportService.asmx
at
Microsoft.ReportingServices.ScriptHost.ScriptHost.DetermineServerUrlSecuri
ty()
at Microsoft.ReportingServices.ScriptHost.ScriptHost.InstanceMain()
at Microsoft.ReportingServices.BaseCmdLine.CommandLineMain(String[] args,
Bas
eCmdLine instance)
Any ideas why I'm getting this error?
Thanks
GeorgeJust guessing:
1. Can you go to IE and paste: http://server.com/ReportServer and it comes
back?
2. Can you rename: RenderReport-SalesOrderMarkup.rss, to something without
the "-"
Reeves
"_george" wrote:
> Hi
> Trying to render a report using rs utlitlity however I'm getting the
> following problem
> The command i issue in the command prompt is:
> rs.exe -i RenderReport-SalesOrderMarkup.rss -s
> http://server.com/ReportServer -u Domain\
> george -p thepassword -v salesid="SO000644" -t
> The result;
> System.Exception: Could not connect to server:
> http://server.com/ReportServer/ReportService.asmx
> at
> Microsoft.ReportingServices.ScriptHost.ScriptHost.DetermineServerUrlSecuri
> ty()
> at Microsoft.ReportingServices.ScriptHost.ScriptHost.InstanceMain()
> at Microsoft.ReportingServices.BaseCmdLine.CommandLineMain(String[] args,
> Bas
> eCmdLine instance)
>
> Any ideas why I'm getting this error?
> Thanks
> George
>
>

Error running rs from command line.

I get this error every time I run the rs command line. I have used several
scripts and even some sample scripts, but still get it.
error BC30456: 'Render' is not a member of
'Microsoft.SqlServer.ReportingServices2005.ReportingService2005'.
results = rs.Render(reportPath, format, _try appending -e mgmt2000 to the end of your command. This should do
it.
- Steve
Shawn wrote:
> I get this error every time I run the rs command line. I have used several
> scripts and even some sample scripts, but still get it.
> error BC30456: 'Render' is not a member of
> 'Microsoft.SqlServer.ReportingServices2005.ReportingService2005'.
> results = rs.Render(reportPath, format, _|||That worked!!!!! Your the man. I see that is for defining the endpoint, why
did I need to do that?
"steve" <stevensherman@.comcast.net> wrote in message
news:1165891632.813381.173660@.16g2000cwy.googlegroups.com...
> try appending -e mgmt2000 to the end of your command. This should do
> it.
> - Steve
> Shawn wrote:
>> I get this error every time I run the rs command line. I have used
>> several
>> scripts and even some sample scripts, but still get it.
>> error BC30456: 'Render' is not a member of
>> 'Microsoft.SqlServer.ReportingServices2005.ReportingService2005'.
>> results = rs.Render(reportPath, format, _
>|||I am not 100% sure. I struggled with that one myself and found the
answer on a forum somewhere. What I understand is that the rs.render
class will not be supported going forward. It is backword compatible
for now, so you are specifying a sqlserver2000 endpoint. In sqlserver
2006 we will both have to find the updated way to do this - but for
now, this works.
- Steve
Shawn wrote:
> That worked!!!!! Your the man. I see that is for defining the endpoint, why
> did I need to do that?
> "steve" <stevensherman@.comcast.net> wrote in message
> news:1165891632.813381.173660@.16g2000cwy.googlegroups.com...
> > try appending -e mgmt2000 to the end of your command. This should do
> > it.
> >
> > - Steve
> >
> > Shawn wrote:
> >> I get this error every time I run the rs command line. I have used
> >> several
> >> scripts and even some sample scripts, but still get it.
> >>
> >> error BC30456: 'Render' is not a member of
> >> 'Microsoft.SqlServer.ReportingServices2005.ReportingService2005'.
> >>
> >> results = rs.Render(reportPath, format, _
> >|||You know, that was my assumption from the error message, but I could not
find the "newer" alternative method. Oh well, it works and probably will
long enough for the lifespan of this report... :)
"steve" <stevensherman@.comcast.net> wrote in message
news:1165979361.656367.325650@.f1g2000cwa.googlegroups.com...
>I am not 100% sure. I struggled with that one myself and found the
> answer on a forum somewhere. What I understand is that the rs.render
> class will not be supported going forward. It is backword compatible
> for now, so you are specifying a sqlserver2000 endpoint. In sqlserver
> 2006 we will both have to find the updated way to do this - but for
> now, this works.
> - Steve
> Shawn wrote:
>> That worked!!!!! Your the man. I see that is for defining the endpoint,
>> why
>> did I need to do that?
>> "steve" <stevensherman@.comcast.net> wrote in message
>> news:1165891632.813381.173660@.16g2000cwy.googlegroups.com...
>> > try appending -e mgmt2000 to the end of your command. This should do
>> > it.
>> >
>> > - Steve
>> >
>> > Shawn wrote:
>> >> I get this error every time I run the rs command line. I have used
>> >> several
>> >> scripts and even some sample scripts, but still get it.
>> >>
>> >> error BC30456: 'Render' is not a member of
>> >> 'Microsoft.SqlServer.ReportingServices2005.ReportingService2005'.
>> >>
>> >> results = rs.Render(reportPath, format, _
>> >
>|||My thoughts exactly!
Shawn wrote:
> You know, that was my assumption from the error message, but I could not
> find the "newer" alternative method. Oh well, it works and probably will
> long enough for the lifespan of this report... :)
> "steve" <stevensherman@.comcast.net> wrote in message
> news:1165979361.656367.325650@.f1g2000cwa.googlegroups.com...
> >I am not 100% sure. I struggled with that one myself and found the
> > answer on a forum somewhere. What I understand is that the rs.render
> > class will not be supported going forward. It is backword compatible
> > for now, so you are specifying a sqlserver2000 endpoint. In sqlserver
> > 2006 we will both have to find the updated way to do this - but for
> > now, this works.
> >
> > - Steve
> >
> > Shawn wrote:
> >> That worked!!!!! Your the man. I see that is for defining the endpoint,
> >> why
> >> did I need to do that?
> >>
> >> "steve" <stevensherman@.comcast.net> wrote in message
> >> news:1165891632.813381.173660@.16g2000cwy.googlegroups.com...
> >> > try appending -e mgmt2000 to the end of your command. This should do
> >> > it.
> >> >
> >> > - Steve
> >> >
> >> > Shawn wrote:
> >> >> I get this error every time I run the rs command line. I have used
> >> >> several
> >> >> scripts and even some sample scripts, but still get it.
> >> >>
> >> >> error BC30456: 'Render' is not a member of
> >> >> 'Microsoft.SqlServer.ReportingServices2005.ReportingService2005'.
> >> >>
> >> >> results = rs.Render(reportPath, format, _
> >> >
> >