Mutiple Backup Is Good Choice?
Feb 9, 2008
Hi,
I am using a stored procedure to take backup of my database from the Visual Basic Programming.
Before i posted one of my thread with the same thing, so i was recommended to go through with DMOSQL do deal with SQL server with Visual Basic Programming. For me, this takes some time to understand the complete concept.
Because of urgent i am using stored procedure to take backup with the following:
---------------------------------------------------------------------------------------
ALTER PROCEDURE dbo.BackUPBLMSDB
(
@RP nvarchar(200)
)
AS
declare @backupfilename nvarchar(200)
set @backupfilename=@RP
BACKUP DATABASE [BLMSDB] TO DISK = @backupfilename WITH NOFORMAT, NOINIT, NAME = N'BLMSDB-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10
---------------------------------------------------------------------------------------
Example @RP="D:ackupBackup-1 09-02-2008 11-24"
Every time i am passing a parameter with somename and dateandtime(System).
Example
Backup-1 09-02-2008 11-24 2900KB
Backup-1 09-02-2008 12-30 2900KB
Backup-1 09-02-2008 18-10 5400KB
Backup-1 09-02-2008 22-00 2900KB
Backup-1 09-02-2008 22-00 2900KB
I would like to clear my doubt, is it a good practice to take backup with different names. The above one i store four backups . If the system crashes and i created the new database with the same schema without any data present in the tables, can i restore previous backup database to the newly created database.
Moreover, The first two backups contains "2900KB", the third one is "5400KB" after the data is being modified. Look at the fourth one it is "2900KB". Why the size is being reduced to "2900KB" after taking backup eventhough i didn't delete or added data into the database.
Hope you will solve my problem.
Thanks.
Best Regards,
Kashif Chotu
View 5 Replies
ADVERTISEMENT
Jul 20, 2005
Hi - I have a rather unreliable host just now - but they offer .net, sqlserver and SSL for a reasonable price.Problem is, the domain is hosted on a shared server - and it keeps goingdown apparantly because of code which is less than clean, on somepeoples sites. (ie. not closing connections etc).I am considering moving to a decicated server - but at this point intime, cannot afford a full SQL Server licence for it - however, thededicated server does offer MSDE. Is it acceptable to go back to usingthis from SQL Server - for a currently low hit site - ie. around 500hits per day.Does MSDE offer stored procedures (I don't use views or triggers)? CanI just take a DTC backup/export of my current SQL Server database, andrestore it to the MSDE one?What would be the cut-off point for using MSDE?Thanks for any info - also, if anyone knows why UK companies charge somuch more dor dedicated servers, than US companies - I'd be interested.Thanks, Mark*** Sent via Developersdex http://www.developersdex.com ***Don't just participate in USENET...get rewarded for it!
View 2 Replies
View Related
Apr 15, 2008
Hi,
I created a application in VB and backend database for this is SQL Server 2005. So far I was working on "SQL Express", as a testing one. I have almost 20 Tables and also lot of stored procedure. From the programming point of view, the database is not that much of large. The size grows only when the pictures are added to the database. Its not a client/server application(only desktop application).
If i install Enterprise Edition, will it Consumes large space and memory into the client machine. What about performance issue.
Right now i have two editions SQL Express and SQL Enterprise Edition.
Which edition you would like to suggest on the basis of information provided as above.
Thanks.
Best Regards
Kashif Chotu
View 6 Replies
View Related
Sep 5, 2007
Hello All
Firstly thanks a lot Phil and Jamie on such a helpful article on "Checking to see if a record exists and if so update else insert"
Here is my question
I have about 10 tables and there respective working tables
For examples: A, B, C, D, E.... and WorkA, WorkB, WorkC....
Notes:
1) When I execute a package these work table (Work A, WorkB ...) get populated with certain rows say about 5
2) Its not that all the work table are populated on every execution.
3) Tables A, B, C... have thousands of records in it.
4) Work table is of same structure as there parent table..Like WorkA same structure as A.....
5) The table A and WorkA and as on... are linked with a KeyID
Now I want to build a SSIS package that can
1) Get the the data from these multiple tables(WorkA, WorkB...)
2) Process each row of these tables WorkA, WorkB..
3) Depending upon the KEYID of WorkA., WorkB.. etc Update a Flag colunm of table A, B...where the KeyID is equal to KeyID of Work Table
4) After updating insert that processed row of Work A, WorkB ...into Table A, B..
I can do this if I have one source table and one destination table. Here i have some say 10 randomly source tables to respective random destination .
All I could think of creating 10 different packages as adviced in Jamie's article. But I am sure there might some other alternative.
Can somebody advice me the best practice of doing this. Thanks a lot in advance
View 5 Replies
View Related
Mar 9, 2005
Currently, I have set up maintenance plan to backup all the databases and I am only the most recent copies. This works very good for me on most of the databases. However, I am having a potential problem with backing up master database.
Based on what I know, I cannot perform a restore on master database. So I am wondering if anyone is able to advise me on a good method to backup the master database and restore it when it needs to be.
Thank you.
View 1 Replies
View Related
Jul 23, 2005
First posting to the group. I have received a lot of valuable info from youguys. Now, an OT question:What's a good tape drive to perform unmanned weekly backups for a WindowsXP Pro box running SQL server 2000?--Joel Farris | AIM: FarrisJoel** Their Web. Your Way. http://getfirefox.com **
View 1 Replies
View Related
Mar 12, 2008
Hi.
What I want to know is what the issues/scenarios are of only using copies of mdf/ldf files as backups.
TIA.
View 3 Replies
View Related
Jul 5, 2000
In Sql6.5 we use binary sort order for a best performance (I think). I hear that it should be highlighted that the case for binary sort order being the fastest method of sorting and searching a database no longer applies at SQL 7.0
Is it right and why ????
View 1 Replies
View Related
Jul 20, 2005
I'm very puzzled by the choice of NC index being made by the optimizerin this example. I don't actually think it should use an NC index atall.I have:Table: CustomerStatus_TSingle data page19 recordsClustered Index on CustomerStatusID:CREATE TABLE [CustomerStatus_T] ([CustomerStatusID] [int] NOT NULL ,[Name] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,[Description] [varchar] (200) COLLATE SQL_Latin1_General_CP1_CI_ASNULL ,[Code] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,[CodeAlt] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,[Ordinal] [int] NULL ,[Default] [int] NULL ,[Display] [bit] NOT NULL ,[StatusType] [varchar] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,[DateCreated] [smalldatetime] NULL ,[DateUpdated] [smalldatetime] NULL ,[DateArchived] [smalldatetime] NULL ,CONSTRAINT [PK_ROMS_CustomerStatus] PRIMARY KEY CLUSTERED([CustomerStatusID]) ON [PRIMARY]) ON [PRIMARY]If I run the following query, it does exactly what I expect and scansthe clustered index:SELECT customerStatusID, [Name] FROM CustomerStatus_TWHERE dateArchived IS NULLAND Display = 1AND StatusType = 'Q‘and gives the following QEP and IO statistics:|--Clustered Index Scan(OBJECT:([Reach_Roms].[dbo].[CustomerStatus_T].[PK_ROMS_CustomerStatus]),WHERE:(([CustomerStatus_T].[DateArchived]=NULL AND[CustomerStatus_T].[StatusType]='Q') ANDConvert([CustomerStatus_T].[Display])=1))Table 'CustomerStatus_T'. Scan count 1, logical reads 2, physicalreads 0,read-ahead reads 0.If I now put a NC index on the statustype column:create index ix_nci_statustype on customerstatus_t(statustype)the query plan changes to:SELECT customerStatusID, [Name] FROM CustomerStatus_TWHERE dateArchived IS NULLAND Display = 1AND StatusType = 'Q‘|--Filter(WHERE:([CustomerStatus_T].[DateArchived]=NULL ANDConvert([CustomerStatus_T].[Display])=1))|--Bookmark Lookup(BOOKMARK:([Bmk1000]),OBJECT:([Reach_Roms].[dbo].[CustomerStatus_T]))|--IndexSeek(OBJECT:([Reach_Roms].[dbo].[CustomerStatus_T].[ix_nci_statustype]),S EEK:([CustomerStatus_T].[StatusType]='Q') ORDEREDFORWARD)Table 'CustomerStatus_T'. Scan count 1, logical reads 7,physical reads 0, read-ahead reads 0.For some bizarre reason, the optimizer thinks that a NC index lookupon a single-page table, which ultimately costs 7 IOs, is cheaper thana table (or Clustered Index) scan of a single page. Why? Theshowplan cost also shows that it expects the NC index to be cheaper(which is presumably why it goes and uses it), but even after runningUPDATE STATISTICS on the table it still chooses the same idiotic queryplan.Any thoughts, or has anyone seen similar behaviour before, and cananyone please explain it to me?p.s. I don't actually WANT to put a NC index on this table, but Inoticed the behaviour by accident which is why I'm asking the question:-)
View 3 Replies
View Related
Nov 8, 2007
clustering sounds expensive and arcane. Is it ever a better choice than mirroring for high availability? Perhaps when the size of the db copy is too prohibitive under the mirroring option?
View 1 Replies
View Related
Jun 1, 2007
If There are very lots of data to retrieve to show in any inquiry forms.each inquiry forms need to use a lot of table. There are two methods I thought First, Prepare data to Temp table when arise any transaction and Program then retrieves data from temp table. Second, Create view for retrieving data Which method is the better choice ? How ? (More fast, More performance or More flexible ? ) Please advise me....
View 1 Replies
View Related
Nov 16, 2006
Is VB.net the most logical choice of a RAD tool to use with MS SQL Server? Is VB.net strictly for web apps or can you use it to create projects that run as executables off the server?
JustStartinOut
View 12 Replies
View Related
Apr 13, 2008
i have three tables company as co, Procurement as po,contracts as cr
Co_id as primary for co
co_id forign for po
co_id forign for cr
i want the query to get me only one record for every co_id if it has a company in certain PO or CR ( i used max fnctn to get me only one record)
result:
CO_ID,PODOCNO,CRDOCNO
----- ------- -------
1 350 400
2 355 1064
3 NULL 500
4 600 NULL
I used the left outer join in this manner
SELECT CO.CO_ID, MAX(PR.DOCNO) AS pO_DOCNO ,MAX(CR.DOCNO) AS CR_DOCNO
FROM COMPANY CO lEFT OUTER JOIN PROCUREMENT PR ON OG.CO_ID=PR.CO_ID lEFT OUTER JOIN CONTRACT CR ON CO.CO_ID=CR.CO_ID
GROUP BY OG.CO_ID
the result is ok but the problem its taking infinte time if i add more tables to the outer join, i have more tables and each with huge number of records
any better way to do this ?? its true performance is a big deaaaal
View 8 Replies
View Related
Mar 14, 2008
How do I get a particular user to be a choice under the db_owner role for a particular database?
The user is listed under logins and even shows to be the db_owner for the database under the database access tab of the login properties. This is SQL 2000.
Thanks,
David P.
View 1 Replies
View Related
Oct 31, 2006
We have a small accounting application which is currently based using DBASE database. We need to change the DB and considering SQL Express. However, is some one can clarify following, it would be very helpful:
1) Application is used mostly by standalone non-technical users. There are cases where more than one user will need to connect to DB.
2) We need to ensure that user can not modify database outside of our application. This is needed to ensure database does not get currpted or passwords lost and then no one can open the database.
3) Installation needs to be simple without providing any options to users except where to install database or point to already installed DB in case its a network environment where 2-3 users can be working on the same database.
4) Application is usually installed on normal desktop machines. So, DB should not load the PC heavily.
Please advice if SQL Express is the right direction even with these constraints? What are the other alternatives? We are open to have a small consulting project as well with someone who can guide us through these issues. Email to contact is rkabra101@yahoo.com
rick
View 1 Replies
View Related
Sep 6, 2007
We have several applications that work with product catalog data. Data is entered and maintained, searched, and reported on. We're using CSLA business objects to create our Biz Objects and our front end apps are ASP.NET pages and web services. SQL 2k5 is our database. Currently all data is done in Factory methods in our business objects using SQL Stored Procedures and UDF's.
We want to start storing auditing and statistics data on our product searches. In SQL 2k we were using SQL Profiler to capture data and storing the information in tables, but it really wasn't very flexible and was difficult to maintain. What we want to do is every time someone submits a search we store the critiera and the results. Every time someone edits a product we want to save the old record. This will allow us to provide historical reporting and statistical reporting to our users.
In our old system the search results table was at about 3 million records. And since we've moved to a web based application we're hoping to save this information asynchronously so our search results or postbacks are not held up by saving this audit data. We were talking about writing logic into our biz objects code but it all seemed a bit slow and difficult to do asynchronously. Then I read a couple posts suggesting Service Broker.
Now we're considering either writing triggers on our tables or adding code to our factory stored procedures to send messages to Service Broker that would save the data into our audit tables but not hold up our business processes. We would be saving to the same database on the same server, but different tables.
Does Service Broker seem like it could be the right tool for this job? There looks like a bit of a learning curve and before I jump in i'm looking for some advice or direction.
Thanks, larry
View 1 Replies
View Related
Dec 13, 2006
Hi all,
I'm a beginner to Report Services, and have tons of questions.
Here's the first one:
if the reports are created based on the condition that the user selects, how can I create the reports with Report Services?
For example,
the user can select the fields that will be shown on the reports, as well as the group fields, the sort fields and restrict fields. So I would not be able to pre-create all possible reports and deploy them to the report server, and I think I should create the reports dynamicly based on what the user select.
Could someone tell me how to do it (create and deploy the reports)?
Thanks a million!
Jonee
View 1 Replies
View Related
Sep 21, 2006
Hi Folks,
I would like to write my table to a delimited file but I seem to have no choice but to use comma as the delimiter. Is there any way I can choose the delimiter ?
Thanks.
Sid
View 3 Replies
View Related
Jan 3, 2006
Hi there,
I have been at this problem for a few hours now using Net 2.0, and can't seem to find an answer.
I am using a asp:calendar that allows the user to pick multiple dates.
When the user is finished and hits the command button, I would like for those dates to be inserted into a table in my SQL DB called Dates.
The mutildate calendar works fine--, and I have placed all of the sates into an Array. And now have a loop for the array to print them out.
What I want to do, instead of printing, is insert them.
C anyone post some 2.0 code behind for insertion? I have found other "batch insert" code, but when I place in the VB, I get errors telling me it is no longer supported.
For example:
Dim sqlCon As New SqlConnection (no longer works in 2.0) since it doesn't recognize Sqlconnection.
Should I use a SqlDataSource? And if so, how do I prepare the Insert command for it?
Any and all help appreciated!
View 6 Replies
View Related
Feb 22, 2008
Hi Friends,
Is it Possible to combine two different dataset in a single rdl file ?
for example:
emp dept
eno enmae deptno deptno depatname
--------------------------- ----------------------------
1 x 10 10 computer
2 y 20 20 Testing
In RDL File out put will be
Eno Ename Deptname
------------------------------------
1 x computer
2 y Testing
PS : I am not used the join condition.
Thanks & Regards,
G.V.Senthilkumar
+91 9894017253.
View 6 Replies
View Related
Apr 28, 2008
I have a report that includes two multi-valued parameters.
In the Default Values section, I choose 'from query' and select dataset and value field.
In the Available Values section, I choose 'from query' select the same dataset and value field, and in the label field I select the relevant label field.
When I run the report my multi-valued parameters look like I selected the option 'select all' (all options are selected).
How can I keep the multi-valued parameters cleared from selections until the user select his choice? Thanks in advance.
View 5 Replies
View Related
Feb 9, 2007
Hi,
I have two tables one called students and location.
I want to delete the location and all records in student corrosponding to that location, can any help or point me in the right direction.
Many Thanks
View 2 Replies
View Related
May 21, 2007
I understand SQL Express has a database size limit of 4G, but I read some forum correspondence here saying the 4G is a per database limitation, and within the Express instance, it can have multiple database of 4G in size.
I create multiple database and got an error saying size limit reached for the primary filegroup. Does that mean the 4G limits apply to the total database size ?
KL
View 1 Replies
View Related
Sep 21, 2007
I have a table like this.
Depositors Table
Value(int) StartDate(Date) AccountID(int)
I want to create a report from this table. the report should look like this.
Value No of Accounts Average Value
For Yesterday
For Last 7days
For Last 30 days
Please Can anyone write a simple query for this?
Thanks
View 3 Replies
View Related
Jul 7, 2015
In one of my datasets, my field "Team" is a SharePoint choice column that is a checkbox, so multiple entries are in it. In my Parameter, I have it as a multiple-value, and I'm specifying the values directly in both available and default.For my filter, I have [Team] IN [@Team], which is where the problem comes in. It will only filter the results of entries that only have ONE listed in Team.Â
For example:Â One entry has "Building" in Team column which SSRS is displaying. But it will NOT display entries where "Building" and "Clerks" are displayed. I believe this is because SSRS sees this as 1 line of text, so it does not just see"Building" but "Building" and "Clerks" so it will omit it.I've tried to have my parameter set to "Get values from a query" but the problem there is the drop-down is too confusing since it interprets it as "Building" and then "Building, Clerks", and then "Building, Clerks, Economic Development' as another drop down, which defeats the purpose of the filter.
how I can get SSRS to show ALL entries that contain "Building" when I choose "Building" as a drop-down choice in my parameter? Instead of only showing ones that is Building only and dismissing other teams?
View 3 Replies
View Related
Dec 27, 2004
Hi All,
I'm relatively new to ASP.NET coming from ASP. I've created a new, relatively simple ASP.NET application using WebMatrix with various controls and pages accessing an SQL Server database.
3 people are trying to use this app. After a short amount of time, the server starts kicking back an error message that it can not open a connection. I go in with Enterprise Manager to the SQL Server and I can see a long list of processes there almost as if each page is opening a connection and not closing. I'm explicitly closing all connections in my code where I open them for use by a data reader. What about data grid controls. Do they leave connections open? How about the drag and drop insert/update/delete functions. Unless I'm mistaken, this should close the connection when the function completes, shouldn't it:
Try
rowsAffected = dbCommand.ExecuteNonQuery
Finally
dbConnection.Close
End Try
I originally did this app connecting to an Access database but had the same problem. I figured it was due to the known connection issues with Access via ADO so I upsized to SQL Server and over time, get this same problem.
Any help would be appreciated!
Thanks,
Larry
View 2 Replies
View Related
Aug 23, 2007
Not sure if the title describes my situation or not.
Simplified example is:
I have an [Employee] table with EmpCode, EmpName
I have a second table [NewHires] that has: HireDate, EmpCode, Addedby
Both EmpCode and Addedby contain EmpCode referring to the Employee table.
I wish an output similar to:
New Employee (from EmpCode in NewHire), Hired on (From HireDate), Hired By (from Addedby)
My problem is with an Employee.EmpCode=NewHires.Empcode or Employee.EmpCode=NewHires.Addedby in the Where clause or Join part of the SQL I don't know how to get EmpName from the Employee table twice but using two different EmpCode as the reference.
Thanks in advance - Shawn
View 2 Replies
View Related
Oct 12, 2004
I have a lookup table called States, I have multiple other tables that use this lookup table, but I can only relate to one other table. My question is if I change a state name how do I enforce that change to the other tables that CANT be related? I know it is a design flaw and need some kind of joining table. I am having difficulty understanding and incorporating first normal form in my database. Here is what i have so far.
Example:
Table 1
========|============|=============|========|
CustomerID BillingAddressID ShippingAddressID OtherFields
========|============|=============|========|
Table 2
===========|======|========|
BillingAddressID StateID OtherFields
===========|======|========|
Table 3
=============|======|========|
ShippingAddressID StateID OtherFields
=============|======|========|
Table 4
======|====|
StateID Name
======|====|
How do I relate table 4 with table 2 & 3 for referential integrity? Or create a joiner table?
View 7 Replies
View Related
May 20, 2004
I got a server that Crashed. My network group was able to get it up and running but it's vary fragile. One of the disk is done. What's the best way to get the my database:tables,views,stored procedured,dts packages, jobs off the bad server without crashing it again? I used the databae copy utility but found out that some of the database are replicated and it wont allow it to copy.
Thanks
Just another day in the life of a dba
View 2 Replies
View Related
Mar 23, 2007
Hi,very new to SQL queries, and strugling with join conceptI had to do a join based on a single field:select*fromtableA, tableBwheretableA.value = tableB.value(+);this works finebut how can i do the same thing while comparing multiple columns ... iwas thinking something like this: (obviously doesn't work)select*fromtableA, tableBwhere[tableA.value1, tableA.value2] = [tableB.value1,tableB.value2](+);Is there some sort of "tuple" comparison I can do?Thank you.
View 2 Replies
View Related
Jul 20, 2005
using osql to apply SPs in mutiple threadsHello,I got a weird problem when I was using osql to apply scripts for msdedatabase in multiple threads mode. Sometime 2 sps were missing duringthe whole apply process, sometime not, and seems like only those twoSPs met the problem. No error was appeared. Did anyone meet sameproblem before? Or any possible solutions?Thank you very much!
View 4 Replies
View Related
Sep 21, 2007
I have about 100 different tables that I would like to bring on nightly basis via integration services. SSIS will process the data and send on to its warehouse destination.
Is it possible to use a single task to bring in all these tables from within SSIS? and can write failed records to flat files at the sametime? instead of defining a data flow for each table and dealing with hundreds of dataflows just have one task that loop through the list of tables.
Wonder how warehouses fed by 100s of tables deal with this kind of scenario?
View 8 Replies
View Related
Feb 8, 2006
Hi all,Is this at all possible? In the following query I have mutiple columns in my SELECT statement that each have their own alias. Is it possible that I can use just one Alias for all these columns (such as Address), and if so how is it done?SELECT RTRIM(ISNULL(ta.house_no_flat, '')) as [Target - Flat No.], LOWER(RTRIM(ISNULL(ta.building, ''))) as [Target - Building], LOWER(RTRIM(ISNULL(ta.road_street, ''))) as [Target - Street], LOWER(RTRIM(ISNULL(ta.district, ''))) as [Target - District], LOWER(RTRIM(ISNULL(ta.town, ''))) as [Target - Town], LOWER(RTRIM(ISNULL(ta.county, ''))) as [Target - County], RTRIM(ISNULL(ta.postcode, '')) as [Target - PostCode]ThanksTryst
View 2 Replies
View Related