Answer Questions
Paul Tew AMO Security Scripting Problem
Hi! I have a little program that creates roles for a catalog and cubes. The roles is created fine and all the read permissions on the different cubes as well. Also adding different users to the roles is no problem. Then when i look in BIDS( open analysis services database) everything looks exactly as it should. However, the different roles does not work for the users that are added through the script. But, if i manually add a user to one of the created roles, it works for that user. Anybody who knows what is going on The roles both have users and user groups in them. Full of shame and have a appointment whith the eye doctor. It was the databasepermission that was missing. Thanks! You sa ...Show All
SteffoS Too many table names in the query sql 2005 merge replication snapshot error
In SQL 2005 I’m able to create a snapshot no problem, when the snapshot runs on the next scheduled date I get the following error. ********************************************** Message: Too many table names in the query. The maximum allowable is 256. Incorrect syntax near ')'. Incorrect syntax near ')'. Incorrect syntax near ')'. Incorrect syntax near ')'. Incorrect syntax near ')'. Incorrect syntax near ')'. Incorrect syntax near ')'. Incorrect syntax near ')'. Incorrect syntax near ')'. Incorrect syntax near ')'. Incorrect syntax near ')'. Incorrect syntax near ')'. Incorrect syntax near ')'. Incorrect syntax near ')'. Incorrect syntax near ')'. Incorrect syntax near ')'. Command Text: sp_MSmakesystableviews Parameters: ...Show All
hieu.nguyen Can I convert/reference a string to a var?
hey, guys I got a strange question. :) In SQL Server, declare @Item8 as varchar(100) declare @str as varchar(100) set @str = '@Item8' Is there any way I can reference @str to @Item8 Thanks No. This is not possible. Variables are scoped to batch or module or dynamic SQL batch. ...Show All
StephenMas problem with DateTime picker
Hello. I've just created a new report and I added a prameter of type "DateTime". I didn't even used it in the query. Whan I preview the report I have the small calendar Icon. after I pick a time from the picker And press "View Report" I get the error: "the value provided for the report parameter P1 is not valid for its type" I'm using RS 2005. Any body know whats the problem Thanks in advance, Roy. Does this happen for any DateTime you pick, or only certain ones Can you type in a Date, say, "1/1/2005" and successfully render the report Does the same thing happen when you publish the report and view it in Report Manager Hi M ...Show All
mertkan65 Error with Execute sql task and full result set: " not been initialized before calling 'Fill'"
This is the first time I've tried creating an "execute sql task" with a "full result set". I've read in the documentation that I must set the resultname to 0, which is done, and that the variable must be of type object. Also done. [Execute SQL Task] Error: Executing the query "select * from blah" failed with the following error: "The SelectCommand property has not been initialized before calling 'Fill'.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly. Has anyone else had success with a full result set Thanks, -Lori Yes. I have an example d ...Show All
Anarchy Slow Quick Find Dialog performance vs. F3
I'm running SQL Management Studio SP 2 on Windows XP SP 2. I frequently use Quick Find to look for errors in large result sets by looking for the string "MSG". My result sets are frequently just the # of rows affected by SELECT INTOs, UPDATEs, DELETEs, etc. I'm not doing large SELECTs and looking at the results. What I've noticed in result sets larger than 1000 rows, is that the Quick Find box will often freeze up for several minutes when I'm looking for msg. There is no disk activity, but CPU activity will be maxxed at 100%. No other apps will be open, plus my task tray is pretty empty. My PC is a IBM Pentium 4 w/ 768 MB of RAM, and plenty of hard disk space. However, if I click over to another query window with "MSG" ...Show All
kts how to Drop an index if exists
Hi all, I come from MySQL. In sqlserverce I'm looking for an equivalent command..to "DROP INDEX IF EXISTS inventory.idxItems" or somthing similar so that I do not get an error or crash the C# app when I try to drop a nonexisting index.. also for droping a table. Use can use the INFORMATION.SCHEMA veiws, both for tables and indexes, like this: SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = ’MyUserTable’ or SELECT INDEX_NAME FROM INFORMATION_SCHEMA.INDEXES WHERE INDEX_NAME = ’MyUserIndex’ For more information (not a lot though), see http://msdn2.microsoft.com/en-us/library/ms174156.aspx ...Show All
Lance77035 Clustered SQL Server freezes & restarts itself in Enterprise Manager
Hi, In our large organisation we have SQL Server 2000 running on a 2 node cluster using Windows 2000 Advanced Server Clustering. Each node has 2GB RAM. The server has about 10 databases only one of which is significant size at about 1GB. Our website accesses this database via ASP. The website receives between 10000-40000 hits per hour. The problem is that periodically (not necessarily during high load periods at all) this single database 'freezes' (not the whole server - the other databases seem fine) and refuses all login attempts from the website. This happened again on the weekend when the database was down for about 6 hours. When we go into Enterprise Manager and click on the instance, there is initially no activity for an unusual amou ...Show All
shailu155 stored procedure addressing generic table
I want to use ONE stored procedure to update/insert about 300 tables in a database. I hoped this code would work but it gives me an error: ALTER PROCEDURE [dbo].[InsertRowsTick] @tableName varchar, @bid float, @ask float, @last float, @volume int, @dateTimed DateTime AS BEGIN SET NOCOUNT ON; INSERT INTO tableName ( bid, ask, last, volume, dateTimed) Values ( @bid, @ask, @last, @volume, @dateTimed) END When I (1) commented out @tableName parameter and (2) instead of INSERT INTO tableName wrote: INSERT INTO <realtableName> the code (C#) executed and the table was filled. How can I use a generic table name as a parameter Thanks. hi, yes, they did... and they can as the procedure is "not documented ...Show All
DMankad Conditional count
Hello, I have a report, for which I want to do a conditional count. The table is something like this: ID Date Description 1 30-09-2000 10:36:06 Desc1 2 15-03-2000 11:45:11 Desc2 3 12-07-2005 16:21:10 Desc3 4 10-09-2006 11:12:18 Desc4 (...) I want to count only the entries where the Date field has the value 2000. The expressiona that I am using is the following one: =Sum(IIF(Fields!Date.Value.ToString().Contains("2000"),1,0)) It is giving me the right value but my problem is that the value apears repeated. Something like: CountResult 2 2 2 (...) What I want to have is just one value of the conditional count. Has ...Show All
Daikoku Is there any easy way to evaluate complex date logic in expressions?
Hello all, I am new to SSIS, so I am hoping there is an easier way to do this... I need to evaluate a date in a field and determine if it is between the beginning and end of whatever the current month is... In Access, this was written as something like: IIF ( datevalue >= CDate ( Format ( Now(),"mm/01/yy" ) ) AND datevalue < CDate ( Format ( DateAdd ( "m",1,Now() ) , "mm/01/yy ) ) , value1 , value2 ) Trying to recreate this in SSIS using expressions during a derived transformation has been extremely difficult. Here is what I came up with: ( DUE_DATE >= ( DT_DATE ) ( ( DT_WSTR,2 ) MONTH ( GETDATE() ) +"/01/"+ ( DT_WSTR,2 ) YEAR ( GETDATE() ) ...Show All
Gil Strauss Data mining
Well thank you so much for the reply of my question before. But i still have some questions : 1. I've made a data mining model using DSO and VB 6.0. And i found a listing programs like this : const adinteger = 3 const adwchar = 130 My question is what does the listing program above means 2. What kind of data type for adinteger and adwchar is there are OLE DB data type 3. In analysis manager, data mining model browser, especcially in content navigator for attribut, there will be Node total value, Yes value, No value and Missing value. My question is What does missing value means and what's the function of missing value I reaaly hope that anyne could answer my question. Thank you so much. 1: The adinteger, et ...Show All
Mark Garner Wierd error while connecting to SQL 2000 in ASP.NET under VS2005
Hi, When I try to run the asp.net application (C#) it is throwing the following exception. "An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)" The problem is I don't have SQL Server 2005 installed in my system. And I am trying to connect a remote SQL 2000 server. Adding to my confusion, the same code is working fine in another system. Help please Environment: Trying to develop a simple website which contacts a ...Show All
dork Management Studio Express - error when attempting to run a query
Hi, I have installed Visual Studio 2005 on my PC, and SQL Server 2005 Express was also installed. I decided to install the Management Studio Express, and the installation completed without any error messages. I created the ASPNET account after having installed the Northwind database on my PC, and I have created a test web site (ASP.NET) that creates a SqlConnection, and retrieves some data from the Products table in the Northwind database. The query returns the results i ask for, so that means that the accound has been set up properly. My problem appears when I try to run queries using the Management Studio Express. I have managed to add the sql server, and I can browse this in the object explorer, getting a listing of all the tab ...Show All
OrpheusTheBard restoring a db in SQL Server 2005
Hello, I received a backup Sql Server file and I am trying to restore it. When trying to restore the backup using SQL Server 2000, I get the following message: "the backed-up database has on-disk structure version 611. The server supports version 539 and cannot restore or upgrade this database. RESTORE DATABASE is terminating abnormally." After doing some research online, I figured out that the backup I received must be from SQL Server 2005. Therefore, I installed SQL SErver 2005 on my laptop (so now I have both 2000 and 2005 on my laptop).. I tried to use the restore database option in SQL Server 2005 ( SQL Server Management Studio) to restore my backup, and I get the same error message (written again below) as I did ...Show All
