'gacutil' Is Not Recognized As An Internal Or External Command
Mar 28, 2008
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 9 Replies
ADVERTISEMENT
May 16, 2013
I am trying to execute a stored proc like this
Declare @cmd varchar(1000)
Declare @Path1 varchar (1000)
Declare @user_id varchar (50)
Declare @password varchar (50)
set @cmd = 'exec' + ' ' + stored_proc_name' + ', ' + @user_id +', ' + @password + ', ' + @Path1
exec master..xp_cmdshell @cmd
ERROR I am getting = 'exec' is not recognized as an internal or external command,
View 2 Replies
View Related
Apr 11, 2007
Ok,
I am a webdesigner who at the moment does not know SQL (although, I plan on remedying that) so I am developing a page with a DB designer - he is doing the DB work, I am doing the look/feel, but he asked me the following questions, of which I cannot seem to find an answer and the guys who tend our server are useless - so I am hoping someone here can help me. In general what he needs to know is:
"what is the external address (either in domain format or IP) and the equivalent internal address so that we can access the msSQL running on your server. The internal address is needed for the webpages to talk to it, while the external address is needed for development of the pages in visual studio and the database tools." Also, he later sent me an email asking that when I get this info (from someone) that it would be usefull to get a sample string/query to get access to the DB. I am running SQL 2000 and have enterprise manager. Where can I find this information? or how do I figure this out????
Thank you for all the help -- Please let me know if you need any more info.
View 5 Replies
View Related
Nov 15, 2006
Hola!I'm currently building a site that uses an external database to store all the product details, and an internal database that will act as a cache so that we don't have to keep hitting the external database to retrieve the products every time a customer requests a list.What I need to do is retrieve all these products from External and insert them into Internal if they don't exist - if they do already exist then I have to update Internal with new prices, number in stock etc.I was wondering if there was a way to insert / update these products en-mass without looping through and building a new insert / update query for every product - there could be thousands at a time!Does anyone have any ideas or could you point me in the right direction?I'm thinking that because I need to check if the products exist in a different data store than the original source, I don't have a choice but to loop through them all.Cheers,G.
View 2 Replies
View Related
Nov 14, 2005
I have downloaded and "run" these programs:
View 6 Replies
View Related
Nov 21, 2007
I have a report that was designed using SQL Reporting Services that sits on a SQL reporting server. It's nothing too exciting, it is essentially a three page application with legal jumbo on pages 2 and 3 and applicant data in fields on page 1.
We use rectangles to force page breaks to page 2 and to page 3.
When running the report on the report server, it shows and prints fine.
When running the report from the QA website internally, it shows and prints just fine.
When running the report from the production website from a machine internally, it shows and prints just fine.
When running the report from outside of the company network, the report is jacked. It obliterates large chunks of text, crams text together, and creates blank pages.
I need help in determining where I even begin with trouble shooting this!
View 1 Replies
View Related
May 9, 2008
Hello.
I have a OLE DB Data Source Component that uses an SQL command as the data access mode. On the Connection Manager "tab" of the OLE DB Source Editor I can sucessfully parse my query and produce a preview of the data.
However, when I go to the Columns tab I see no available external columns? Apart from the fact I'm using a union I can't think of any reason why I can't see any columns, it doesn't make sense.
Please Help.
Thanks
View 7 Replies
View Related
Feb 22, 2007
Hello,
I am going through some examples on how to build custom tasks, and apparently, I don't have the gacutil.exe utility. I guess it does not come with the .NET Framework 1.1 or 2.0.
How do I get this utility?
Thank you for your help!
cdun2
View 3 Replies
View Related
Jan 22, 2008
Hello experts,
I need some help please.
Yesterday I get the answer that I had to use an assembly if I would like to use a function as global. Right now I€™m very desperate because my VS didn€™t recognize my DLL.
I get the error: "Could not load file or assembly .....The system cannot find the file specified."
After red the threads I tried to use gacutil.exe to add my assembly to the cache.
This action fails with the error:€? Failure adding Assembly to cache. Attempt to install an assembly without a strong name.€?
After that I tried to build a strong name through the follow execute:
Sn €“Vr ClassLibrary.dll. This action fails too. I get the follow Error description: €śdll does not represent a strongly named assembly€?.
What made me wrong?
Is there an easier workaround?
Have someone a good Idea could help me?
Hope to hear you soon.
Best regards,
Alex
View 4 Replies
View Related
May 11, 2007
Hi,
I've read already every thread in this forum regarding this topic with no results.
SQLServer and the corresponding services are at actual update level. The reporting services worked for 4 months without this problem. Suddenly, most of the time all reports return an internal error (it is like 70-30 for internal error) not depending which render format is used.
The system logs (eventlog, iis) show no errors. The ExecutionLog of RS show rsInternalError.
Looking in the log files in RS log directory, there is following stacktrace:
w3wp!processing!1!05/11/2007-10:40:06:: a ASSERT: Assertion failed! Call stack:
Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RenderReport(IRenderingExtension renderer, DateTime executionTimeStamp, GetReportChunk getCompiledDefinitionCallback, ProcessingContext pc, RenderingContext rc, CreateReportChunk cacheDataCallback, Boolean& dataCached)
Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RenderReport(DateTime executionTimeStamp, GetReportChunk getCompiledDefinitionCallback, ProcessingContext pc, RenderingContext rc)
Microsoft.ReportingServices.Library.RSService.RenderAsLive(CatalogItemContext reportContext, ItemProperties properties, ParameterInfoCollection effectiveParameters, Guid reportId, ClientRequest session, String description, ReportSnapshot intermediateSnapshot, DataSourceInfoCollection thisReportDataSources, Boolean cachingRequested, Boolean isLinkedReport, Warning[]& warnings, ReportSnapshot& resultSnapshotData, DateTime& executionDateTime, RuntimeDataSourceInfoCollection& alldataSources, UserProfileState& usedUserProfile)
Microsoft.ReportingServices.Library.RSService.RenderAsLiveOrSnapshot(CatalogItemContext reportContext, ClientRequest session, Warning[]& warnings, ParameterInfoCollection& effectiveParameters)
Microsoft.ReportingServices.Library.RSService.RenderFirst(CatalogItemContext reportContext, ClientRequest session, Warning[]& warnings, ParameterInfoCollection& effectiveParameters, String[]& secondaryStreamNames)
Microsoft.ReportingServices.Library.RenderFirstCancelableStep.Execute()
Microsoft.ReportingServices.Diagnostics.CancelablePhaseBase.ExecuteWrapper()
Microsoft.ReportingServices.Library.RenderFirstCancelableStep.RenderFirst(RSService rs, CatalogItemContext reportContext, ClientRequest session, JobType type, Warning[]& warnings, ParameterInfoCollection& effectiveParameters, String[]& secondaryStreamNames)
Microsoft.ReportingServices.WebServer.ReportServiceHttpHandler.RenderReport(HttpResponseStreamFactory streamFactory)
Microsoft.ReportingServices.WebServer.ReportServiceHttpHandler.DoStreamedOperation(StreamedOperation operation)
Microsoft.ReportingServices.WebServer.ReportServiceHttpHandler.RenderPageContent()
Microsoft.ReportingServices.WebServer.ReportServiceHttpHandler.RenderPage()
Microsoft.ReportingServices.WebServer.ReportServiceHttpHandler.ProcessRequest(HttpContext context)
System.Web.HttpApplication+CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
System.Web.HttpApplication.ResumeSteps(Exception error)
System.Web.HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData)
System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr)
System.Web.HttpRuntime.ProcessRequestNoDemand(HttpWorkerRequest wr)
System.Web.Hosting.ISAPIRuntime.ProcessRequest(IntPtr ecb, Int32 iWRType)
I don't see any hint in stack trace, Maybe one of yours.
As it seems, after an iisreset the first rendering always works perfect. HD space is enough.
Any ideas?
View 1 Replies
View Related
Nov 4, 2004
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 3 Replies
View Related
Oct 8, 2004
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 2 Replies
View Related
Sep 3, 2007
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 1 Replies
View Related
Oct 9, 2006
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 4 Replies
View Related
Jun 18, 2008
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 20 Replies
View Related
Feb 17, 2006
'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 4 Replies
View Related
Mar 2, 2006
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 1 Replies
View Related
Feb 14, 2007
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 1 Replies
View Related
Nov 27, 2007
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 1 Replies
View Related
Apr 8, 2008
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 5 Replies
View Related
Sep 16, 2005
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 3 Replies
View Related
Jul 3, 2000
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 1 Replies
View Related
Mar 21, 2013
how to format the last part of this query which comes from Access.:
SELECT Max(TITLOC.TitleLocID) AS MaxOfTitleLocID, TITLES.TitleID, TITLES.CustLName, TITLES.CustFName, TITLES.RecDT, TITLES.TitleID
FROM (TITLES_WARNING_SENT_qry RIGHT JOIN TITLES ON TITLES_WARNING_SENT_qry.TitleID = TITLES.TitleID) INNER JOIN TITLOC ON TITLES.TitleID = TITLOC.TitleID
WHERE TITLES_WARNING_SENT_qry.TitleID Is Null
GROUP BY TITLES.CustLName, TITLES.CustFName, TITLES.RecDT, TITLES.TitleID, TITLES.TitleID
HAVING (TITLES.RecDT<Date()-31)
I am getting:
'Date' is not a recognized built-in function name.
It is probably something simple but how would I go about converting this part "HAVING (TITLES.RecDT<Date()-31)" to something SQL Server is happy with?
View 4 Replies
View Related
Nov 10, 2014
I am trying to pull a report with average down time and I getting the error message "Msg 195, Level 15, State 10, Line 4 'AVG' is not a recognized built-in function name." when I try to run the below query. How can I rephrase the AVG(DateDiff) line to calculate this for me?
SELECT
TT.PartNumber
,AVG (TT.TimeToRepair) as [Avg Time to Repair (Hours)]
,AVG(DateDiff (hour,TT.TimeDateReported,TT.DateClosed) as [Turnaround Time(Hours)])
FROM dbo.vt_TroubleTicket TT
WHERE TT.Closed = '-1'
and TT.DateClosed between '1/1/2013' and '1/1/2014'
and (TT.PartNumber = '12345')
GROUP BY TT.PartNumber
View 3 Replies
View Related
Jun 4, 2008
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 10 Replies
View Related
Mar 25, 2008
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 3 Replies
View Related
Nov 1, 2007
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 7 Replies
View Related
Jan 28, 2008
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 4 Replies
View Related
Aug 15, 2007
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 4 Replies
View Related
Jan 30, 2007
Hello All,
Can anyone tell me what is error is and how to resolve it?
Thanks.
View 4 Replies
View Related
Aug 31, 2007
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 9 Replies
View Related
Dec 24, 2007
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 4 Replies
View Related
Jan 31, 2000
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 1 Replies
View Related