sql-server

SQL Server missing tables and stored procedures

I have an application on a client's site that processes data each night, last night SQL Server 2005 gave the error "Could not find stored procedure 'xxxx'". The stored procedure does exist in the database, has the right permission as far as I can tell, the application runs fine in other nights as well. In previous occasions, the SQL Ser...

What do the different RAISERROR severity levels mean?

My best google result was this: below 11 are warnings, not errors 11-16 are available for use above 16 are system errors there is no behavioral difference among 11-16 But, from BOL, "Severity levels from 0 through 18 can be specified by any user." In my particular stored procedure, I want the error returned to a .Net client applicat...

check if a non-clustered index exists on a table column

In SQL Server 2000, how do I check if a non-clustered index exists on a single column of table? ...

What is the best way to model a ragged hierarchy in SSAS for both ROLAP and MOLAP?

I'm currently trying to model a ragged hierarchy in SSAS and I'm stuck. First, I was trying to model it like so: ItemKey,Level0Key,Level1Key,Level2Key Item1,Lvl0-1,Lvl1-1,Lvl2-1 Item2,Lvl0-1,Lvl1-1,Lvl2-1 Item3,Lvl0-1,Lvl1-1,Lvl2-2 **Item4,Lvl0-1, , ** Where the last line in this example had blanks for the "missing" levels. Here, RO...

Retrieve lost data from log file?

I have an asp.net/vb file that receives data and processes it via a stored procedure. The code had the width set to 2 for the year's varchar, so it was chopped, leaving only the first two digits to get inserted into the db. Is this info possibly retrievable from a system/IIS log file or is it lost forever? thanks! ...

can we use packages in ms sql server 2008

can we use packages in ms sql server 2008...i m new to sql server ... if yes how it can be created and used.... ...

display the active member details.

I have one database which contains username, password and IsActive (data type is "bit") columns. My requirement is that I have to display the user details when the user name and password is correct and when the active column of that user is true. How can I check these 3 columns in Sql Server 2005? ...

Why Did Microsoft Create its Own SQL Extension (T-SQL)?

What are the reasons behind Microsoft implementing its own SQL extension as Transact SQL (T-SQL)? What are its advantages over the normal SQL? ...

redirection of pages

how i can redirect from my login page to home page after the login is success? I have one database in this it stores the username and password. at the time of login it wil check the user name and password by sql query. my code is shown below. protected void Button1_Click(object sender, EventArgs e) { if (TextBox1.Text == ""...

Reporting Services, how to use a connection string from a query result

A report needs to be run on multiple sites, each with its own connection string. These site names and connection strings are stored centrally. I want to make a report that Accepts the site name as a parameter Queries for the sites connection string Uses the sites connection string to get the report's data I've tried using two data ...

SQL Server 2005 Perform "RECOVERY" on database restored with "NORECOVERY"

I have full weekly backups, daily differential backups and hourly transaction log backups. To restore the database, I restore the full backup, then the last dif backup then all the transaction log backups specifying NORECOVERY on all the restores except the last one. My question is. If I accidently restore my last transaction log with ...

Store Files in SQL Server or keep them on the File Server?

Hi, Currently we have thousands of Microsoft Word files, Excel files, PDF's, images etc stored in folders/sub folders. These are generated by an application on a regular basis and can be accessed at any time within that application. As we look to upgrade we are now looking into storing all these documents within SQL Server 2005 instead....

Profiling Linked Server

I'm trying to optimize a set of stored procedures. These stored procedures are on Server A and do the following actions: Delete data on Server B based on a parameterized query on Server A DELETE FROM B (via linked server) DO SOME JOIN ON A WHERE A.x IN (@ID1, @ID2, @ID3, @ID4) Insert data on Server B based on a parameterized query on ...

SQL Server Tree Hierarchy and Nested Sets with Duplicate Record ids

Given that I have this resultset structure (superfluous fields have been stripped) Id | ParentId | Name | Depth ---------------------------- is it possible to have the records returned in tree order i.e. Parent then Children, if a Child is a Parent, then their Children, if not then Sibling, etc? For example, Id | ParentId | Name | De...

Multiple Search Option in SQL SERVER 2005

I have a requirement. Given say Test1,Test2, I have to perform a like operation. Something like select * from tblname where column_name like('Test1%','Test2%'); i.e. these strings are comma separated How do I solve this? This is in SQL SERVER 2005. Thanks in Advance ...

Need only Date from DateTime

Hi I have a variable of DateTime type in SQL. Just need to have Date part of it. please Help? ...

Fetching data

I have one database table which contains 8 columns. One of the columns is called IsAdmin (its data type is Bit). I have to show the user list in a grid view if and only if the signed-in user is an admin. How can I do this? Which clause is used for this? ...

VM Hosting Account and Buying SQL Server / License

Thinking about signing up for $100 Windows 2008 Virtual Machine Hosting Account I am going to be running a Web Server (IIS) and ASP.NET site that taps into a SQL Server what license am I supposed to buy? Never had to pay for SQL before. Always been paid for by my company. How do CALs get factored into the situation when you are running a...

Programatically check if a date-period has expired and possibly add new row to a table, daily.

I have a table, named ReportingPeriods, that I want to be populated entirely automatically. In another table, there are attributes CreationDate and ReportingPeriodLength which together will determine the the results of this row. Upon adding a row for this table, we will add a row in ReportingPeriods with the first StartDate as the crea...

What server should i use for Online Counseling Project ?

We are launching a website which will be used for online counseling of students for engineering entrance . The load will be for 15 days & no. of students accessing site will be more than 1 lakh . These students will access the list of colleges which will be close to 500 & will select 50 college each. After 3 days all selected options wi...