Showing posts with label save. Show all posts
Showing posts with label save. Show all posts

Thursday, March 29, 2012

DATABASE NAME SHOWS MY USERNAME

I am not so familiar with SQL Server 2005, but the problem is that when i created a vies and try to save it, instead of the name starting with the dbo. prefix, its starting with my username.

And i just found out that this is not happening only in the view its happening where ever i created an object and try to save it.

How can i change this from my username to make it display dbo. instead.

I think this is why i'm getting permission error when i try to use DTS package.

IF you want the dbo schema to 'own' the object (VIEW, TABLE, etc.) then use 'dbo.' as part of the name when you create the object.

CREATE VIEW dbo.MyView

AS ...

In order to correct the existing 'mis-named' objects, you will have to 'transfer' them into the correct schema.

ALTER SCHEMA dbo TRANSFER YourName.MyView

When that is complete, each item will then be in the [dbo] schema, and can be used by all users of the database, and referred to as dbo.MyView, dbo.MyFunction, dbo.MyTable, etc..

|||

Thanks for the reply

We dont create them coding. This has to do with Cranberry, so when we create rules, we use them in cranberry.

The way we create a view is just to right click on the View, select new rule. Then after adding table and doing all modification then we click the save button. A box pop showing View1 that is what we change to the new name we want to use then after i save and went back to the view list, i see that it has added my username as a prefix instead of dbo.

So its not that I'm coding anything manualy, so i dont know where to put all the codes above.

Thanks.

N.B. Sorry, this is my 1st time using SQL.

|||

Add the 'dbo.' to the name when you name the view.

For the existing 'mis-named' views, if you can't execute the code I presented previously, you will have to delete the existing views and re-create them and use the correct names (including the prefix).

|||

Hi Arnie,

When i created another view and add the 'dbo.' to the name, it gave an error message

"Invalid Indentifier dbo.tr_XXXX_XXX_XxxXxx"

Thanks.

|||

Hi Kaybal,

Modify the user that your application uses to have default schema of dbo. and make sure your user account has permissions on the dbo schema.

try this and let us know how you got on.

regards

Jag

|||

Hi Jag,

Thanks for the reply, can you put through how to modify the user and have default schema of dbo. Where do i go or what link should i use

thanks

|||

Hi Kaybal,

here you go. Let us know how you got on.

USE database_name; ALTER USER user_name WITH DEFAULT_SCHEMA = dbo; GO

regards

Jag

Tuesday, March 27, 2012

Database mirroring with truncate log on checkpoint

Hi All,
Understand that database mirroring need to use FULL recovery model, meaning
that all transaction detail will be save into log file. Hence the log file
will increase tremendously.
Can I enable truncate log on checkpoint on principle database and mirror
database? so the log file size will under control.
Thanks.
--
Regards,
VenedictHello There!
You have to set FULL recovery model for database mirroring.
To learn more about this, you can refer to the following document:
http://www.microsoft.com/technet/prodtechnol/sql/2005/dbmirror.mspx
Also, when you try to dump \ truncate your log file which is used by
Database Mirroring, you'll get an error and operation will not be completed
successfully.
To keep log file's size under control, you may try to setup a job to take
it's backup regularly for example every 10-20 mins and disable it's
autogrowth and set some size manually. However, be wise while configuring
it.
Ekrem Ã?nsoy
http://www.ekremonsoy.net , http://ekremonsoy.blogspot.com
MCBDA, MCTS: SQL Server 2005, MCITP:DBA, MCSD.Net, MCSE, MCT
"Venedict" <Venedict@.discussions.microsoft.com> wrote in message
news:36A23B54-820D-4B0E-9DA9-8A37A850D7F8@.microsoft.com...
> Hi All,
> Understand that database mirroring need to use FULL recovery model,
> meaning
> that all transaction detail will be save into log file. Hence the log file
> will increase tremendously.
> Can I enable truncate log on checkpoint on principle database and mirror
> database? so the log file size will under control.
> Thanks.
> --
> Regards,
> Venedict

Thursday, March 8, 2012

Database Maintenance Plan

Is it true that you cannot save a backup using the
Database Maintenance Plan to a different server ?
You can type a unc path in the "use this directory" box
when setting up the maintenance plan. The SQL Server service
account needs to be a domain account with appropriate
permissions to the other server, directory.
Backing up to a network location is not necessarily a good
idea. You may want to consider backing up to a local drive
and then copy the backup file to the network location.
-Sue
On Wed, 21 Apr 2004 01:37:27 -0700, "Lucy"
<anonymous@.discussions.microsoft.com> wrote:

>Is it true that you cannot save a backup using the
>Database Maintenance Plan to a different server ?

Database Maintenance Plan

Is it true that you cannot save a backup using the
Database Maintenance Plan to a different server ?Yes see http://msdn.microsoft.com/library/default.asp?
url=/library/en-us/dbmntwiz/dbmntwiz_8ovt.asp
>--Original Message--
>Is it true that you cannot save a backup using the
>Database Maintenance Plan to a different server ?
>.
>|||Dang
Thanks
>--Original Message--
>Yes see http://msdn.microsoft.com/library/default.asp?
>url=/library/en-us/dbmntwiz/dbmntwiz_8ovt.asp
>
>>--Original Message--
>>Is it true that you cannot save a backup using the
>>Database Maintenance Plan to a different server ?
>>.
>.
>|||You can type a unc path in the "use this directory" box
when setting up the maintenance plan. The SQL Server service
account needs to be a domain account with appropriate
permissions to the other server, directory.
Backing up to a network location is not necessarily a good
idea. You may want to consider backing up to a local drive
and then copy the backup file to the network location.
-Sue
On Wed, 21 Apr 2004 01:37:27 -0700, "Lucy"
<anonymous@.discussions.microsoft.com> wrote:
>Is it true that you cannot save a backup using the
>Database Maintenance Plan to a different server ?

Wednesday, March 7, 2012

Database Maintenance Plan

Is it true that you cannot save a backup using the
Database Maintenance Plan to a different server ?You can type a unc path in the "use this directory" box
when setting up the maintenance plan. The SQL Server service
account needs to be a domain account with appropriate
permissions to the other server, directory.
Backing up to a network location is not necessarily a good
idea. You may want to consider backing up to a local drive
and then copy the backup file to the network location.
-Sue
On Wed, 21 Apr 2004 01:37:27 -0700, "Lucy"
<anonymous@.discussions.microsoft.com> wrote:

>Is it true that you cannot save a backup using the
>Database Maintenance Plan to a different server ?

Sunday, February 19, 2012

Database Mail

I'm keen to use database Mail in SQL 2005. It seems to work well and save's me having to implement a queue, audit logging for sent/errored etc, as SQL2005 can take care of all of that for me.

heres the but..

Is there any way to specify the "From" email address in sp_send_dbmail I know you specify it as part of email account & profile but I want to override that.

I just wanted to be able to keep an audit of all the emails that where sent from an asp.net website and thought i could get that functionality "out of the box" with SQL 2005 and DB Mail, but with out being able to set the from: address its not going to work

Any one have a sugesstion?

Thanks

If you really need this functionality, you can create a profile named aspnet and you can attach one account to this. but doing this you will not have the failover functinality of Databasemail. but you will have all the other features of database mail