Showing posts with label primary. Show all posts
Showing posts with label primary. Show all posts

Sunday, March 25, 2012

Can I duplicate data?

Hello guys! Is it possible to duplicate a primary key?

I would like my database to accept data with the same primary key.

Is it possible?

How do you declare ON DUPLICATE KEY UPDATE?

Please help me. Thanks in advance. Wink

Hello.

That is not possible nor suggestedSmile

If you want to use that particular field for something else (and it is obvous, because you want duplicate values in it):

- add new field of type int

- make it autoincrement (identity)

- make it primary key for table and remove old field from primary key

sql

Tuesday, March 20, 2012

Can I combine Log Shipping and Clustering?

SQL Server 2005 SP2

Can I combine Log Shipping and Clustering? That is, can I
ship logs from the primary node in my cluster to an offsite
warm standby SQL server box?

Any help appreciated.

TIA

aj"aj" <ronald@.mcdonalds.comwrote in message
news:13k3vep1gmodlec@.news.supernews.com...

Quote:

Originally Posted by

SQL Server 2005 SP2
>
Can I combine Log Shipping and Clustering? That is, can I
ship logs from the primary node in my cluster to an offsite
warm standby SQL server box?
>


Certainly. They're two completely unrelated features.

And it's fairly common to in fact do what you propose.

Quote:

Originally Posted by

Any help appreciated.
>
TIA
>
aj


--
Greg Moore
SQL Server DBA Consulting Remote and Onsite available!
Email: sql (at) greenms.com http://www.greenms.com/sqlserver.html

Monday, March 19, 2012

Can I avoid slammer attack without install sp3 for sql server 2k

Hi,

I guess there is some problem setting up transactional replication
after i install sp3 for sql server 2k. I get primary key violation in sp_MSget_repl_commands. So I need to revert back to sp2. But what should i do to avoid slammer attack with sp2 installed on my server

Thanks
Nikhil.This is a known issue. You should contact PSS and ask them to look up
SRX030113606317.

can i add more files to the filegroup?

hi all,
2 CPU , 1G memory , the storage device is Disk Array
(RAID5)
The PRIMARY filegroup contains one datafile , i want to
add more files to the PRIMARY and rebuild the index in
another filegroup FGINDX (contains more files) to get
better performance
Can i need to modify the database to get better
management and better performance '
Thanks in advance.Rainbow
You can have more than one datafile in the same filegroup.
What you can not do is have one data file in more than one
filegroup.
Be aware you can only place non-clustered indexes in a
seperate filegroup.
Hope this helps
John|||i wanna better performance , expand the data to more
file '
>--Original Message--
>Rainbow
>You can have more than one datafile in the same
filegroup.
>What you can not do is have one data file in more than
one
>filegroup.
>Be aware you can only place non-clustered indexes in a
>seperate filegroup.
>Hope this helps
>John
>.
>|||Yes you may add more data files to a filegroup.
If you wish existing data to be spread across the new files, you must re-add
the data ( perhaps dropping/re-creating the clust index).
Wayne Snyder, MCDBA, SQL Server MVP
Computer Education Services Corporation (CESC), Charlotte, NC
www.computeredservices.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"rainbow" <genghongjie@.163.com> wrote in message
news:061701c38e03$4c9a42d0$a401280a@.phx.gbl...
> i wanna better performance , expand the data to more
> file '
> >--Original Message--
> >Rainbow
> >
> >You can have more than one datafile in the same
> filegroup.
> >What you can not do is have one data file in more than
> one
> >filegroup.
> >
> >Be aware you can only place non-clustered indexes in a
> >seperate filegroup.
> >
> >Hope this helps
> >
> >John
> >.
> >

Sunday, March 11, 2012

Can DTS automatically create primary key values upon export?

I have two practice tables I have created and want to export the values of one into the source table. I want to know if I can export into a table and have the destination table automatically give a primary key value to a record? I haven't been able to figure this out even after fiddling with the "Enable identity insert" checkbox under the Column Mappings tab. I have created source tables with and without primary keys and neither works because of the fact that I need to have a value for a primary key in order to INSERT into the destination.

Do I have to copy the source records into a staging table and assign the PK values myself by hand? This can't be the answer.

ddaveyou have to clear the enable identity insert checkbox if you want to allow the identity values to be poped by you
adding a check indicates that you want to programmatically provide the identity values
try clearing it and setting your identity on the column|||Thanks. I did do as you mention but I also had to create the destination table with a Primary Key with an identity field that incremented automatically by 1. I also had to create a source table that had NO primary key field. I then imported the source into the destination and the incoming rows were assigned Primary Key values in sequence.

ddave

you have to clear the enable identity insert checkbox if you want to allow the identity values to be poped by you
adding a check indicates that you want to programmatically provide the identity values
try clearing it and setting your identity on the column

Can I access MSDE on a remote machine with Enterprise Manager?

We just installed an application, WhatsUpGold, to monitor our servers. Management won't let me host that on my primary SQL box. So, we are using MSDE on the local machine (call that box my_netmon).

I can access the db with very basic functionality using osql while on the my_netmon machine. I've added my domain user account as a System Admin using the following commands.

exec sp_grantlogin @.name
go

exec sp_addsrvrolemember @.name, 'sysadmin'

But when I go to the my_sql machine and try to attach to it with Enterprise Manager I get an error that the server does not exist.

What gives? Is it just not possible, or am I missing something here?

My goal is to just be able to see the data stored in the MSDE db. Write views, etc...

Please advise,

MarcHas anybody accessed MSDE from a remote machine. Or can it only be access locally with ODBC type connections?|||yes, you can use MSDE remotely. what does your connection string look like? is it a named instance?

for that matter, why bother with MSDE? it's ancient. you should use SQL Server Express if this is for new development.

Friday, February 10, 2012

Calling Stored procedures via the Job Agent - Please help!

Hi all,
My colleague and I are struggling with a rather annoying problem. The
situation is as follows:
We've two database servers (one primary and one backup) with
SQL-server 2000 installed. We've been trying to implement
"log-shipping" on this server using the example scripts from the SQL
server 2000 resource kit. What happens in these scripts is basically
the following.
Server A: starts the (local) stored procedure (sproc) sp_logship
Server A: sp_logship copies the transactionlog into a shared location,
so Server B is able to reach the transactionlog.
Server A: calls a sproc on Server B.
Server B: The sproc looks for a transactionlogfile in the shared
location and restores Server B's database using this logfile.
This mechanism works fine when we call "sp_logship" from the
Query-analyzer on Server A.
When we try to run start the "sp_logship" using the Job Agent (also on
Server A), we get the following error:
Msg 7410, sev 16: Remote access not allowed for Windows NT user
activated by SETUSER [SQLSTATE 42000]
We tried to solve this problem by creating several other users, even
ones who use SQL server Authentication. It was to no avail.
I hope someone can help me with this problem,
Thank you very much in advance,
Alke WiebengaIs the SQL Server Agent startup account a domain one with permission to
access the shared folder in both servers?
AMB
"A. Wiebenga" wrote:

> Hi all,
> My colleague and I are struggling with a rather annoying problem. The
> situation is as follows:
> We've two database servers (one primary and one backup) with
> SQL-server 2000 installed. We've been trying to implement
> "log-shipping" on this server using the example scripts from the SQL
> server 2000 resource kit. What happens in these scripts is basically
> the following.
> Server A: starts the (local) stored procedure (sproc) sp_logship
> Server A: sp_logship copies the transactionlog into a shared location,
> so Server B is able to reach the transactionlog.
> Server A: calls a sproc on Server B.
> Server B: The sproc looks for a transactionlogfile in the shared
> location and restores Server B's database using this logfile.
> This mechanism works fine when we call "sp_logship" from the
> Query-analyzer on Server A.
> When we try to run start the "sp_logship" using the Job Agent (also on
> Server A), we get the following error:
> Msg 7410, sev 16: Remote access not allowed for Windows NT user
> activated by SETUSER [SQLSTATE 42000]
> We tried to solve this problem by creating several other users, even
> ones who use SQL server Authentication. It was to no avail.
> I hope someone can help me with this problem,
> Thank you very much in advance,
> Alke Wiebenga
>