Answer Questions
infrandom How to recover from dropped tempdb?
I am testing sql server 2005 in different disaster situations happened under 2000. I was reading a lot about no update on system tables, so: sp_detach_db 'tempdb' In sql 2000 i could issue something like the following command to recover: use master sp_configure 'allow updates' , 1 reconfigure with override go insert sys.sysdatabases ( name , dbid , sid , mode , status , status2 , crdate , reserved , category , cmptlevel , filename , version ) values ( 'tempdb' , 2 , 0x01 , 0 , 8 , 1090520064 , '2007-01-27 13:03:10.873' , '1900-01-01 00:00:00.000' , 0 , '90' , 'D:\beep\mssql\temp\tempdb.mdf' , 611 ) go sp_configure 'allow updates' , 0 rec ...Show All
magikalpnoi How to construct table with unique PK
Let say I have 6 tables. I want to autogenerate the PK for each table and that is unique for each table and cant be duplicated on other tables. Let say I have table with PK of 1, so table2 to table6 wouldnt have a PK of 1. If table2 have a PK of 2, table1, table3 to table6 wouldnt have a PK of 2. Same for others. Identity will not be appropriate. Will 'uniqueidentifier' data type suffice How bout guid Or what must be my datatype Or what will I do to implement this Any links Thanks have a composite primary key key1 and key2 have key1 to have a default value of "A" for the first table, "b" for the second and "c" for the third key2 would be an identity your pk would ...Show All
MikeBzz Question On How to get the Table object to filling blank space on page???
Greetings, I have reports which use a table object with various groupings and this table object has a footer row w/ a sub report that displays dynamic address information based on the groupings. I would like to have the address information located at the bottom of each page. Based my interpretation of following solution taken from the RDL Specification {see bellow excerpt} I have moved my table object within a rectangle object which is sized the page size but the table does not grow to the rectangle size…Can anyone tell me what I am missing here RDL Specification (2003) excerpt: Q: How can I indicate that my table should grow to fill the blank space below it (rather than preserving the blank space) A: Group the tabl ...Show All
Pockey b-tree structure.....
Can someone explain me or let me know the URL where I can find more details about b-tree structure. I am more intrested in the calculation that is done in one of the articles below. ---------------------------- Artcile ---------------------- With the 900 byte key, 8 rows can fit per database page. This means there will be 12500000 pages at the leaf level, 1562500 pages at the next level up in the b-tree and so on, giving a total of 12500000 + 1562500 + 195313 + 24415 + 3052 + 382 + 48 + 6 + 1 = 14285717 pages (including 1785717 to store the upper levels of the b-tree). -------------------------------------------------------------- How is 1562500 , 195313 , 24415 etc are calculated.... from 12500000 leaf pages. Approx ...Show All
hvanwijk Network SQL servers does not list after service pack (sql2005)
Hi, I have problems listing the running network sql servers. This used to work fine, until recently after an upgrade to the new sp1 of sql2005 (for that nasty index out of range bug) I've tried SMO/DMO and old Com objects, no success. Any suggestions ...Show All
danych Need infos regarding install of SQL Express 2005 SP1
Hi, A little technical question. If I want to install SQL Express 2005 SP1, do I have to uninstall current version first Thanks in advance, Stephane The 'Advanced Services" edition is the same version of SQL 2005 Express, and it includes additional functionality, including Management Studio Express. Again, you do NOT have to uninstall before adding a service pack. (Now is that complete enough for you to indicate you have been responded and answered Hi, Really sorry to bug you but I never went through this install so far. Having known from start that install process would have asked me this question would have made things clear in my mind. Now, with that last detail, YES, ...Show All
cipcip Very simple question: cannot create table with Identity Fields using SQL sentences
Hi, I'm trying to build a several tables using sql ce 3.1 I refer to the manual on Create Table: ms-help://MS.SSCE.v31.EN/ssmprog3/html/143cad25-5c1d-4c96-bd8b-6a95dbfb1b00.htm The sample: CREATE TABLE MyCustomers (CustID int IDENTITY (100,1) PRIMARY KEY, CompanyName nvarchar (50)) just simply doesn't work displaying this error: SQL Execution Error Executed statement: CREATE TABLE MyCustomers (CustID int IDENTITY (100,1) PRIMARY KEY, CompanyName nvarchar (50)) Error Source: SQL Server Compact Edition ADO.Net Data Provider Error Message: There was an error parsing the query. [Token line number =1, Token line offset 40, Token in error=IDENTITY] I tested against a SQL Desktop, everything is OK. What's wrong with the sentence P ...Show All
Ri-Karou create mobile database from xls, csv, text or mdb
Hello, Since my experience in VS is extremely limited, i'd like to be exused if questions sound silly. My problem is that, at my device application project, i want to build a database that will retrieve data from .xls, or .csv, or .txt, or .mbd files. If i've noticed well, there is no support for OLEDB or ODBC, since by the time that i add tableadapter to my database.xsd and use these, after insertion i get multiple errors informing that system.data.oledb. .... or .odbc "type is not defined". If it cannot be done, and since i still try to figure out how smart devices function, transact with databases, e.c.t. is there any suggestion Thank you in advance Kostas you'll likely&nb ...Show All
Preeteesh Urgent help please
Hi, I've created a real disaster by loosing my only copy of a development database I've been working on for 6 months. I have a .bak file that was taken the day my PC died but it will not restore, the error is 'The media set has 2 media families but only 1 are provided'. I know I only backed up to a single backup and in View Contents I can see the mdf and ldf. Is there any way of circumventing this error and forcing it to use the family that is provided. Regards Kev Hi Kev, If you execute a RESTORE HEADERONLY against the backup file, how many backup file sets are included in the backup If more then 1 file is included in the backup (which can be from the same DB), you'll need to include the ...Show All
martona Issue with SQL Parameter when used with % character.
Hi all, is there a known issue when using a SQL Paramater in a SQL string that uses a '%' character for wildcard string searches For example, if I used the following... SQLCeParameter pKeyword = new SQLCeParameter("@Keyword", SQLDbType.Char); pKeyword.value = "Some Text"; string strSQL = "SELECT * FROM tbl_Keywords WHERE (Keyword = @Keyword%)"; This just never returns and results. But if I run the query in a query analyser window replacing the @Keyword% with "Some Text", I get results. I guessing that the placing of the character '%' in the string is the cause maybe... so have you tried my suggestion earlier if you copy and paste your query into query analyzer or SQL management consol ...Show All
Trevbang Microsoft Participation in this forum
The VSTS team have posted a really useful manifesto for their participation in MSDN forums which I have read here: https://forums.microsoft.com/MSDN/ShowPost.aspx PostID=885414&SiteID=1 I'd like to politely suggest that the SSIS team do something similar on here. People have different expectations of what involvement Microsoft do/should have on this forum and it would help if Microsoft could clarify their position on this. -Jamie Great post, Bob! I'm relatively new to the forum myself, but have noticed that there is a good community of helpful folks who seem to be dedicated to helping out their peers. (You've been posting a bunch too. ) SSIS is a great product, and hopefully the lot of us working together will ...Show All
ALFKI XML sample gets error: "CREATE ENDPOINT" not supported
I installed the latest version of SQLX and tried to run the XML sample. C:\Program Files\Microsoft SQL Server\90\Samples\Engine\xml\XmlManuInstructions\ReadMe_OnlineManuInstr.htm The first part of the install.sql ran ok, but it chokes on the CREATE ENDPOINT line: is this really a limitation on the Express edition or did I miss something on installation or configuration Msg 7878, Level 16, State 1, Line 3 This "CREATE ENDPOINT" statement is not supported on this edition of SQL Server. Andrea is correct, SQL Express does not support HTTP Endpoints, and that is what this sample is trying to create. Mike hi, I did not investigate the provided sample in detail, but AFAIK, S ...Show All
Mahesha Leaf level calculations
Need to calculate datediff([base measure date], [user selected Time dimension level's end date]) for each leaf-level member. e.g. datediff([base measure], [selected Year's end date]) Year End Date is an attribute of the Time dimension Cannot have this multiplication in the dsv named query since user's selection is not known then. Member expressions can only have the form measure1*measure2 or measure1/measure2 In the calculations script scope(base measure) scope(leaves()) scope(base measure) this = datediff("d", base measure, CurrentTimeMember.Properties("end date")) end scope..... does not work since CurrentTimeMember in this context becomes Date, whereas selected Year is required and its end date for t ...Show All
enric vives Administrator cannot see administration toolbar, buttons and shortcuts on Report Manager
Hy everybody. I have recently installed from scratch RS 2003 on a WIN2003 SRV and got that the problem that the administrator cannot access or even see the regular administration toolbar and links at the Report Manager, such as Site Configuration, Upload New File, the common 'Contents | Properties ' tab, among other stuff. The only options available are 'Home', 'My Subscriptions' and 'Help', in the right superior link bar. I find this behaviour very strange, since the RS comes right out of the box configured with full access to administrator, but right now I CAN'T do any administration task on the RS Server. Another strange behaviours I've found: - The few links that appear redirect to the internal ip address of the server. - When you ca ...Show All
RobertFogt Can I use keyword Like with a Parameter
Should be simple. I'm writing a report to find employees by last name. I want the user to key in at least a few characters of the last name and the report will search for all last names that are like that. I know in TSQL it would go: Last_name like 'Jones%' But how do I set up a parameter in Reporting Services I've tried: last_name like =@name% Any ideas Thanks, Jim You would probably need to use dynamic sql and expression. ="Select * from table1 where last_name like '" + @name + "%'" Or use a stored procedure and perform the like statement within it. cheers, Andrew Any ideas Can the Keyword "Like" be used to find similar occurences of a user entered param ...Show All
