Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    MS SQL Server






SuperbHosting.net & Arvixe.com have generously sponsored dedicated servers and web hosting to ensure a reliable and scalable dedicated hosting solution for BigResource.com.







Sqlcmd Not Recognized


Just installed SQL Server 2005 Express along with the Management Studio.  The Management Studio, at least what I've seen so far, seems to work fine.  But when I type "sqlcmd" at the command prompt, I get "sqlcmd is not a recognized internal or external command, operable program or batch file."  What gives???


View Complete Forum Thread with Replies
Sponsored Links:

Related Messages:
BCP 'bcp' Is Not Recognized
Hi
I am a bit new to SQL Server so please help me
I am trying to run a simple task at a customer but it doesn't work.
bcp isn't recognized.

I'm running this:
exec xp_cmdshell 'bcp "SELECT top 10 * FROM pubs..authors " queryout "C:Temphej.txt" -c -S [ServerName] -T'
and it givs me this errormess.
'bcp' is not recognized as an internal or external command,

It works fine for me when I'm running it on my computer.

Can anyone please inform me what I'm missing. I haven't got a clue.
BR
Ciotti

View Replies !   View Related
'min' Is Not A Recognized Function Name
I am using MS SQL Server 2000. I am reading right off of microsofts web site under Trasact-SQL Reference, on how to use the MIN function. Yet when I try to use it, I get the error:

'min' is not a recognized function name

Here is the sql statement copied right out of Query Analyzer:

select name, count(name), min(
case when not(var6 = '') then 7 else
case when not(var5 ='') then 6 else
case when not(var4 ='') then 5 else
case when not(var3 ='') then 4 else
case when not(var2 ='') then 3 else
case when not(var1 ='') then 2 else 1 end end end end end end as cols
)
from syitabs
where dupef=0
group by name

View Replies !   View Related
Custom Url Not Recognized
i have this action.jumpto url
 

="javascript:void window.open('http://bklc-crm01:5555/cs/cases/edit.aspx?id={" & cstr(Fields!incidentid.Value) & "}','_self')"

 
 
for some reason when i use this field (incidentid.value) there is no hyperlink generated, however when i change the value to another field, the hyperlink works, what shall i be looking for, incident value is a set of number with dashes!

View Replies !   View Related
Username Not Being Recognized For Connection
I hope I have the correct forum. I have been using Web Matrix for about a year now. Last night when attempting to connect to my database, I got the Microsoft Asp.net Web Matrix error box "Server user MYUSERNAME is not a valid user in database 'goto770db'. Same thing this morning. Any help appreciated.
Thanks.

View Replies !   View Related
'INT' Is Not A Recognized CURSOR Option.
HI,
This is my req...
i have to sum up the qty n that qty should be added to qtyonhand in other table....

Declare Qty INT
Qty =SELECT SUM(Quantity) FROM InventoryLedger WHERE ITEMID=@ItemID


UPDATE IW
SET IW.QtyOnHand=IW.QtyOnHand + Qty - @TAllotedQty
FROM InventoryByWarehouse IW
where
IW.CompanyID = @CompanyID
AND IW.DivisionID = @DivisionID
AND IW.DepartmentID = @DepartmentID
AND IW.ItemID=@ItemID

Thanks...

View Replies !   View Related
'int' Is Not A Recognized CURSOR Option.
'int' is not a recognized CURSOR option.

I think this error message is related to the fact that I'm using CREATE Table in my stored procedure to handle temporary table data. What can I do to declare a variable here?

CREATE PROCEDURE spTeamPORReport
(@FacilityName nvarchar(50) = NULL,
@CustomerTeamName nvarchar(50) = NULL,
@CustomerName nvarchar(50)=NULL,
@AssemblyPartNumber nvarchar(50)=NULL,
@DateStart smalldatetime,
@DateEnd smalldatetime)
AS
SET NOCOUNT ON

DECLARE MyRecordCount int

CREATE TABLE #FiveWorstPerformance
(PartNumber nvarchar(50),
Customer nvarchar(50),
ProdDesc nvarchar(50),
TestedICT bigint,
FailedICT bigint,
FPYICT float,
TestedAOI bigint,
FailedAOI bigint,
FPYAOI float,
TestedFUNC bigint,
FailedFUNC bigint,
FPYFUNC float,
RecordID identity(1,1) int)


...

Thanks,
Tom

View Replies !   View Related
BUILTINAdministrators Not Recognized - RsUnknownUserName
Hello all,

We recently moved our Team Foundation Server from one server to another, of course the reporting services was also included in that move.

On the new server, we are not able to change Reporting Services security parameters anymore, we get this error :
User or group « BUILTINAdministrators » not recognized. (rsUnknownUserName)

The old server was an english windows 2003, the new one a french version, i guess the problem is related. The BUILTINAdministrators group name on the new server is "BUILTINAdministrateurs".

Is there a way to change security params without getting this error ? How can we remove from Reporting Services this reference to BUILDTINAdministrators ? I've tried to modify the table Users directly in ReportServer DB without any success..

Please help !
Alexandre

View Replies !   View Related
'EncryptByPassPhrase' Is Not A Recognized Function Name.
I am trying to run the following code in SQL Server 2005:

DECLARE @cleartext NVARCHAR(100)

DECLARE @encryptedstuff NVARCHAR(100)

DECLARE @decryptedstuff NVARCHAR(100)

SET @cleartext = 'XYZ'

SET @encryptedstuff = EncryptByPassPhrase('12345', @cleartext)

SELECT @encryptedstuff

SET @decryptedstuff = DecryptByPassphrase('12345', @encryptedstuff)

SELECT @decryptedstuff

 

and am recieving an error:

Msg 195, Level 15, State 10, Line 5

'EncryptByPassPhrase' is not a recognized function name.

Msg 195, Level 15, State 10, Line 7

'DecryptByPassphrase' is not a recognized function name.

 

It appears as though this EncryptByPassPhrase and DecryptByPassphrase as supported in 2005 T-SQL commands but when I execute this code in SQL Server Studio it errors out. 

Anyone know why? 

View Replies !   View Related
String Was Not Recognized As A Valid DateTime
Hi,I am getting this error: String was not recognized as a valid DateTime.I'm trying to insert data into a table from a gridview, where two of the dates can be empty strings.I have set 'allow null' in the SQL Server table for the two dates, added the culture in the web.config file, and even tried converting the values to DBNull.None of which have worked, and I am still getting the error.This is the code I am using: if (e.CommandName == "EmptyInsert")
{
if (Page.IsValid == true)
{
TextBox txtVisitDateIns = GridView2.Controls[0].Controls[0].FindControl("txtVisitDateIns") as TextBox;
TextBox txtNextVisitDateIns = GridView2.Controls[0].Controls[0].FindControl("txtNextVisitDateIns") as TextBox;
TextBox txtVisitedByIns = GridView2.Controls[0].Controls[0].FindControl("txtVisitedByIns") as TextBox;
DropDownList ddlPriorityIns = GridView2.Controls[0].Controls[0].FindControl("ddlPriorityIns") as DropDownList;
TextBox txtMailshotDateIns = GridView2.Controls[0].Controls[0].FindControl("txtMailshotDateIns") as TextBox;

if (txtNextVisitDateIns.Text == "")
txtNextVisitDateIns.Text = DBNull.Value.ToString();
if (txtMailshotDateIns.Text == "")
txtMailshotDateIns.Text = DBNull.Value.ToString();

SPVisitsBLL visits = new SPVisitsBLL();
visits.AddVisit(Convert.ToInt32(GridView1.SelectedValue.ToString()), Convert.ToDateTime(txtVisitDateIns.Text.ToString()),
Convert.ToDateTime(txtNextVisitDateIns.Text.ToString()), txtVisitedByIns.Text.ToString(),
Convert.ToInt32(ddlPriorityIns.SelectedValue.ToString()), Convert.ToDateTime(txtMailshotDateIns.Text.ToString()));
GridView2.DataBind();
}
} I haven't checked txtVisitDateIns to see if it is an empty string as this date is required.Can anyone help?Thanks 

View Replies !   View Related
'INITCOLVS' Is Not A Recognized Built-in Function Name.
I have read all of the messages related to the above problem and none have solved the issue.
We have migrated a SQL 2000 database to SQL 2005.  Detached from one and attached to the other and then based on some of the conversation I also used the SQL Server 2005's copy option and copied the database.  Detached the old one and renamed the new database which was created in the copy process to the old name.  Basically getting back to where I started.  By the way there are no triggers generated during the process (as was mentioned), nothing to delete as some of the discussion was suggesting.  
Big databse, lots of tables and stored procedures.  All screens seem to work except when we try to update some data using a stored procedure which takes the data and updates the table.  End up getting the above error during the execution.  All used to work fine with SQL Server 2000.  I have taken the SQL out of the stored procedure and executed manually and it worked but leaving the stored procedure alone and calling it with the updated data we get the INITCOLVS problem.  The database is also set to be compatible to 90 so that suggestion also has not fixed the problem.  Looking for additional suggestions and solutions.  Some one was talking about making a dummy INITCOLVS function, have not done this yet but don't particularly like this suggestion, like to know the cause and the proper solution to the problem.
Again in summary:
Migrated SQL 2000 database to 2005
Have done the copy and attach process to make sure the whole conversion to SQL Server 2005 has taken place.
Have set the compatibility of the database to 90
Updates cause the above error. 
 
 Thanks in advance.
 Don 
 

View Replies !   View Related
String Was Not Recognized As A Valid DateTime PLEASE HELP!!!!!!!!
I am passing a string to my stored procedure call where I convert it to a DateTime.  I have pasted the relevant code below.  My trouble is that prior to execution of the stored procedure an error is thrown "String was not recognized as a valid DateTime".
The error does not get thrown when I pass it a date, it only throws it when no date is provided. 
The page I am using is a form to do a search.  The search can allow a date to be entered or left out.  How do I catch an empty value in the c# for an invalid datetime and still send the variable to the stored procedure.
////////////////////////////    C# Code /////////////////////////////////// Passing the Date to a stored Procedure SqlParameter bdpDateFrom = new SqlParameter("@datefrom", SqlDbType.DateTime);bdpDateFrom.Value = Convert.ToDateTime(thisbdpDateFrom);myCommand.Parameters.Add(bdpDateFrom);
///////////////////////// Stored Procedure Code //////////////////////////////////@datefrom datetimeIF ((@datefrom IS NOT NULL) AND (@datefrom <>' '))BEGIN     SET @whereclause = @whereclause + ' AND T1.c330101invoicedate_dt  >= ''' +  convert(varchar,@datefrom) + ''''END Thank you!

View Replies !   View Related
EXEC In Triggers, &#39;inserted&#39; Not Recognized
Hi,

I'm trying to build a trigger with next sql statements & variables. Seems like the only way is with an EXEC sp_executesql, but even this trivial example gives "Invalid object name 'inserted'." (the more fully coded trigger can be found at http://slos.com/sql.txt


CREATE TRIGGER [ti_contacts] ON [Contacts]
FOR INSERT
AS
EXEC sp_executesql N'SELECT * from inserted'

I'm a bit lost; can you show me the way??

thx,
Dave

View Replies !   View Related
COUNT Verb Not Recognized In Query
I get a 'Specified cast is invalid' error message when I use the following query statement which has a COUNT verb in it.

SELECT DATAFIELD COUNT(DATAFIELD) AS 'Count' FROM EETABLE BY DATAFIELD

I only get this error when running the query in my C# program which is using SQL SERVER 2005 under VISTA. If I manually submit a query in Microsoft SQL Server Management Studio I receive no error. Also, I get no error if I run this program on an XP computer using SQL SERVER 2000. So where do I look for the source of the problem. Any help is appreciated.
Dave

View Replies !   View Related
The User Or Group Name 'MYDOMAINmyuser' Is Not Recognized
I have a problem that many reports and folders were created with my administrative account.  Due to some problems with AD my account was renamed MYDOMAINmyuser1.  Everything has seemed to work fine for several months.  Today I started getting an errors in the logs and subscriptions won't work.
 

w3wp!ui!1!3/25/2008-06:03:14:: e ERROR: System.Web.Services.Protocols.SoapException: The user or group name 'MYDOMAINmyuser' is not recognized. ---> Microsoft.ReportingServices.Diagnostics.Utilities.UnknownUserNameException: The user or group name 'MYDOMAINmyuser' is not recognized.
   --- End of inner exception stack trace ---
   at Microsoft.ReportingServices.WebServer.ReportingService2005.SetSubscriptionProperties(String SubscriptionID, ExtensionSettings ExtensionSettings, String Description, String EventType, String MatchData, ParameterValue[] Parameters)
w3wp!ui!1!3/25/2008-06:03:14:: e ERROR: HTTP status code --> 200
-------Details--------
System.Web.Services.Protocols.SoapException: System.Web.Services.Protocols.SoapException: The user or group name 'MYDOMAINmyuser' is not recognized. ---> Microsoft.ReportingServices.Diagnostics.Utilities.UnknownUserNameException: The user or group name 'MYDOMAINmyuser' is not recognized.
   --- End of inner exception stack trace ---
   at Microsoft.ReportingServices.WebServer.ReportingService2005.SetSubscriptionProperties(String SubscriptionID, ExtensionSettings ExtensionSettings, String Description, String EventType, String MatchData, ParameterValue[] Parameters)

   at Microsoft.ReportingServices.UI.ReportingWebControl.ShowErrorMessage(Exception e)

   at Microsoft.ReportingServices.UI.SubscriptionPropertiesPage.SaveButton_Click(Object sender, EventArgs args)

   at System.Web.UI.WebControls.Button.OnClick(EventArgs e)

   at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)

   at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)

   at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)

   at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)

   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
w3wp!ui!1!3/25/2008-06:03:14:: e ERROR: Exception in ShowErrorPage: System.Threading.ThreadAbortException: Thread was being aborted.
   at System.Threading.Thread.AbortInternal()
   at System.Threading.Thread.Abort(Object stateInfo)
   at System.Web.HttpResponse.End()
   at System.Web.HttpServerUtility.Transfer(String path, Boolean preserveForm)
   at Microsoft.ReportingServices.UI.ReportingPage.ShowErrorPage(String errMsg) at    at System.Threading.Thread.AbortInternal()
   at System.Threading.Thread.Abort(Object stateInfo)
   at System.Web.HttpResponse.End()
   at System.Web.HttpServerUtility.Transfer(String path, Boolean preserveForm)
   at Microsoft.ReportingServices.UI.ReportingPage.ShowErrorPage(String errMsg)
w3wp!extensionfactory!1!3/25/2008-06:03:41:: w WARN: The extension Report Server Email does not have a LocalizedNameAttribute.
w3wp!extensionfactory!1!3/25/2008-06:03:41:: w WARN: The extension Report Server FileShare does not have a LocalizedNameAttribute.


I've deleted and recreated the subscriptions and I am still get these error messages.  Any help resolving this is really appreciated.

View Replies !   View Related
OBJECT_SCHEMA_NAME Is Not A Recognized Built-in Function Name
why I am getting this error on the SQl Server 2005 but not getting it on the SQL Server Express? and how to ifx?





Code Snippet

Msg 195, Level 15, State 10, Procedure sp_check_sp, Line 14
'OBJECT_SCHEMA_NAME' is not a recognized built-in function name.


this is my code:





Code Snippet

USE shefa
SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author:        <Author,,Name>
-- Create date: <Create Date,,>
-- Description:    <Description,,>
-- =============================================
ALTER PROCEDURE [dbo].[sp_check_sp]
AS
BEGIN
    -- SET NOCOUNT ON added to prevent extra result sets from
    -- interfering with SELECT statements.
    SET NOCOUNT ON;

    SELECT DB_NAME(st.dbid) DBName
    , OBJECT_SCHEMA_NAME(st.objectid, dbid) SchemaName
    , OBJECT_NAME(st.objectid, dbid) StoredProcedure
    , MAX(cp.usecounts) Execution_count
    FROM sys.dm_exec_cached_plans cp
    CROSS APPLY sys.dm_exec_sql_text(cp.plan_handle) st
    WHERE DB_NAME(st.dbid) IS NOT NULL AND cp.objtype = 'proc'
    GROUP BY cp.plan_handle, DB_NAME(st.dbid),
    OBJECT_SCHEMA_NAME(objectid, st.dbid),
    OBJECT_NAME(objectid, st.dbid)
    ORDER BY MAX(cp.usecounts)
END

View Replies !   View Related
Dynamic SQL Variable With Spaces Not Recognized
 

declare @DatabaseName varchar(128)
set @DatabaseName = 'my new db test'
DECLARE @SQLStr varchar(500)

PRINT @DatabaseName

set @SQLStr = 'use '
+ @DatabaseName
+ ' PRINT '
+ @DatabaseName

EXEC (@SQLStr)

 
 
Error Output:
--------------------------------------------------------------------------
my new db test
Server: Msg 911, Level 16, State 1, Line 1
Could not locate entry in sysdatabases for database 'my'. No entry found with that name. Make sure that the name is entered correctly.
-----------------------------------------------------------------------

Any idea how to get the entire database name to be used with spaces in the database name.  It prints the @DatabaseName just fine, but in the dynamic sql, it truncates after the first space.
 
I already tried N'my new db test' in the set statement.  That didn't work.  I tried using NVARCHAR when declaring the variable.
 
Let me know as soon as you can.  Thanks!!

View Replies !   View Related
SQL2K5 SP2 - 'ROW_NUMBER' Is Not A Recognized Function Name
The row_number functions doesn't seem to be operable in our version of SQL Server 2005 SP2.
 
We have completely tried everything, including using the sample database, and Query posted in the 2005 SQL Server 2005 Book, which is as follows:
 

SELECT empid, qty,

ROW_NUMBER() OVER(ORDER BY qty) AS rownum

FROM dbo.Sales

ORDER BY qty;
 
 
I get the following error:
 

Msg 195, Level 15, State 10, Line 2

'ROW_NUMBER' is not a recognized function name.
 
Below you will find the versions of SQL we are using of 2005.
 
 
Microsoft SQL Server Management Studio      9.00.3042.00
Microsoft Analysis Services Client Tools      2005.090.3042.00
Microsoft Data Access Components (MDAC)      2000.085.1117.00 (xpsp_sp2_rtm.040803-2158)
Microsoft MSXML      2.6 3.0 4.0 5.0 6.0
Microsoft Internet Explorer      7.0.5730.11
Microsoft .NET Framework      2.0.50727.42
Operating System      5.1.2600
 
Please help!!  Thanks in Advance,
 
Jason

View Replies !   View Related
ROW_NUMBER() Function Is Not Recognized In Store Procedure.
Hello I am Prasad , I have written one store procedure as below. But It gives error message ROW_NUMBER() function is not recognized. what's the fault or what should i change.
CREATE PROCEDURE GetProductsOnCatalogPromotion(@DescriptionLength INT,@PageNumber INT,@ProductsPerPage INT,@HowManyProducts INT OUTPUT)AS-- declare a new TABLE variableDECLARE @Products TABLE(RowNumber INT,ProductID INT,Name VARCHAR(50),Description VARCHAR(5000),Price MONEY,Image1FileName VARCHAR(50),Image2FileName VARCHAR(50),OnDepartmentPromotion bit,OnCatalogPromotion bit)-- populate the table variable with the complete list of productsINSERT INTO @ProductsSELECT ROW_NUMBER() OVER (ORDER BY Product.ProductID),ProductID, Name,SUBSTRING(Description, 1, @DescriptionLength) + '...' AS Description, Price,Image1FileName, Image2FileName, OnDepartmentPromotion, OnCatalogPromotionFROM ProductWHERE OnCatalogPromotion = 1-- return the total number of products using an OUTPUT variableSELECT @HowManyProducts = COUNT(ProductID) FROM @Products-- extract the requested page of productsSELECT ProductID, Name, Description, Price, Image1FileName,Image2FileName, OnDepartmentPromotion, OnCatalogPromotionFROM @ProductsWHERE RowNumber > (@PageNumber - 1) * @ProductsPerPageAND RowNumber <= @PageNumber * @ProductsPerPage

View Replies !   View Related
Error:the String Was Not Recognized As A Valid DateTime.
hi all, i'm trying to insert the time/date a button was clicked on a gridview and it generates an error:the string was not recognized as a valid DateTime.There is an unknown word starting at index 0 i have changed the culture to en-US but it still doesn't work. i actually created the date/time column after some data had been entered into the table so the column allows nulls. this is my code:InsertCommand="INSERT INTO test101(Surname,Names,Registration,Login Time)VALUES (@Surname, @Names, @Registration,@Login_Time)"<Insert Parameters><asp:Parameter DefaultValue= DateTime.Now Type=DateTime Name="Login_Time" /></Insert Parameters>any suggestions?

View Replies !   View Related
SQL Error 'INITCOLVS' Is Not A Recognized Built-in Function Name.
Hello All,
Can anyone tell me what is  error is and how to resolve it?
Thanks.

View Replies !   View Related
Logging Onto Domain Nor Recognized By Member Server.
We have three servers in DomainA;

ServerA - PDC
ServerB - BDC
ServerC - member server

My NT Workstation is logged onto DomainA as UserA.

If I use Network Neighborhood and click on ServerA (the PDC) , it shows me
all the shares and doesn't ask me for any username password. Similarily if I
click on ServerB (the BDC).

However if I click on ServerC (member server) . It wants a
username/password. Why doesn't ServerC realize that I am already logged onto
the Domain (ie check with a domain controller) rather than ask me to log on
again. Also when I specify the username, I have to include the domain i.e.
"DomainAUserA". Just "UserA" won't work.

The problem is ServerC is soon to be a production SQLServer and has
integrated security. The clients log onto the domain, however, (I'm
speculating that) when they run a SQL application, SQLServer will not see an
NT login for verification. I havn't run ito this problem before as my
SQLServers have up to now also been domain controllers.

Anybody know what is happening and what the solution, if any, there is.

View Replies !   View Related
FREETEXT And CONTAINS Keywords Generate `not A Recognized Function Name`
I installed SQL server 7.0 beta 3 and I have been experimenting with the full text search capabilities. The catalogs appear to build correctly, but when I issue a query against the full text database, isql/w always returns with `contains` is not a recognized function name. I am confident of my query syntax, since I can execute an identical query against a database without full text search enabled and I get an error stating that the target database does not have full text searching enabled. Has anybody else encountered this? I am hoping that I am missing something obvious/simple.

View Replies !   View Related
Triggers Not Recognized When Running SP To Insert Set Of Records
I wrote a trigger that works fine when I insert record by record in the DB.
However, when I run a Stored Proc to insert a bunch of records at the same time, the trigger only works for the last record.

Anyone has a clue or a possible solution.
The trigger is well tested and works fine.

Best Regards,

Gabriel Cohen
gabrielc@yahoo.com

View Replies !   View Related
Connection Managers Are NOT Recognized After Migrating To Another Server
Hi,

My database admin just migrated my packages from development to user testing server.

My packages configured to read the connection manager properties from the .dtsconfig.

But I am getting "The connection "CRPRDNMSQEZ.CIReporting2" is not found"

 CRPRDNMSQEZ.CIReporting2 is being my connection manager.

I did find and replace server name in the dtsconfig but I guess it didn't work.

Any help is appreciated.

 

View Replies !   View Related
'gacutil' Is Not Recognized As An Internal Or External Command
Hi, I recently installed SQL Server SSIS Sample Component: CodePageConvert (http://www.microsoft.com/downloads/details.aspx?FamilyID=9E56417E-23D1-4FD3-8D6D-61314FAA2DE3&displaylang=en)
 
When I build this project I get this note on the output:
 
'gacutil' is not recognized as an internal or external command, operable program or batch file.
 
Would, please, help me and tell me what to do?
Thank you,
Babak

View Replies !   View Related
Loading Flat File - Row Delimiter Not Recognized
I have a text file that loads just fine with DTS 2000, but in SSIS it does not seems to recognize the row delimiter.  For example, most rows in the text file have 10 columns, but some have 8 columns. For those with 8 columns, the SSIS is adding the data from next row, not padding the columns with nulls.  Please help...

 

Thanks in advance.

View Replies !   View Related
Query Parameters Not Recognized By Report Designer
No matter how I try to enter an automatic query parameter it just isn't recognized as such.  I get missing expression errors from the SQL syntax check and no report variables are generated.  There must be something incredibly simple that I am missing....

The most recent query string I've entered is

SELECT DISTINCT WRTE_ROUTE FROM  WSMGR.WIPRTE WHERE  WRTE_RT_GRP_1 = 'RULE_BASED' AND WRTE_FACILITY = @Facility

Thanks for anyone who can help..

View Replies !   View Related
RSET And LSET Not Being Recognized By Report Server
I have this line in a textbox of a table.
=LSET(Fields!ReportDate.Value,25) + RSET(CStr(FormatNumber(Fields!UNITS_RPTDATE.Value,0,0,0,0)),20) + RSET(CStr(FormatCurrency(Fields!CASH_RPTDATE.Value,2,0,0,0)),20)

It looks great when I preview it in Visual Studio.  But when I upload the rdl to the report server the alignment is gone and it looks as if the Report Server doesn't recognize the LSET and RSET functions.  Anyone have an idea if this is a bug with the report server or is something wrong with our report server.

Todd

View Replies !   View Related
The Function Is Not Recognized By SQl Server Compact Edition
 

Unfortunatly this appers when i am trying to execute the following Query :
 

SELECT     CurrentDate AS EXPR2
FROM         [Date]
WHERE     (DAy(CurrentDate) = 2)
 
It seems it doesn't support the (Day) function...Is there any solution or work around for that ?

View Replies !   View Related
Problem Naming Linked Server. Notation Is Not Recognized.
Hi,
I'm setting up a linked server for distributing non-transactional queries. I know I could use the "openrowset" to contect to the remote server but I'm trying to do it via a linked server. I'm having problems after I created the linked server as:

sqlserver.remotedomain.net

I'm trying to connect to the remote server my site is hosted on via the linked server option as such:



SELECT * FROM (sqlserver.remotedomain.net.DatabaseName.dbo.TableName)


But I'm receiving this error:

Server: Msg 117, Level 15, State 1, Line 1
The object name 'sqlserver.remotedomain.net.databasename.dbo.' contains more than the maximum number of prefixes. The maximum is 3.

How do I specifiy a remote server name here? It seems like it's giving me a hard time with the dot notation by using the FQDN to the server. How do I get around this?

Any help would be appreciated!
Matt

View Replies !   View Related
Audit Trial Problem - Not Recognized Users Creation
Hi,

I would be thankfull for any suggestion which could help me localize the root of the following auditing problem. We are using MSSQL2000 + MSAdd-In package.

Audit methodology is based on the SQL Profiler functionality which recognize login/logout for all users and defnied list of events for sql admins (all fixed server roles). Generally process works pretty fine.
The problem appears when new user is creating by group which have security database role. This activity can't be recognized by profiler. During user creation there appears error message:
User 'public' does not have permission to run DBCC auditevent.
Granted login access to 'usaala123' - so finaly user is created successfully.
In the profiler there appears:
EventClass: Audit DBCC Event #and this is not we expect
TextData: dbcc auditevent (104, 1, 1, @loginame, null, null, @sid) #incorect
EventSubClass: 1
Success: 0
TargetLoginName: #there is not appearing created user name

The other it looks in case of dropping the user. Then event is appearing properly and it looks as following:
EventClass: Audit AddLogin Event
TextDate: empty
EventSubClass: drop
Success: 1
TargetLoginName: 'usaala123'


For comapring with the properly recognized event I provide what appears when the same activities are doing by user with sysadmin role:
No error message
Granted login access to 'usaala123'
In the profiler there appears:
EventClass: Audit AddLogin Event
TextDate: empty
EventSubClass: Add
Success: 1
TargetLoginName: 'usaala123'


The question is where and how can I add proper permission to the users with security database role to allow successfully create users and notify the same in the ausit events (and to don't have mentioned above error message:
User 'public' does not have permission to run DBCC auditevent) ?

View Replies !   View Related
Error When Training Mining Model. Column Name Seems Can't Be Recognized
 

Dear All,  I have a simple mining structure created by the DMX statement below. Then I tried to insert some data with MDX language by extracting data in OLAP. But I got the following error when I execute the insert statement.

 

Errors in the high-level relational engine. The 'Customer ID' column in the RELATES clause was not found in the results of the OPENROWSET query.


It seems that the append statement can't really recognize the name of the column which should be Customer ID.

 

How can I fix this problem?

 

Thanks

Tony Chun Tung Siu

 

The source code for create and insert is as below.

 

create mining model customerMiner
(
 customerID long key ,
 age long continuous,
 orders table
 (
  orderID long key,
  goodsID long discrete predict_only
 ) 
)using [Microsoft_decision_trees] with drillthrough;

insert into mining model customerMiner
(
 customerID,
 age,
 orders
 (
  skip,
  orderID,
  goodsID
 ) 
)
shape
{
 openQuery([Simple SSAS],
 '
  select {[Measures].[Customer ID], [Measures].[Age]} on columns,
  {[Customer].[Customer].[Customer].members} on rows
  from fi
 ')
}
append
(
 {
  openQuery([Simple SSAS],
  '
   select {[Measures].[Customer ID],[Measures].[Order ID2],[Measures].[Goods ID]} on columns,
   [Goods].[Order ID2].[Order ID2].members on rows
   from fi
  ')
 }
 relate [Customer ID] to [Customer ID]
)as orders
 

View Replies !   View Related
Activate/Initialize Report Server - Rsactivate Not Recognized
Hey guys I'm baffled. I've installed SSRS on our IIS server and referenced it to our SQL Server (remote server) but, I'm getting the Reporting Services Error:

 
The report server installation is not initialized. Check the documentation for more information. (rsReportServerNotActivated)

-2147159550
 
I've tried rsactivate from both 'Start>Run'  and from the command prompt. In both cases the command rsactivate is not a recognized command, executable program or batch file...yadda yadda yadda.
What am I doing wrong and what do I do to fix this??
Thanks,
Jim

View Replies !   View Related
SQLCMD
I cannot get SQLCMD to run. When I run it, it appears for a few seconds then dissappears. I tried running it in cmd and it says it cannot run because the default setting for SQL server does not allow remote connections. Please help.

View Replies !   View Related
SQLCMD
When connecting to SQL using the SQLCMD
Is there a way to do a select and it output in DOS mode...

Even have the message return - completed just as if you were in sql query.

View Replies !   View Related
SQLCMD
 

Hello,
 
Does anyone know how to execute a stored procedure in a SQLCMD script? Here is what I have so far and it doesn't seem to be working...
 
:r $(rootPath)"Script.sql"
GO
exec sp_Proc
GO
 
 
Also,
 
Is there a way that I can pass the $(rootpath) as a parameter in my stored proc?
 
Thanks!
 

View Replies !   View Related
SQLCMD.exe
 

I am trying to backup/restore a sql db using sqlcmd. My question is, the box that I am trying to run sqlcmd on does not have SQL server 2005 installed, can I just copy SQLCMD.exe to the box instead of Installing it?  if so, are there any other files that I need to copy as well?
 
I have another instance where I was trying to backup/restore a 2000 sql db and all I did was copy the osql.exe and resource files to the box and was able to run this command  with out installing SQL server 2000. So, did something change with SQL serve 2005?
 
Thanks for any suggestions
 

View Replies !   View Related
Need Example -- SQLCMD -y
Hi,

Please can any one let me know jhow to use -y  option with SQLCMD.

 

 

 

 

View Replies !   View Related
Custom Connection Manager; Returning Recognized OLEDB Source?
[One day I will come back here and answer questions, rather than only ask.]
 
I have a custom connection manager that returns an OleDbConnection.  The only thing "custom" about the connection manager is how it determines its connection string.  The object returned in AcquireConnection is an OleDbConnection.
 
Code:public override object AcquireConnection(object txn)
{
     UpdateConnectionString();

     OleDbConnection oleDbConnection = new OleDbConnection(this.connectionString);
     oleDbConnection.Open();

     return oleDbConnection;
}

Some of the objects within SSIS only work with an OleDbConnection, but mine is not recognized as such.  Is there any way to have my connection recognized as a valid connection? 
 
Thanks in advance.
 
-bms

View Replies !   View Related
Reporting Service Not Starting - The User Or Group Name 'VIDICOMASPNET' Is Not Recognized.
Hi, I've been trying for the past week to get SQL 2005 Server up and running.The SQL is up and running however I am unable to get the Reporting service to start.  The log file is below but the main line is:

ReportingServicesService!library!4!29/06/2006-14:33:45:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.UnknownUserNameException: The user or group name 'VIDICOMASPNET' is not recognized., ;
 Info: Microsoft.ReportingServices.Diagnostics.Utilities.UnknownUserNameException:The user or group name 'VIDICOMASPNET' is not recognized.

But the domain user ASPNET is present.  Similar posts across the internet mention about the .NET Framework not be installed correctly.  I have reinstalled it many times.

Any help is most appreciated.

Tom

Here is the full log file:
<Header>  <Product>Microsoft SQL Server Reporting Services Version 9.00.1399.00</Product>  <Locale>en-US</Locale>  <TimeZone>GMT Daylight Time</TimeZone>  <Path>C:Program FilesMicrosoft SQL ServerMSSQL.4Reporting ServicesLogFilesReportServerService__main_06_29_2006_14_33_39.log</Path>  <SystemName>CRM</SystemName>  <OSName>Microsoft Windows NT 5.0.2195 Service Pack 4</OSName>  <OSVersion>5.0.2195.262144</OSVersion></Header>ReportingServicesService!library!4!29/06/2006-14:33:41:: i INFO: Initializing ConnectionType to '1'  as specified in Configuration file.ReportingServicesService!library!4!29/06/2006-14:33:41:: i INFO: Initializing IsSchedulingService to 'True'  as specified in Configuration file.ReportingServicesService!library!4!29/06/2006-14:33:41:: i INFO: Initializing IsNotificationService to 'True'  as specified in Configuration file.ReportingServicesService!library!4!29/06/2006-14:33:41:: i INFO: Initializing IsEventService to 'True'  as specified in Configuration file.ReportingServicesService!library!4!29/06/2006-14:33:41:: i INFO: Initializing PollingInterval to '10' second(s) as specified in Configuration file.ReportingServicesService!library!4!29/06/2006-14:33:41:: i INFO: Initializing WindowsServiceUseFileShareStorage to 'False'  as specified in Configuration file.ReportingServicesService!library!4!29/06/2006-14:33:41:: i INFO: Initializing MemoryLimit to '60' percent as specified in Configuration file.ReportingServicesService!library!4!29/06/2006-14:33:41:: i INFO: Initializing RecycleTime to '720' minute(s) as specified in Configuration file.ReportingServicesService!library!4!29/06/2006-14:33:41:: i INFO: Initializing MaximumMemoryLimit to '80' percent as specified in Configuration file.ReportingServicesService!library!4!29/06/2006-14:33:41:: i INFO: Initializing MaxAppDomainUnloadTime to '30' minute(s) as specified in Configuration file.ReportingServicesService!library!4!29/06/2006-14:33:41:: i INFO: Initializing MaxQueueThreads to '0' thread(s) as specified in Configuration file.ReportingServicesService!library!4!29/06/2006-14:33:41:: i INFO: Initializing IsWebServiceEnabled to 'True'  as specified in Configuration file.ReportingServicesService!library!4!29/06/2006-14:33:41:: i INFO: Initializing MaxActiveReqForOneUser to '20' requests(s) as specified in Configuration file.ReportingServicesService!library!4!29/06/2006-14:33:41:: i INFO: Initializing MaxScheduleWait to '5' second(s) as specified in Configuration file.ReportingServicesService!library!4!29/06/2006-14:33:41:: i INFO: Initializing DatabaseQueryTimeout to '120' second(s) as specified in Configuration file.ReportingServicesService!library!4!29/06/2006-14:33:41:: i INFO: Initializing ProcessRecycleOptions to '0'  as specified in Configuration file.ReportingServicesService!library!4!29/06/2006-14:33:41:: i INFO: Initializing RunningRequestsScavengerCycle to '60' second(s) as specified in Configuration file.ReportingServicesService!library!4!29/06/2006-14:33:41:: i INFO: Initializing RunningRequestsDbCycle to '60' second(s) as specified in Configuration file.ReportingServicesService!library!4!29/06/2006-14:33:41:: i INFO: Initializing RunningRequestsAge to '30' second(s) as specified in Configuration file.ReportingServicesService!library!4!29/06/2006-14:33:41:: i INFO: Initializing CleanupCycleMinutes to '10' minute(s) as specified in Configuration file.ReportingServicesService!library!4!29/06/2006-14:33:41:: i INFO: Initializing DailyCleanupMinuteOfDay to default value of '120' minutes since midnight because it was not specified in Configuration file.ReportingServicesService!library!4!29/06/2006-14:33:41:: i INFO: Initializing WatsonFlags to '1064'  as specified in Configuration file.ReportingServicesService!library!4!29/06/2006-14:33:41:: i INFO: Initializing WatsonDumpOnExceptions to 'Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException,Microsoft.ReportingServices.Modeling.InternalModelingException'  as specified in Configuration file.ReportingServicesService!library!4!29/06/2006-14:33:41:: i INFO: Initializing WatsonDumpExcludeIfContainsExceptions to 'System.Data.SqlClient.SqlException,System.Threading.ThreadAbortException'  as specified in Configuration file.ReportingServicesService!library!4!29/06/2006-14:33:41:: i INFO: Initializing SecureConnectionLevel to '0'  as specified in Configuration file.ReportingServicesService!library!4!29/06/2006-14:33:41:: i INFO: Initializing DisplayErrorLink to 'True'  as specified in Configuration file.ReportingServicesService!library!4!29/06/2006-14:33:41:: i INFO: Initializing WebServiceUseFileShareStorage to 'False'  as specified in Configuration file.ReportingServicesService!servicecontroller!9!29/06/2006-14:33:45:: Total Physical memory: 267894784ReportingServicesService!library!4!29/06/2006-14:33:45:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.UnknownUserNameException: The user or group name 'VIDICOMASPNET' is not recognized., ; Info: Microsoft.ReportingServices.Diagnostics.Utilities.UnknownUserNameException: The user or group name 'VIDICOMASPNET' is not recognized.ReportingServicesService!servicecontroller!4!29/06/2006-14:33:47:: e ERROR: Exception caught starting RPC server: Microsoft.ReportingServices.Diagnostics.Utilities.UnknownUserNameException: The user or group name 'VIDICOMASPNET' is not recognized.   at Microsoft.ReportingServices.Library.Native.NameToSid(String name)   at Microsoft.ReportingServices.Library.ServiceAppDomainController.StartRPCServer(Boolean firstTime)

View Replies !   View Related
Sqlcmd Question
Greetings all!

i am using the follownig sqlcmd command to output some data :

sqlcmd -E -S myServermyInstance -s "," -W -d myDB -Q " set nocount on select ltrim('""' + cast(PersonId as varchar) +
'-' + cast(DatabaseId as varchar) + '""') as 'URN-DBID','""' + EmailAddress + '""' as EmailAddress from myDB.dbo.myTable where
DTS > dateadd(dd, -7, getdate()) set nocount off " > "\tfsvrCompanyDatabase DevelopmentTestReports"myRecords-20080303.txt

The output looks something like this :

URN-DBID,EmailAddress
--------,------------
"5-1","blahblah@HOTMAIL.COM"
"264541-1","blahblah@HOTMAIL.COM"
"1107457-1","blahblah@HOTMAIL.COM"
"6133752-1","blahblah@HOTMAIL.COM"

Is it possible to keep the headnigs but remove the dashed line?

Your help would be much appreciated.

View Replies !   View Related
Sqlcmd Syntax
How can I use sqlcmd to execute a simple stored procedure, I dont need to pass parameters in or out, its just for backups.

Thanks

View Replies !   View Related
Sqlcmd Question
Greetings all!

i am using the follownig sqlcmd command to output some data :


sqlcmd -E -S myServermyInstance -s "," -W -d myDB -Q " set nocount on select ltrim('""' + cast(PersonId as varchar) +
'-' + cast(DatabaseId as varchar) + '""') as 'URN-DBID','""' + EmailAddress + '""' as EmailAddress from myDB.dbo.myTable where
DTS > dateadd(dd, -7, getdate()) set nocount off " > "\mynetworkdrivemyCompanymyDatabase DevelopmentmyTestReports"myRecords-20080303.txt


The output looks something like this :

URN-DBID,EmailAddress
--------,------------
"5-1","blahblah@HOTMAIL.COM"
"264541-1","blahblah@HOTMAIL.COM"
"1107457-1","blahblah@HOTMAIL.COM"
"6133752-1","blahblah@HOTMAIL.COM"

Is it possible to keep the headnigs but remove the dashed line?
 

Your help would be much appreciated.
 

View Replies !   View Related
SQLCMD And The Use Of The :XML ON|OFF Command
 

Where do I place the XML: ON command in the sqlcmd string to get it to work. So far I have been fruitless.

 
I am trying to export out the single nVarChar(MAX) column from the table listed. It is over 8000 chars long and am

told by developers it could generate a file upwards of 50MB.

 
SO I figured the :XML sqlcmd command may do the trick.

 
If someone knows of a better way, please drop that to me also.

 
Here is the code I just attempted:


CODE===============

 
EXEC Master..xp_CmdShell 'sqlcmd  -S(local) -E -Q":XML ON SET NOCOUNT ON SELECT * FROM MyDB.dbo.MyTable" -

oC:MyFile.txt -h-1'

 
CODE===============

 
OK, a bit of history here. The column we are pulling from is set as a nVarChar(MAX).

 
The column is populated by another SP that dynamically builds an XML string. Some of the XML strings that are built

can become very large (from our dev team, they can generate a file nearing 50MB in some cases.

 
Now the XML string that was dynamically build and which is contained in the nVarChar(MAX) field looks GREAT!

 
I am able to use sqlcmd to export it to a text file and once in the file ... it looks GREAT there too.

 
I used the -y0 param (width_display) w/ sqlcmd to generate the file and overcome the default 256 character limit on

the file size:


CODE===============

 
EXEC Master..xp_CmdShell 'sqlcmd -S(local) -E -Q"SET NOCOUNT ON SELECT * FROM M360.dbo.tBackupAssociationAsXML" -

oC:BackupAssociationAsXML.txt -h-1 -y0'

 
CODE===============

 
The issue we have here is that I am reading the -y0 param is good up to a 1MB file.

 
The file size generated by what I currently have in the nVarChar(MAX) field was only 290KB.

 
Here is what I pulled from BOL:

 
  If display_width is 0, the output is truncated at 1 MB. You can use the :XML ON command to prevent truncation of 

  the output. The :XML ON command is described later in this topic.


So now I am back to needing to use the :XML command and then of course needing to know where it is place in the

sqlcmd string.

 
I am also reading in BOL that:

 
  Each command must be on a separate line. A command cannot be followed by a Transact-SQL statement or another  

command.

 
So how is this accomplished in a stored procedure using SQLCMD?

 
Thanks for all the help in advance!

View Replies !   View Related
SQLCMD Error
Dear profetionlas:
I cannot run sqlcmd in my computer but i can connect to my SQL Server2005 through SSIS
This is the error I see .
Please give me some recommandation
 

C:Documents and Settings est>sqlcmd
HResult 0x2, Level 16, State 1
Named Pipes Provider: Could not open a connection to SQL Server [2].
Sqlcmd: Error: Microsoft SQL Native Client : An error has occurred while establi
shing a connection to the server. When connecting to SQL Server 2005, this failu
re may be caused by the fact that under the default settings SQL Server does not
 allow remote connections..
Sqlcmd: Error: Microsoft SQL Native Client : Login timeout expired.
 
 
I would like also metion that
1)windows firewall is off
2)All SQL server Services are running
3)This is my default instance also I have another named instance in the server

View Replies !   View Related
Backups From SQLcmd ??
I am working with SQL Express and found myself surprised when I tried to automate a backup...  No Agent.

So I am trying to create a simple backup script to run from the command line and probably schedule through the scheduled task manager.

here is my problem.  I get the following error :

Msg 2812, Level 16, State 62, Server FIREFLYSQLEXPRESS, Line 1
Could not find stored procedure 'B'.

Here is the batch file

sqlcmd -i c: emp estDBbackup.sql -o c: emp estoutput.txt -S FIREFLYSQLEXPRESS

And here is the sql input file :

BACKUP DATABASE [DNNDEV] TO  DISK = 'C: emp estdnndev.bak' WITH NOFORMAT, NOINIT,  NAME = 'dnndev-Full Database Backup', SKIP, NOREWIND, NOUNLOAD,  STATS = 10;

If I put a USE statement in front of my backup statement - the error message changes to

Could not find stored procedure 'U'.

So it would appear to list the first character encountered.

As a sanity check I created a similar process which does a select * from a table and I do not get an error saying :Could not find stored procedure 'S'. - instead all is well and I get my output and no error

If I try the backup command in SQLCMD interactively it works.

so what the heck am I missing ?

Thank you for any help...

 

View Replies !   View Related
Sqlcmd - View
how can i change the view in sqlcmd?

such as changing the font or the window size so that a command such as sp_tables will list on one row rather than several. Also I would only like to see 10 records or so at the same time. Currently in default setting, if i run sp_tables I can really only view the last few records.

thanks!

View Replies !   View Related
The String Was Not Recognized As A Valid DateTime. There Is A Unknown Word Starting At Index 0.
Hi,

I got this error report "The string was not recognized as a valid DateTime. There is a unknown word starting at index 0." at this  line of code in BOLD.

For some reasons the datetime format in the database has the (US datetime format - 05/02/2008 06:40 instead of United Kingdom (UK date time format - 02/05/2008 06:40), as I had planned. I have tried to reformat the database and VB date format and all to no success.Could this be the root of my problems?










Code Snippet
Public Class Form1
 
Public Class Form1
 
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
       
        If con.State = ConnectionState.Open Then con.Close()
        con.Open()
        cmd = New SqlCommand("SELECT REM_NOTE, REM_DATE FROM dbo.MY_CONTACTS", con)
 

        Dim sdr As SqlDataReader = cmd.ExecuteReader
        While sdr.HasRows = True
           
                Dim newAlert As New Alert(Reminder_data_reader("REM_NOTE").ToString(), DateTime.Parse(Reminder_data_reader("REM_DATE").ToString()))
                Me.collectionOfAlerts.Add(newAlert)
 
               
            End If
        End While
        sdr.Close()
        con.Close()
 
    End Sub




End Class

View Replies !   View Related

Copyright © 2005-08 www.BigResource.com, All rights reserved