Showing posts with label local. Show all posts
Showing posts with label local. Show all posts

Wednesday, March 28, 2012

Maintenance Plan does not delete old .bak files

I am using the maintenance cleanup task wizard to delete old .bak files older than 4 weeks, but it is not working.

I chose:

connection: local server connection

type: backup files

search files based on an extension

path to files

ext = bak

Delete files older than 4 weeks.

I run it and it never removes any of the files--what gives.What version on SQL you are using. IF you have installed SQL2005 SP2 before march 6th, then there is a know bug on cleanup task. You can download the latest SP2 build and install.
|||

This problem has been fixed in the latest Cumulative Update. Call MS Customer Service and ask for the SQL Server cumulative update. There is no charge for this service.

jkh

sql

Maintenance Plan bug on SQL Server 2005

Hello, everyone:

I have a strange trouble on SQL Server 2005 on XP/local and Win 2003/server. When I connect local database and create a backup plan named by "backup plan", I can see the name under "maintenance plan" and "Jobs" under SQL Server Agent. But if I connect to server database and do the samething, I cannot see the name under "maintenance plan". I can see the name under "Jobs" under SQL Server Agent. But cannot delete this job, and message:

Drop failed for job "Backup Plan".(Microsoft.SqlServer.Smo).

Did someone meet this bug and have suggestions?

Thanks

ZYTPermissions? Do you have the same permissions to the server as you do to your local SQL Server?|||Hi, Pootle:

Thanks for reply.

I have sysadmin permissions to the server.

ZYT

Permissions? Do you have the same permissions to the server as you do to your local SQL Server?|||Hi, Pootle:

The server is the remote one that our company just got from someone else. I login by "Remote Desktop Connection" and check SQL Server. From Start - Programs - SQL Server 2005, there is only "Configuration Tools" available, no other componences like "SQL Server Management Stadio". This is first time I sam and confused. What was happened?

When I connect server from SQL Server, I can all tables and stored procedrues.

Thanks

ZYT

Permissions? Do you have the same permissions to the server as you do to your local SQL Server?|||As I remember, there was a bug in SQL 2005 SP2 that affected Maintenance plans. Check to see what hotfixes are available.

Monday, March 19, 2012

maintaining unique keys when offline

If you have a "Orders" table that is being sync'd to subscribers that are ocassionaly offline, and the subscribers add rows to their local Orders table. When they go online to sync with the published "Orders" table, how do you handle keeping the "OrderId" field unique?

Example:

Both salespeople sync the following data down:

OrderId Desc

1 Order 1

2 Test Order

Both salespeople go offline and add orders

Salesperson 1 adds:

OrderId Desc

3 Joes Order

Salesperson 2 adds:

OrderId Desc

3 Kathys Order

Now, when they go back online, they both will sync their orders up to the main database and they both have the OrderId of 3.

The main problem with using an int identity as a primary key is that it gets assigned by the database on insert; as you're discovering, assigning it outside of the database creates key collisions.

There are several different approaches you can use. All of them have problems:

1) If the row contains some combination of values that are always unique, use this combination as the primary key.

Problems with this approach: Not always possible. If the table's going to be referenced as part of a foreign-key relationship, you have to replicate all of the parts of the key in the referencing rows.

2) Use a composite primary key with two columns, or a primary key that's a concatenation of two values. One is a token that's unique to each process that's creating records; the second is a sequentially-assigned value that each process is responsible for assigning. In your example, you'd use the salesperson as the token. So you could either make salesperson, order id the primary key, or you could create nvarchar keys like "joe:1".

Problems with this approach: The token has to be invariant, i.e. changing the salesperson on the order can create key collisions. The database can no longer assign primary keys, since the PKs are being assigned offline, outside of the database.

3) Use a primary key of type uniqueidentifier (i.e.a GUID). All GUIDs are unique, so you'll never have a key collision.

Problems with this approach: your identifier won't be usable by humans. Sorting by GUIDs is useless. GUIDs use 32 bytes of storage, as opposed to 4 for int.

4) Use a temporary local key (using either of the above 2 approaches) when creating records on the client, and assign the real key when the row is inserted.

Problems with this approach: The client won't automatically know what the keys are of the rows it just inserted into the database, and will have to re-query the database to get their values.

|||

SQL replication also has the ability to assign identity ranges to subscribers. You might want to look into it as a solution. The only problem is in a high subscriber, high volume scenario is assigning an appropriate range to each subscriber.

I looked into this solution for the company I currently work for.We decided using a GUID was a much better solution.It eliminates the need to monitor the identity ranges.

Maintaining Remote SQL Database

Hi,
I have a sql2k server hosted by my ISP. I need to get the database from
my local development server installed on the sql2k server maintained by
my ISP.
My ISP has told me that there is no enterprise manager access to the
server, any changes to the database need to be done through script or
some other means.
Can anyone provide some guidance on the best practices/methods for doing
this, the thought of manually creating all the tables/relationships/sp's
etc.. on the other machine sounds quite a complex process.
Thanks in advance,
Kieran
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!For the initial database create they will probably allow you to backup your
database and they will restore it. alternitavly use sp_detach_db and they
can attach.
For updates to procs etc you can issue CREATE / DROP / ALTER statements
through Query Analyser or send the .SQL scripts to the ISP
--
HTH
Ryan Waight, MCDBA, MCSE
"Kieran" <anonymous@.devdex.com> wrote in message
news:eePAoX%23kDHA.1948@.TK2MSFTNGP12.phx.gbl...
> Hi,
> I have a sql2k server hosted by my ISP. I need to get the database from
> my local development server installed on the sql2k server maintained by
> my ISP.
> My ISP has told me that there is no enterprise manager access to the
> server, any changes to the database need to be done through script or
> some other means.
> Can anyone provide some guidance on the best practices/methods for doing
> this, the thought of manually creating all the tables/relationships/sp's
> etc.. on the other machine sounds quite a complex process.
> Thanks in advance,
> Kieran
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!|||Kieran <anonymous@.devdex.com> wrote in message news:<eePAoX#kDHA.1948@.TK2MSFTNGP12.phx.gbl>...
> My ISP has told me that there is no enterprise manager access to the
> server, any changes to the database need to be done through script or
> some other means.
> Can anyone provide some guidance on the best practices/methods for doing
> this, the thought of manually creating all the tables/relationships/sp's
> etc.. on the other machine sounds quite a complex process.
Hi
A web-based administration tool like myLittleAdmin can save you a lot
of time and work. More info, demo and free trial on
http://www.mylittletools.net/mla_sql
Best regards
el.c.

Saturday, February 25, 2012

Machine Rebuild - restored ReportServer database

I recently had to rebuild my local machine. As such, I backed-up all
of the relavent local databases that I needed (including the RS dbs).
After the rebuild, I have attempted to connect my new instance of RS to
a restored version of the ReportServer database. The instance
initialized after I got the encryption keys worked out (finally
remembered the password), however, when trying to run any saved report
(or any function other than directory browsing for that matter), I get
an error of:
The feature: "Scale-out deployment" is not supported in this edition of
Reporting Services. (rsOperationNotSupported) (rsRPCError).
Important things to know about my install:
1. My machine name is now different than before.
2. The orginal SQL instance was named, now it is the default
3. Was, and still am, running the Standard edition
I know that the scale-out deployment is not available in the Standard
edition. However, the install is completely local. My only thought is
that the restored database has kept the original machine name and/or
SQL instance name somewhere and RS is comparing against that. Is there
a way to correct this or am I up a creek?
Any help would be greatly appreciated - I am rather new to RS . . .
Thanks,
ScottI will save someone some time by stating that I was able to:
1. Save the report and model definitions from the original restored
database locally
2. Repointed my RS instance to the newly setup ReportServer database
3. Upload the definitions
4. Recreate datasources
5. Reconfigure the models to point a new data sources.
The reports came up ok - a little bit of a hassle, but got everything
working. Fortunately, just local development and I only had a couple
of reports.
Thanks,
Scott

Machine name and 'localhost' work, but local and . don't

SQL Server 2005 express...

when i'm trying to connect through SQL Express Manager, i can connect just fine if i use 'localhost\sqlexpress', or [machinename]\sqlexpress, but if i use local\sqlexpress or .\sqlexpress, it times out.

i've recently had trouble connecting through VBExpress as well, and i'm wondering if it's because it always uses .\sqlexpress to connect...

Anyone know why these 2 seemingly valid options don't work anymore?

found it! after 2 days of stressing.... somehow, aliases had been created that seem to redirect those inputs to.... i have no idea where...

name: .\sqlexpress
server: .\sqlexpress

why wouldn't this work, anyway?|||Depending on which protocols you have enabled the following is acceptable;

.\sqlexpress
(local)\sqlexpress
localhost\sqlexpress|||that's what i thought, but only the third of those three worked.

now that i've deleted the aliases, they all work again.

how do the aliases work?|||Alias's are covered in BOL but they basically provide (in this case) client side resolution of shortcuts to real names

Machine account access

Hi everyone,
I'm trying to access SQL Server from an application that is a service
running under the "Local System" account in a computer which is not the same
as the one running SQL Server. The service must run under this account, and
still should have access to an SQL Server database.
I've given permissions to the computer account in SQL Server, as both
computers are in Active Directory, but the service still does not connect
(due to permissions).
Is it possible to have this scenary running? Any idea on how to make it work
?
Thanks in advance,
Lleonard.Local system does not have access to network resources.
-Sue
On Wed, 27 Jul 2005 09:17:06 -0700, "lleonard"
<lleonard@.discussions.microsoft.com> wrote:

>Hi everyone,
>I'm trying to access SQL Server from an application that is a service
>running under the "Local System" account in a computer which is not the sam
e
>as the one running SQL Server. The service must run under this account, and
>still should have access to an SQL Server database.
>I've given permissions to the computer account in SQL Server, as both
>computers are in Active Directory, but the service still does not connect
>(due to permissions).
>Is it possible to have this scenary running? Any idea on how to make it wor
k?
>Thanks in advance,
>Lleonard.

Monday, February 20, 2012

LTM help file

Sorry in advance if this is off topic...please advise

In the past, I've used LTM (Local Test Manager) for testing a OLE DB providers conformance and had much success with it. The tool shipped in older versions of the MDAC SDK.

I've obtained v 2.70 of LTM.EXE from the MSDN platform SDK but there is no online help (LTM.CHM)

Anyone know where I can down load a copy?

Have you tried downloading Microsoft Data Access SDK 2.8 from http://www.microsoft.com/downloads/details.aspx?FamilyID=5067faf8-0db4-429a-b502-de4329c8c850&DisplayLang=en ?

Thanks

Suroor

|||

Thanks Suroor,

The MDAC SDK download appears to be much more complete than what's on the Platform SDK

Kind regards,

Terry