|
|
i tried to restore database in sql server 2005 for a .bak database given, in over normal way,but i could'nt. My client say that the .bak database was created in 2000.He tols to try with enterprise mgmt. I could'ne find that option in my sqlserver 2005.
How to solve this problem.
|
|
|
|
|
There should be no problems. Have you used RESTORE DATABASE ... WITH MOVE option? That way you're able to set a new location for the data files and the log files. The problem may be that you're trying to use the directory structure that was defined in the machine where the backup was taken.
aratireddy wrote: tols to try with enterprise mgmt. I could'ne find that option in my sqlserver 2005.
Didn't understand this. Do you mean you cannot find Management Studio. If that's the case, you propably haven't installed it. If you're using Express Edition, you have to download it separately from here: http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=C243A5AE-4BD1-4E3D-94B8-5A0F62BF7796[^]
|
|
|
|
|
I did try restoring with object browser but not with query. plz give be query with options..
The client also told to first create the db by the same name and select overwrite option and then restore. But i could get the overwrite option
|
|
|
|
|
aratireddy wrote: plz give be query with options
Take a look at the doc: RESTORE[^] especially example D.
aratireddy wrote: The client also told to first create the db by the same name and select overwrite option and then restore. But i could get the overwrite option
Don't know what this means. The overwrite option is on the second page of the restore dialog (if I remember correctly). There you can also change the names and the paths of the files.
|
|
|
|
|
go to management studio .
create a database with .bak file name after creation of database rightclick on the database u will get tasks in that u will find restore option where u can restore the file
|
|
|
|
|
I'm trying to create a search stored proc with mysql.
the procedure uses roughly 7 parameters and depending upon the users choice of dropdownlists and datepickers i want to return the results.
for instance:
2 dropdowns with ID so that user can select WHERE ID > Parameter_ID
WHERE ID < Parameter_ID
has anyone attempted something similiar and if so could they point me in a good directly for some resources.
|
|
|
|
|
where (param1 is null OR param1 > someColumn)
AND (param2 is null OR param2 = someColumn
etc, its ugly but does work.
Need custom software developed? I do C# development and consulting all over the United States.
If you don't ask questions the answers won't stand in your way.
Doing a job is like selecting a mule, you can't choose just the front half xor the back half so when you ask me to do a job don't expect me to do it half-assed.
|
|
|
|
|
Ennis reply is the correct method, however be careful with this one, string too may together, and 7 is too many, and it can grind your query to a halt.
Best bet is to try and force some required filters and apply them first depending on your data size. I have even gone down the path of using a case statement to get the first valid filter, drop the results into a temp table and apply a secondary set of filters to the temp table to improve performance.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
|
Hello,
I have asp.net webpage with ReportViewer control on it. I would like to maintain log for every export that occurs. Unfortunately there is no reportexport event for the web based report viewer (for windows control there is). Is there any way to log exports? Does report services maintain some internal log itself?
Thanks.
|
|
|
|
|
However, from my experience in Crystal you can disable certain buttons, including the export button. Then provide duplicate functionality of your own button. You would then be able to track the export.
Need custom software developed? I do C# development and consulting all over the United States.
If you don't ask questions the answers won't stand in your way.
Doing a job is like selecting a mule, you can't choose just the front half xor the back half so when you ask me to do a job don't expect me to do it half-assed.
|
|
|
|
|
That's an option but I was hoping for an easier/nicer solution.
|
|
|
|
|
Giorgi Dalakishvili wrote: easier/nicer solution.
You are using Crystal rght - not gonna happen. The reason we moved from CR was that it is a closed shop, you cannot extend it in any way.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
|
Ah I missed that, I thought you were using Crystal (Ennis mentioned it)
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
i am geting value from datbase with this code CONVERT(varchar(11), TH_DT_HolidayDate) AS Expr1 and output is jan 15 2009 . but i want output like jan 15,2009 .how can i do this .thnx in advance.
|
|
|
|
|
You could try something like:
SELECT ...
datename(month, TH_DT_HolidayDate)
+ datename(day, TH_DT_HolidayDate)
+ ', '
+ datename(year, TH_DT_HolidayDate) AS Result
...
|
|
|
|
|
thnx friend its working......
|
|
|
|
|
You're welcome
|
|
|
|
|
i want to know how to generate regular expressions for sql query
|
|
|
|
|
If you mean that you want to use regular expressions in the query, you can create CLR based user defined function to handle regular expressions.
But if you mean that you want to parse SQL using regular expressions, I think it's not the right way to go (if you really want to fully parse a statement). Typically parsing is done using tools like YACC[^] and lex[^].
|
|
|
|
|
To do what? If you just want to validate a query you can run with noexec on, it just parses it then.
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
|
Hi,
Tina P wrote: SQL server 2005 express edition (120) day trial
If you installed Express Edition, it's actually not a trial and won't expire after 120 days. It's free to use.
Tina P wrote: its not showing me the database that comes with the SQL server basis install (such as Northwind and Punlishers etc)
First thing is that os the database runniong. Check your services (SQLExpress...) to make sure it's started. After that, you have to create a connection:
- open server explorer
- select Data Connections , right click and select Add connection...
- in the dialog define the server name for example in format machinename\instancename. You can check the instance name from your Windows services (the instance name is in parenthesis).
After that you should have a connection.
Then another thing is that there are no sample databases shipped along the server anymore. You can download and instal AdventureWorks (which is a newer sample database) from: http://www.codeplex.com/MSFTDBProdSamples/Release/ProjectReleases.aspx?ReleaseId=18407[^]
Hope this helps,
Mika
|
|
|
|